Вниз
Скачать: CL | DM;

Как заставить выпасть ComboBox по кнопке Enter?   Найти похожие ветки 

 
DenisS   (2003-04-09 16:20) [0]

Как заставить выпасть ComboBox по кнопке Enter?

if Key=#13 then
SendMessage(ComboBox1.Handle, CB_SHOWDROPDOWN, 1, 0);

не работает. Почему?


 
Андреев Павел   (2003-04-09 16:25) [1]

А если попробовать DroppedDown := true ?


 
DenisS   (2003-04-09 17:20) [2]

Моргает и закрывается.


 
Zz_   (2003-04-09 17:41) [3]

procedure Tf.ComboBox1KeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin
if(Key=13)then begin
if(SendMessage(ComboBox1.Handle, CB_GETDROPPEDSTATE, 0, 0)=0)then begin
SendMessage(ComboBox1.Handle, CB_SHOWDROPDOWN, 1, 0);
Key := 0;
end;
end;
end;

procedure Tf.ComboBox1KeyPress(Sender: TObject; var Key: Char);
begin
if(Key=#13)then Key := #0;
end;


 
NA   (2003-04-09 19:38) [4]

Key обнулять иногда бывает оччень важно ;)



Страницы: 1 вся ветка

Скачать: CL | DM;



Память: 0.45 MB
Время: 0.012 c
1-67248
Aleksei K
2003-04-11 10:51
2003.04.21
Drag&Drop + TreeView


9-67078
drhdh
2002-11-17 18:50
2003.04.21
Разрешение


1-67212
dolmat
2003-04-10 17:23
2003.04.21
RichEdit строки различным цветом програмно


11-67189
VZ Alexandr
2002-07-10 05:29
2003.04.21
Abort


7-67586
RI
2003-03-02 00:59
2003.04.21
Delphi и Com порт




   Наверх