Click here to Skip to main content
14,692,015 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I'm trying create a drop down menu (listbox? ) in visual studio. However, it's killing me I cant work out two things:
1. how to make it drop down instead of just flick between items - i click the side and it changes list item but doesnt drop down the list for easier access
2. how to make an event occur for clicking an individual item in the list instead of any...

Many thanks
Posted
Comments
Leo Chapiro 28-Feb-13 10:47am
   
Do you use MFC / WinForms or pure WinAPI32?
lostandconfused1234 28-Feb-13 10:53am
   
winapi32 but I would have thought something this simple can just be done with clicks in microsoft visual c++ express? :(

1 solution

Seen many questions and no answers on google so to those who also have this issue:

FlatStyle: Popup in toolbox. This also stops the user being able to edit it as a text box


this->comboBox1->DropDownStyle = System::Windows::Forms::ComboBoxStyle::DropDownList;
            this->comboBox1->FlatStyle = System::Windows::Forms::FlatStyle::Popup;
   
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900