09-12-2007 03:40 AM
09-12-2007 04:10 AM
09-12-2007 05:46 AM
09-12-2007 07:02 AM
Ah. That was the key. The attached example shows how to use it nicely. The problem is that not all controls play nicely with this when you use the total bounds rect and it's not entirely accurate when you use the master bounds rect. It also doesn't work fully for all controls (see down).
wiebe@CARYA wrote:
The Dx and Dy are pointers to the values! Sorry about that.
I'm not sure what you mean by "anchoring, class-specific behaviors, etc". It handles all objects on the front panel, also controls inside clusters, subpanels and tabcontrols.
It may handle all controls, but it will only resize them. I also wanted to do anchoring (e.g. anchor a control to the bottom right corner instead of the upper left, although this is probably easier now that we have panes) and class-specific resizing (e.g. when you have an MC listbox, you can decide whether resizing the control would make the columns\rows larger or add more). For that, you would need some extra code for each class, both for configuration and for implementation.
It does not allow you to resize object, that can't be resized by hand. Like a simple numeric control: it can't be resized vertically. So it will only resize horizontally.
Sure you can, just look at the example I posted in reply 12. This demonstrates another problem with this - with class specific properties, you can change the aspect ratio of every control (I think), even ones where you can't control this manually - for example, a gauge has a housing size property.
Don't you mean: "Then again, scripting stuff is *NOT* necessarily any safer."?
Yes, that's what I meant. Maybe spell checkers should be made context sensitive and become syntax and logic checkers as well
Ever tried to resize a graph?
Yes I did, and I used the exact method you described - resize the plot area until the total control size reaches what you want.
09-12-2007 07:10 AM
09-12-2007 07:14 AM
@tartan5 wrote:
Drop a modern Boolean push button, resize it small. then back to original size. At least in 8.5, I can't get it to look like the original.....
OK, this definitely looks like an issue of integer math rounding errors. I'm not sure whether this is a bug or not. It is definitely unwanted behavior, but I don't think there is anything that gurantees you would get the same aspect ratio even when controls have vector graphics.
For this to work, the internal representation of the sizes of these control should probably be changed to floating point and only be rounded for the actual display. I don't know whether this should be considered as a bug, but I suggest you go to the Product Suggestion Center and try giving a detailed request about why this should be changed.
09-12-2007 07:40 AM
02-17-2009 03:07 PM
Any update on this discussion.
I want to be able to resize an intensity graph during run-time.
Ideally, the user can drag a corner and have the graph resize.
I currently have one VI where I have a single intensity graph which resizes to the pane - the user just drags the VI pane and it works great.
However, if more than one control on the pane needs to be visible, it creates difficulties.
Thanks,
Don
02-17-2009 07:10 PM
02-18-2009 10:29 AM
Hi DonRoth,
I think this KB in combination with your event structure may be what you're looking for.