NI Home
Cart Cart | Help
Hello Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI
You are here: 
NI Home > NI Developer Zone > NI Discussion Forums


Reply
Member
Taffarel
Posts: 14
0 Kudos

Lock Text of a Combo Box Control

I'm using a combo box to select options. When the program are running, the user can write at the combo box field. I tried to disable it but then the option can't be selected.
Is there a way to lock the text field to the user only select the options that i created for combo box?
 
thanks for help.
Active Participant
Marc_A
Posts: 442
0 Kudos

Re: Lock Text of a Combo Box Control

Right-click the combo box and uncheck "Allow undefined strings." This will stop the user from entering in his own string.
Member
Taffarel
Posts: 14
0 Kudos

Re: Lock Text of a Combo Box Control

I'm doind this, but the user still can edit the field, i want a way like a disable mode, where the user can't write.
Ring it's a exit, but only accept a numeric value and i need use a string in a value
Active Participant
Marc_A
Posts: 442
0 Kudos

Re: Lock Text of a Combo Box Control

I have several combo boxes set up like this, and I just made an example to double check. When "Allow Undefined Strings" is unchecked, the user cannot enter his own string. I don't know what you're doing differently than me, but it works fine when I do it.

The only thing that can be done is deleting what is already in the box, but you cannot type your own string. What version of LabVIEW are you using?

Active Participant
Marc_A
Posts: 442
0 Kudos

Re: Lock Text of a Combo Box Control

[ Edited ]

OK, here's another idea if you don't want the user to be able to even select the text in the combo box. Make it an enum, then send it to format into string with %s as the format string. The output of this will be the string that was selected from the enum.

Message Edited by Marc A on 04-11-2007 04:40 PM

Member
Taffarel
Posts: 14
0 Kudos

Re: Lock Text of a Combo Box Control

Yeah, the problem is that you can delete the string. But this is the better way that i can made. Thanks for help
By using this web site, you accept the Terms of Use for this web site. Please read these Terms of Use carefully before using any part of this site. Please go here for information on ni.com's copyright infringement policy.
My Profile | Privacy | Legal | Contact NI © 2011 National Instruments Corporation. All rights reserved.    |    E-Mail this Page E-Mail this Page