Click here to Skip to main content
11,412,833 members (74,959 online)
Rate this: bad
Please Sign up or sign in to vote.
See more: C++

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 28-Feb-13 4:59am
du[DE] at 28-Feb-13 10:47am
Do you use MFC / WinForms or pure WinAPI32?
lostandconfused1234 at 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

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

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;

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

  Print Answers RSS
0 OriginalGriff 379
1 Sascha Lefévre 200
2 Maciej Los 150
3 ProgramFOX 130
4 Sergey Alexandrovich Kryukov 110
0 Sergey Alexandrovich Kryukov 9,025
1 OriginalGriff 7,317
2 Maciej Los 3,570
3 Abhinav S 3,298
4 Peter Leow 3,084

Advertise | Privacy | Mobile
Web01 | 2.8.150427.1 | Last Updated 28 Feb 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100