Fórum Componente Enter x Tab #164760

05/06/2003

0

Amigos, alguem tem algum coponentes que façam o enter assumir a função de tab.

Grato


Fabiano

Se tiverem por gentileza passem no email...

fabianosouza@acif.com.br



________
´O Senhor é meu pastor e nada me faltara´
[b:7d6ab19620][color=blue:7d6ab19620][/color:7d6ab19620][i:7d6ab19620][/i:7d6ab19620][/b:7d6ab19620]


Fabianosouza

Fabianosouza

Responder

Posts

05/06/2003

Luc.morais

A biblioteca do Jedi disponível no site da borland possui um componente que faz isso. A biblioteca é muito grande e possui vários outros componentes.

Outra opção é acrescentar o seguinte código ao evento OnKeyPress de cada form:

if (Key = #13)
then Perform(WM_NEXTDLGCTL,0,0);

Não esquecer de colocar a propriedade KeyPreview = True para cada form.

Luciano


Responder

Gostei + 0

05/06/2003

Cristiane

651 - Enter funcionando como Tab em toda a aplicação
Uses
 Grids
procedure TfrmPri.MudarComEnter(var Msg: TMsg; var Handled: Boolean);
begin
 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;
end;

no evento OnCreate o Form Principal digite a seguinte linha

Application.OnMessage := MudarComEnter;



Nao testei ainda... essa dica está no programa 750 dicas de Delphi.
Download do programa (agora acho que ja saiu o 800 dicas) em :
www.lloydsoft.hpg.ig.com.br


Responder

Gostei + 0

26/01/2011

Vergilio Araujo

criei uma unit com o nome TabEnter.pas salvei em algum lugar e fui no delphi7 e instalei como componente funciona perfeito no formulario que voce colocar o componente o enter funciona.
unit TabEnter;
interface
uses SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,         Forms, Dialogs, Buttons, StdCtrls;
type  TkEnterAsTab = class(TSpeedButton)  private   FEnterAsTab : boolean;  protected  procedure CMDialogKey(var Message: TCMDialogKey);   message CM_DIALOGKEY;  procedure Paint; override;  public  constructor Create(AOwner: TComponent); override;  published  property EnterAsTab: boolean read FEnterAsTab write FEnterAsTab default True;  end;
procedure Register;
implementation
constructor TkEnterAsTab.Create(AOwner: TComponent);begin inherited Create(AOwner); FEnterAsTab := True;
 if not (csDesigning in ComponentState) then begin  Enabled := False;  Visible := False; end else begin  Font.Name   := 'Small Fonts';  Font.Size   := 7;  Caption        := 'Enter';  Flat          := True;  Transparent := False; end;end;
procedure TkEnterAsTab.CMDialogKey(var Message : TCMDialogKey);begin if (GetParentForm(Self).ActiveControl is TButtonControl) and  not (GetParentForm(Self).ActiveControl is TCheckBox) and not (GetParentForm(Self).ActiveControl is TRadioButton) then  inherited else if (Message.CharCode = VK_RETURN) and (EnterAsTab) then begin  GetParentForm(Self).Perform(CM_DialogKey, VK_TAB, 0);
  Message.Result := 1; end else  inherited;end;
procedure TkEnterAsTab.Paint;begin if (csDesigning in ComponentState) then begin  Width  := 27;  Height := 27; end; inherited Paint;end;
procedure Register;begin RegisterComponents('TabEnter', [TkEnterAsTab]);end;
end.

 
Responder

Gostei + 0

10/02/2011

Mauricio Rodrigues

os componentes de automação comecial do ACBR tem
Responder

Gostei + 0

10/02/2011

Km Sistemas

Os componentes do Raise Components tem a opção de funcionar o Enter como TAB tambem...
Responder

Gostei + 0

10/02/2011

Km Sistemas

Os componentes do Raise Components tem a opção de funcionar o Enter como TAB tambem...


Link:   http://www.raize.com/DevTools/RzComps/Default.asp
Responder

Gostei + 0

16/05/2013

José

Este tópico esta sendo fechado por inatividade. Se necessário, sinalizar para que seja reaberto ou abrir um novo.
Responder

Gostei + 0

Utilizamos cookies para fornecer uma melhor experiência para nossos usuários, consulte nossa política de privacidade.

Aceitar