It is currently Mon Apr 21, 2014 1:44 am




Post new topic Reply to topic  [ 14 posts ] 
 Container Scaling 
Author Message
General
General

Joined: Thu May 17, 2007 4:56 pm
Posts: 504
Location: Ohio
Post Container Scaling
Ok, I have a container that contains a slider and bar chart. I've grouped the container, and if I change the size of it in the designer, the bar chart and slider change size accordingly.

But, if I change the size of the container at runtime through script, the bar chart and slider do not change proportionally with the container. Is this what you would expect?

What I'm trying to do is allow the user to use the slider to select the number of days of data to report, and as the days increase, the bar chart stretches.


Tue Jul 24, 2012 4:47 am
Profile
Moderator
Moderator

Joined: Sun Apr 02, 2006 2:46 pm
Posts: 4016
Location: Sacramento, CA
Post Re: Container Scaling
1) How are you resizing it?
2) Does it act differently if it isn't grouped?

_________________
Carl Gould
Software Development
Inductive Automation


Fri Jul 27, 2012 3:35 pm
Profile WWW
General
General

Joined: Thu May 17, 2007 4:56 pm
Posts: 504
Location: Ohio
Post Re: Container Scaling
I take the slider value and multiply it by a constant for now. I use the resize component function, and set the container size.

The only difference between grouped and ungrouped is the size of the bar chart. It works fine if I grab the handles and resize the container in the designer, and was hoping to duplicate this at runtime.

I've attached the window.

edit: Forgot to mention that the script for resizing the container is on the slider.


Attachments:
ScalingContainer.vwin [9.11 KiB]
Downloaded 68 times
Sun Jul 29, 2012 5:34 pm
Profile
Moderator
Moderator

Joined: Fri Dec 04, 2009 9:02 am
Posts: 174
Post Re: Container Scaling
It looks like we've got a bug in the layout system. Currently a container, when re-sized in run-time, doesn't redo it's own internal layout. This means that any children components will not be able to re-size themselves properly.

The workaround for now would be to handle the re-sizing of any applicable child components yourself using the same type of script you used for the container re-sizing.


Wed Aug 08, 2012 10:17 am
Profile
General
General

Joined: Thu Jul 31, 2008 2:08 pm
Posts: 386
Location: Chico, CA
Post Re: Container Scaling
will this be fixed in an up coming release?

_________________
Jonathan


Thu Aug 09, 2012 1:04 pm
Profile
Moderator
Moderator

Joined: Sun Apr 02, 2006 2:46 pm
Posts: 4016
Location: Sacramento, CA
Post Re: Container Scaling
Yes, but it won't make 7.5.2. Probably 7.5.3

_________________
Carl Gould
Software Development
Inductive Automation


Thu Aug 09, 2012 3:11 pm
Profile WWW
Cadet
Cadet

Joined: Tue Sep 25, 2012 5:17 am
Posts: 4
Post Re: Container Scaling
Any updates about the bugfix? ...I noticed that it didn't make it to the current release (version 7.5.3)

I am also trying to rotate the container component. Is this possible?

Tried the folowing with Script:
1) Container.angleDegrees (it worked for the group component)


Tue Sep 25, 2012 6:22 am
Profile
Cadet
Cadet

Joined: Tue Sep 25, 2012 5:17 am
Posts: 4
Post Re: Container Scaling
Instead of the container component I tried the template component. The resizing works as aspected with that object. Make sure not to forget to check the "Enable Layout" propertie of the template object. Otherwise it will stretch the child components of the template rather then listening to the Layout constraints.


Tue Sep 25, 2012 7:22 am
Profile
Cadet
Cadet

Joined: Tue Sep 25, 2012 5:17 am
Posts: 4
Post Re: Container Scaling
...I Forgot to mention that I couldn't find a solution to make the Template Instance to Rotate.

So any help would still be welcome.


Tue Sep 25, 2012 7:27 am
Profile
Moderator
Moderator

Joined: Sun Apr 02, 2006 2:46 pm
Posts: 4016
Location: Sacramento, CA
Post Re: Container Scaling
The runtime script-enabled container scaling issue is still outstanding, sorry about the delay.

Rotating a normal container or a template is simply not supported, that's why you can't find a way to do it.

_________________
Carl Gould
Software Development
Inductive Automation


Tue Sep 25, 2012 12:37 pm
Profile WWW
Cadet
Cadet

Joined: Tue Sep 25, 2012 5:17 am
Posts: 4
Post Re: Container Scaling
Will it be possible in a later release?


Wed Sep 26, 2012 11:07 pm
Profile
Moderator
Moderator

Joined: Sun Apr 02, 2006 2:46 pm
Posts: 4016
Location: Sacramento, CA
Post Re: Container Scaling
The container scaling issue will be resolved, in an upcoming release, probably 7.7.0.

There are no plans to have containers or templates be rotate-able, however.

_________________
Carl Gould
Software Development
Inductive Automation


Thu Sep 27, 2012 7:46 am
Profile WWW
General
General

Joined: Fri Mar 19, 2010 2:56 pm
Posts: 299
Post Re: Container Scaling
This has been fixed in Ignition 7.6.5.
Quote:
"Fixed - Re-sizing a container using system.gui.reshape or system.gui.resize now respects and
preserves the layout of the interior contents of the container."


Fri Mar 21, 2014 12:49 pm
Profile WWW
Moderator
Moderator

Joined: Fri Mar 16, 2012 1:00 pm
Posts: 760
Location: Sacramento, CA
Post Re: Container Scaling
You will find this in 7.6.6 since 7.6.5 was taken down

_________________
Greg Simpson
Inductive Automation
Technical Support Rep


Tue Apr 15, 2014 2:08 pm
Profile
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 14 posts ] 


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: