LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Panel Decoration Reference index Question

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

1:30 Seconds ARRRGHHH!!!! I want my popcorn NOW! Isn't there anything faster than a microwave!
0 Kudos
Message 1 of 9
(4,232 Views)

 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)...

 

 

Richard






0 Kudos
Message 2 of 9
(4,204 Views)
You can also store tags on the decorations and identify them with tags.  That approach is discussed briefly in this thread.
0 Kudos
Message 3 of 9
(4,193 Views)

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.

Richard






0 Kudos
Message 4 of 9
(4,185 Views)

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.

0 Kudos
Message 5 of 9
(4,179 Views)
Progress! How 'bout the password? Smiley Wink
Richard






0 Kudos
Message 6 of 9
(4,167 Views)

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.


___________________
Try to take over the world!
0 Kudos
Message 7 of 9
(4,146 Views)
Oh, ok. I thought they were polymorhic (i.e. bloated) so I would trim it down, but variants are fine. In fact, I like working with variants because it keeps the newbs from messin' with my code!
Richard






0 Kudos
Message 8 of 9
(4,128 Views)

FYI everybody, I went ahead and made this week's nugget about tags.  See here.

0 Kudos
Message 9 of 9
(4,067 Views)