|
-
May 19th, 1999, 10:36 AM
#1
combobox
Users are allowed only to pick an item in the list. How to achieve that?
I am thinking to intercept "Setforcus" message, and send "dropdown" list message. How should I do that?
Thanks!
Daohui Li
-
May 19th, 1999, 11:38 AM
#2
Re: combobox
Combo boxes are very versatile, but lets keep it simple, lets, suppose you want to specify the contents yourself.
(Study the class members of CComboBox)
m_MyCombo.AddString("Bert");
m_MyCombo.AddString("Fred");
m_MyCombo.AddString("Tim");
m_MyCombo.SelectString(0);
Set properties of your combo to Dropdownlist, and this stop character input in the combo, and only allow a selection.
Use GetCurSel() to retrieve the item index selected
Use GetLBText() to get the text at a given index
I hope I have been helpful
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|