LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Drop-down list of check-box options with header.

Solved!
Go to solution

I would expect that the compiler would not open the reference if you do not use it within the Event case.

 

And I would recommend closing it yourself if you do use it, because it is always a recommended strategy to close references when you are done with them.

Thoric (CLA, CLED, CTD and LabVIEW Champion)


0 Kudos
Message 11 of 22
(2,296 Views)

Thank you. Next question! 🙂

 

Is it possible to have a string indicator automatically resize itself to ensure all the contained text is shown? I have found a property called Text.SizeToText, but it doesn't work as I had hoped. Any suggestions?



Never say "Oops." Always say "Ah, interesting!"

0 Kudos
Message 12 of 22
(2,286 Views)

Nope, not that I know of. You'll need to do this programmatically.

There's a vi called Get Text Rectangle (vi.lib\picture\picture.llb\Get Text Rect.vi), which will tell you exactly how large your text box will be in pixels. Use the width information from this to programmatically set the width of your string indicator.

Thoric (CLA, CLED, CTD and LabVIEW Champion)


Message 13 of 22
(2,284 Views)
I thought I'd got this part working, but then realised that I am unable to 'write' the width of the string indicator - I can only 'read' it! Is there really no way to programatically change the width of a string indicator in LabVIEW 6.1? 😞


Never say "Oops." Always say "Ah, interesting!"

0 Kudos
Message 14 of 22
(2,275 Views)

*Deleted*

Message Edited by James Mamakos on 07-16-2009 04:52 PM


Never say "Oops." Always say "Ah, interesting!"

0 Kudos
Message 15 of 22
(2,261 Views)

Is there really no way to programatically change the width of a string indicator in LabVIEW 6.1? 😞

Not sure, I don't work in 6.1 anymore, but it is quite possible it was not a writeable property in that release. Why do you need to alter the width of a string anyway? Can you not simply make the string indicator more than wide enough for all possible content?

Thoric (CLA, CLED, CTD and LabVIEW Champion)


0 Kudos
Message 16 of 22
(2,243 Views)

I've finaly come back to this, and appear to be doing something wrong... 😞

 

I'm enclosing the code of the mini menu VI, and a picture showing where it appears in relation to the 'Select Plot' Ring. All I want to do is to pin the top right corner of the VI to the bottom right corner of the ring. How hard can it be?! 😮

 

(The boxes pointing to the two control inputs merely state what they are, and the order of the elements in the clusters) 

 

 

 

 

 

Please point out where I may be going wrong. Thanks.

 

James. 

Message Edited by James Mamakos on 08-11-2009 04:46 PM


Never say "Oops." Always say "Ah, interesting!"

Download All
0 Kudos
Message 17 of 22
(2,166 Views)

Ok, your coding style is very different to mine, so it would have been much easier if you'd posted your code instead of a snapshot here. But nevermind. As I erased my own example codes, I've re-created some code to do this again.

 

Some pointers:

  • You only need to send the coordinates of the lower right hand corner of the ring list into the subvi. That's all it cares about. (And your array of frequencies or course).
  • You do not need all the positoning code inside the while loop. Doing this means unnecessary recalculation of the posittion each time the loop iterates around.


See my attached images to see how to position the top right of the checkbox subvi directly coincident with the bottom right of the ringlist object. I haven't included the subvis because the subvi has no waiting code and exits immediately, but it works as far as positioning itself goes. I've used a lot of your code as a starting block, so it will look very familiar to you. The constants for borders etc. could do with a little tweaking.

 

Calling vi coordinate calculations:

 

main.jpg

 

The checkbox subvi positioning calculations:

 

subvi.jpg

 

Result (the mouse cursor does not appear in the snapshot, but is over the ring list):

 

works.jpg

Message Edited by Thoric on 08-11-2009 10:37 PM
Message Edited by Thoric on 08-11-2009 10:38 PM
Thoric (CLA, CLED, CTD and LabVIEW Champion)


Message 18 of 22
(2,155 Views)

I've made a few minor modifications to my code, but for some reason I still get the same result as before. 😞

 

I've attached a snapshot of all the code involved, and also the sub VI (I'm not allowed to share my main VI due to its content).

 

Alas, for I know not what I am doing wrong!

 

 

 

P.S. Thank you for all the help so far. 🙂 

Message Edited by James Mamakos on 08-12-2009 02:50 PM


Never say "Oops." Always say "Ah, interesting!"

Download All
0 Kudos
Message 19 of 22
(2,143 Views)

I would suggest you start using Probes to study the values being calculated and the coordinate for the subvi PanelBounds property. You know what they ought to be, so if they seem unreasonable, start tracking them back. Afterall, the calculations should be simple enough (subvi top = Ring list bottom, subvi right = ringlist right, subvi bottom = subvi top + height, subvi left = sibvi right - width). And the ring list bottom and right should be screen relative, as you seem to correctly calculate in your main vi.

 

I'm afraid I'm not in a position to download and test you own subvi at the minute 😕

Thoric (CLA, CLED, CTD and LabVIEW Champion)


Message 20 of 22
(2,136 Views)