07-16-2012 11:27 AM - edited 07-16-2012 11:32 AM
I am getting some slightly odd behavior when writing to the FP.PanelBounds property of a VI. On most occasions it works, but then for some VIs (with the same code sequence) it gives the following error:
The code in question that I am using in several VIs is as follows:
I have a box decoration sent to the back of my FP, which I use to size the FP at run-time.
I was wondering if anyone could spot why this may be happening? I can provide VIs that work and one that doesn't, if needed.
- James
Solved! Go to Solution.
07-16-2012 11:39 AM
07-16-2012 11:41 AM
The first thought that came to my head was minimum panel size (VI Properties). You can't shrink beyond that or you will get an error (not sure about the specific code). If that's not it then please post a working/non-working code sample and I'll take a look.
07-16-2012 11:45 AM
The input values just before the property node in this particular VI executes are as follows:
I have a double-monitor setup with a max screen space of 2880x900, so the coords here are valid.
07-16-2012 11:47 AM - edited 07-16-2012 11:47 AM
@Charles_CLD wrote:
The first thought that came to my head was minimum panel size (VI Properties). You can't shrink beyond that or you will get an error (not sure about the specific code). If that's not it then please post a working/non-working code sample and I'll take a look.
It was the minimum panel size, which I'd set before adding the resize-to-decoration functionality. Thank you for that little insight! 🙂
07-16-2012 11:47 AM
07-16-2012 11:54 AM - edited 07-16-2012 11:57 AM
Going off on a slight tangent...
If I have more than one decoration on the FP, how can I know in which order they are in the Decos[ ] array? The only properties of an element in the array are as follows:
None of these seem to point to being able to differentiate between the different decorations. A form of trial-and-error can be used in the development to isolate whichever decoration you want to use, but is there a better way than altering the properties of one and watching to see which moves?
I'm using LabVIEW 8.5
07-16-2012 11:56 AM - edited 07-16-2012 11:57 AM
Hi James,
I think they are in the order of creation.
When searching you will find threads on this topic. There was also noted a scripting property, which gives a unique ID for each element. Maybe that helps...
James: it's quite funny for other readers when I give an answer to a deleted question...
07-16-2012 11:59 AM
Sorry - I thought I'd worked it out! But alas, they're all called 'Decoration' and there's no way to rename them.
I'll have another look through the forums for this topic. Thank you for your help. 🙂
I didn't anticipate anyone replying to that last question so quickly!
07-16-2012 12:04 PM
I usually use a simple modern boolean button, turn off the label, move to back, set it to hidden and grab the size from it. This is much easier to reference explicitly.