Click here to Skip to main content
12,951,548 members (51,359 online)
Rate this:
Please Sign up or sign in to vote.
See more:

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 3:59am
du[DE] 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

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
Top Experts
Last 24hrsThis month
OriginalGriff 6,084
CHill60 3,480
Maciej Los 3,083
Jochen Arndt 1,975
ppolymorphe 1,830

Advertise | Privacy | Mobile
Web02 | 2.8.170525.1 | Last Updated 28 Feb 2013
Copyright © CodeProject, 1999-2017
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