11-25-2014 01:47 AM - edited 11-25-2014 01:48 AM
Ok, I attached.
I want change scale of tank by knob(here : SCALE?)
11-25-2014 01:52 AM - edited 11-25-2014 01:53 AM
11-25-2014 02:47 AM - edited 11-25-2014 02:47 AM
thanks Gerdw, but I talk about scale of object size. change size to smaller or bigger object. like zoom in/out. I thought you talk about this.
11-25-2014 03:23 AM
I am not sure if any programming language supports your request. It sounds to me that you are looking for a "analog" zoom function like vector based graphics allow.
Sadly, this is not supported in LV as LV doesn't use vector based graphics.
When implementing a "zoom" (scaling), you have to take care about pixels. So your width and height of the controls/indicators will always be an integer number of pixels (ever seen a half-pixel??) which will lead to overlaps and gaps when scaling elements which are close to each other.
Also fonts are very difficult to resize in a good way keeping the readable on the one hand, but as small as possible on the other (otherwise, text will overlap controls/indicator!).
My recommendation is that you implement some intelligence which calculates the total available width and height and resize controls/indicators/fonts in a reasonable way. As Gerd already mentioned: Use splitters to create independent panes for improved resize options.
Norbert
11-25-2014 03:25 AM
Hi behzad,
use property nodes. Property "Object bounding box" (or similar, I use a German LV version) is the one you need.
I thought you talk about this.
It's quite complicated when you talk about "scale" showing an object with a scale…
That's why I prefer clear examples with clear descriptions!
11-25-2014 04:42 AM - edited 11-25-2014 04:58 AM
Thanks a lot GerdW
I'm really sorry because of my bad explanation.
I couldnt find "Object bounding box" but I found a property "bounds". thats OK but it is not writable. that just show the size of object(here : tank)
Best Regards
11-25-2014 04:54 AM - edited 11-25-2014 04:57 AM
Thank you Norbert.
may you explain more your recommendation?
actully, I designed a dynamic program. I used 10 tank at first. user select the desire number of tanks. then, I invisible unuseable of tanks. but the page objects change to bad form and graceless. result, it is suitable to scale of object. I'm trying for that
Best Regards
11-25-2014 04:57 AM
Resizing a tank control takes quite some properties:
Please note that this list could be incomplete (depending on how your resize should act like)
Norbert
11-25-2014 05:12 AM
Thank you Norbert.
may you explain more your recommendation?
actully, I designed a dynamic program. I used 10 tank at first. user select the desire number of tanks. then, I invisible unuseable of tanks. but the page objects change to bad form and graceless. result, it is suitable to scale of object. I'm trying for that
Best Regards
11-25-2014 05:50 AM
Well, what should i explain more? Resizing is done "per pane". So regarding specific controls which must/should not resize, you should create multiple panes by placing splitter bars.
Use property nodes to retrieve sizing information (e.g. pane area width), then calculate new dimensions for all resizable objects, use property nodes to set those sizes.
Note: If you implement such a resizing algorithm, you should disable the option "resize with pane" for all objects (which is btw. already the default setting).
Norbert