Fórum tab por enter #289740
27/07/2005
0
Tio_da_pipoca
Curtir tópico
+ 0Posts
27/07/2005
Paullsoftware
If not ((Screen.ActiveControl is TCustomMemo) or (Screen.ActiveControl is TCustomGrid) or (Screen.ActiveForm.ClassName = ´TMessageForm´)) then begin If Msg.message = WM_KEYDOWN then begin Case Msg.wParam of VK_RETURN,VK_DOWN : Screen.ActiveForm.Perform(WM_NextDlgCtl,0,0); VK_UP : Screen.ActiveForm.Perform(WM_NextDlgCtl,1,0); end; end; end;
no OnCreate do Form Principal coloque:::
Application.OnMessage := MudarComEnter;
no form ou no componente que vc não quer que o Enter funcione como tab mude a propriedade KeyPreviw = False, quando quiser novamente mude KeyPreviw = True.
eu faço assim :wink:
Gostei + 0
27/07/2005
Marco Salles
eu costumo fazer assim :
No evento onKeyDow do componente que eu quero trocar Enter por Tab eu faço assim:
procedure TForm1.Edit1KeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); begin if key=Vk_Return then Perform(Wm_NextDlgCtl, 0, 0); end;
Gostei + 0
24/08/2005
Henrique Rodrigues
onde coloco a primeira instrução?
erro que tive: [Error] Unit_Index.pas(111): Incompatible types: ´method pointer and regular procedure´
Gostei + 0
Clique aqui para fazer login e interagir na Comunidade :)