04-10-2009 08:28 AM
I have a front panel that uses native LV controls so I avoid scaling objects with monitor resolution as I have not had the best results with this when using native LV controls and indicators.
The front panel was laid out on a 1680 X 1050 widescreen monitor. I want to use it on my laptop that uses 1280 X 1024. I have the verticle taken care of by ensuring all the controls fit within th everticle area. But I need help with the horizontal scrolling.
I am trying to limit the left and right scrolling to not extend beyond the furthest most left decoration and the furthest right decoration. I used PANEL - DECORATION property nodes to get access to the decoration bounds so I can set the Left, Top and Right Bottom of the FP.BOUNDS,
But I have not had any luck getting this to limit the horizontal scrolling, it still goes to far left and to far right.
Another question is - How do i find out the index of a decoration when there are a lot of decorations on the front panel.
Thanks
Tim Crouse
04-10-2009 12:17 PM
Tim,
You can get the reference of a specific decoration by looking at the size and/or color. Using Width, Height, and Color, you should be able to pin down the exact decoration that you want a reference of. The attched picture just looks at Height.
...(I'm getting tired of the editor eating my posts)...
04-10-2009 02:22 PM
04-10-2009 03:07 PM
The tags idea is still bit of a rusty nail to me, but looks promising. The interface is a bit cryptic.
Speaking of the whole idea of using decorations in this manner: 9 times out of 10, I end up using a customized control. I've never regretted having a few extra indicators laying about, but I have regretted using decorations programmatically.
04-10-2009 03:36 PM
Tags shouldn't be too much of a rusty nail, I gave them a VI-wrapped API in LabVIEW 8.6...check out vi.lib\UserTags. I'm planning on writing a nugget about them soon.
04-10-2009 07:25 PM
04-11-2009 12:47 PM
The password won't help you much, as the method is basically what you see in the VI - the main things it accepts are a tag name and a tag value, which is a variant.
That said, maybe NI will give access to them at some point. I believe the main advantage you will get is that the reference won't be coerced, so you can use the reference out as-is.
04-12-2009 08:47 AM
04-13-2009 12:31 PM
FYI everybody, I went ahead and made this week's nugget about tags. See here.