DBLookupComboBox u Kodla kapatmak

Delphi'de kod yazma ile ilgili sorularınızı bu foruma yazabilirsiniz.
Cevapla
Kullanıcı avatarı
mikser
Üye
Mesajlar: 120
Kayıt: 30 Haz 2003 09:54
Konum: Ankara

DBLookupComboBox u Kodla kapatmak

Mesaj gönderen mikser »

formda Speedbutton , DBEdit, Edit1 ve DBLookupComboBox var.
DBLookupCOmboBox un onenter inde Edit1 in visiblesini true yapip dblookupcombo nun ustune getiriyorum. Editi setfocus ediyorum. Editteyken klavyeden girilen her şeyi DBLookupcombobox a da gönderiyorum. gayet guzel calisiyor...

Kullanıcı forma click ettiği zaman Formun onmousedown unda

if( DBLookupComboBox1->ListVisible)
DBLookupComboBox1->CloseUp(true);

ile combonun listesini kapatabiliyorum. Edit1 in onexitında da aynı kod calisiyor ve baska nesneler setfocus oldugunda sorun cikmiyor.

Sorunlu senaryo söyle.

dblookupCombobox un listesi acik ve Active Control Edit1 Kullanıcı gidip SpeedButtona mouse click etti ve basili tuttu. sonra clickten vazgecti....

speedbutton un onmousedown unda ayni kodu calistirsam liste kapaniyor fakat speedbutton basılı kaliyor.

DBLookupComboBox1->CloseUp(true); ( bu kod comboyu setfocus ediyor galiba.)

bu kod dısında
DBLookupComboBox u kodla nası kapatabilirim.


DBLookupComboBox1->Perform(KAPANYAWW, true, 0);
veya
SendMessage( DBLookupComboBox1->Handle, KAPANCOMBOKARDES, 0, 0 );

gibi bişeyler mevcut mu?

simdiden tesekkurler.
Kullanıcı avatarı
sadettinpolat
Moderator
Mesajlar: 2131
Kayıt: 07 Ara 2003 02:51
Konum: Ankara
İletişim:

Mesaj gönderen sadettinpolat »

dblkpcombonun listvisible gibi bi özelliği vardı galiba.

An application sends a CB_SHOWDROPDOWN message to show or hide the list box of a combo box that has the CBS_DROPDOWN or CBS_DROPDOWNLIST style.

Kod: Tümünü seç

CB_SHOWDROPDOWN  
wParam = (WPARAM) (BOOL) fShow;     // the show/hide flag 
lParam = 0;                         // not used; must be zero 
 
aldığı parametreye göre listeyi gizler veya gösterir.

Parameters

fShow

Value of wParam. Specifies whether the drop-down list box is to be shown or hidden. A value of TRUE shows the list box; a value of FALSE hides it.


Return Values

The return value is always TRUE.

Remarks

This message has no effect on a combo box created with the CBS_SIMPLE style.



An application sends a CB_GETDROPPEDSTATE message to determine whether the list box of a combo box is dropped down.

Kod: Tümünü seç

CB_GETDROPPEDSTATE  
wParam = 0;     // not used; must be zero 
lParam = 0;     // not used; must be zero 
 
listenin aktif durumunu geri dönderir.

Parameters

This message has no parameters.

Return Values

If the list box is visible, the return value is TRUE; otherwise, it is FALSE.

daha fazla bilgi için delphi yardımındaki win32 developer's references te yer alan Combo Box Messages adlı bölüme bakabilirsin..
"Sevmek, ne zaman vazgececegini bilmektir." dedi, bana.

---
http://sadettinpolat.blogspot.com/
Cevapla