Главная страница | назад





Article #17353: How do I get a ComboBox to drop down its list box in code?

 Question and Answer Database
FAQ2353C.txt How do I get a ComboBox to drop down its list box in code?
Category :VCL
Platform :All
Product :C++Builder 3.x
Question:
How do I get a ComboBox to drop down its list box in code?
Answer:
Send the ComboBox a CB_SHOWDROPDOWN message, passing a 1 (true) in
the WParam parameter to drop the list down, or a 0 (false) to hide it.
Example:
void __fastcall TForm1::Button1Click(TObject *Sender)
{
SendMessage(ComboBox1->Handle,CB_SHOWDROPDOWN,1,0);
ComboBox1->SetFocus();
}
7/2/98 10:32:32 AM

Last Modified: 01-SEP-99