ComboBox problem
-
Hi guys, How to lock the text portion of the ComboBox, but at the same time allows the items from the drop down list to be selected? Meaning that it only allows the selection of items but does not allow the text to be edited manually by users. I already set the Locked Property to TRUE but it didn't work. It locked both the text editing as well as the selection item from the list..HELP!!! Nway, im using VB6. Really appreciate your help.. Thanx in advance.
-
Hi guys, How to lock the text portion of the ComboBox, but at the same time allows the items from the drop down list to be selected? Meaning that it only allows the selection of items but does not allow the text to be edited manually by users. I already set the Locked Property to TRUE but it didn't work. It locked both the text editing as well as the selection item from the list..HELP!!! Nway, im using VB6. Really appreciate your help.. Thanx in advance.
I'm not sure what you mean ? If you don't allow typing, the user can just select items from the list. If you allow typing, they can type anything they want. What behaviour do you want to allow ? If you want to let them type in only stuff from the list, you need to write a custom control ( shouldn't be hard )
Christian Graus - C++ MVP 'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
-
I'm not sure what you mean ? If you don't allow typing, the user can just select items from the list. If you allow typing, they can type anything they want. What behaviour do you want to allow ? If you want to let them type in only stuff from the list, you need to write a custom control ( shouldn't be hard )
Christian Graus - C++ MVP 'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
-
Thanx Christian, But actually the behavior that i want is that the program does not allow the user to edit the ComboBox text, instead the user can only select the item from the ComboBox list. Thanx for ur help and i apologize for any inconvenient.
OK, that's easy, set the behaviour from DropDown to DropDownList.
Christian Graus - C++ MVP 'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
-
OK, that's easy, set the behaviour from DropDown to DropDownList.
Christian Graus - C++ MVP 'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
I tried using the DropDownList already and it works.. thanx a lot.. Btw, i used this in the main form. After selecting the item in the ComboBox list, a new form will appear. Then after closing the new form, it will return back to the main form. So when the program return to the main form, is it possible to empty the text in the ComboBox when using the DropDownList behavior?
-
I tried using the DropDownList already and it works.. thanx a lot.. Btw, i used this in the main form. After selecting the item in the ComboBox list, a new form will appear. Then after closing the new form, it will return back to the main form. So when the program return to the main form, is it possible to empty the text in the ComboBox when using the DropDownList behavior?
You can set the selecteditem, not sure if you can select selectedText or Text. SelectedIndex = -1 may work.
Christian Graus - C++ MVP 'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert