Funcionar enter em CLX

Delphi

10/01/2004

e ai meu povo blzzzz

o Exemplo abaixo funciona em VCL eu uso atualmente
porem eu preciso que funcione em CLX

esse exemplo faz o enter funcionar e a cetinha pra cima e pra baixo tambem

//=== cria uma procecdure no form principal

procedure ProcessaMsg(var Msg: tagMSG; var Handled : Boolean) ;

//=== a procedure

procedure TFRMMenu.ProcessaMsg (var Msg: TMsg; var Handled : Boolean) ;
Begin
if Msg.message = WM_KEYDOWN then
begin
if not (Screen.ActiveControl is TCustomMemo) and
not (Screen.ActiveControl is TButtonControl) and
not (Screen.ActiveControl is TCustomDBGrid) and
not (Screen.ActiveControl is TCustomComboBox) and
not (Screen.ActiveControl is TDBLookUpComboBox) then

begin
if not (Screen.ActiveControl is TCustomControl) then
begin
if Msg.wParam = KEY_Down then Msg.wParam := KEY_TAB;
if Msg.wParam = KEY_UP then
begin
Msg.wParam := KEY_CLEAR;
Screen.ActiveForm.Perform(WM_NextDlgCtl,1,0);
end;
end;
if Msg.wParam = KEY_Return then Msg.wParam := KEY_TAB;
end;
end;
End;


//=== no evento oncreate do formo coloco
Application.OnMessage := ProcessaMsg;


Mysys

Mysys

Curtidas 0

Respostas

Aroldo Zanela

Aroldo Zanela

10/01/2004

Colega,

Numa pesquisa realizada aqui no fórum, encontrei a seguinte solução:

if key = #13 then 
Selectnext(activecontrol,true,true); 
end; 
else 
key := 0; 



GOSTEI 0
Rfpsatin

Rfpsatin

10/01/2004

declare a Unit Qt na uses.

 if key=key_return then 
selectnext(activecontrol,true,true) 



GOSTEI 0
POSTAR