Ver Mensaje Individual
  #137  
Antiguo 20-07-2013
Avatar de José Luis Garcí
[José Luis Garcí] José Luis Garcí is offline
Miembro Premium
 
Registrado: may 2003
Ubicación: Las Palmas de G.C.
Posts: 1.372
Reputación: 22
José Luis Garcí Va camino a la fama
Cambios en mis componentes spinedit en el create, dentro de la creación de lo botones añadimos a cada uno la siguiente linea

Código Delphi [-]
TabStop       :=False;

Con esto evitamos que los botones UP y Down, reciban el foco.

Pongo el código del create de uno de ellos, sabéis lo que tenéis que hacer para cambiarlos en los demás

Código Delphi [-]

constructor TNewDBSpinEdit.Create(AOwner: TComponent);
begin
  inherited;
  width           :=121;
  height         :=24;
  FCaptionDown   :='q';
  FCaptionUp     :='p';
  FWidthButton   :=15;
  FontButtons     :=TFont.Create;
  with FFontButtons do
  begin
     Name         :='wingdings 3';
     Size         :=7;
  end;
  FButtonUP       :=TBitbtn.Create (self);
  with FButtonUP do
  begin
    width         :=FWidthButton;
    height       :=15;
    Font         :=FFontButtons;
    top           :=1;
    parent       :=Self;
    Caption      :=FCaptionUp;
    OnClick       :=UpClick;
    OnKeyPress   :=Self.OnKeyPress;
    OnKeyDown     :=Self.OnKeyDown;
    TabStop       :=False;
  end;
  FButtonDown     :=TBitbtn.Create (self);
  with FButtonDown do
  begin
    width         :=FWidthButton;
    height       :=15;
    Font         :=FFontButtons;
    top           :=1;
    parent       :=Self;
    Caption      :=FCaptionDown;
    OnClick       :=DownClick;
    OnKeyPress   :=Self.OnKeyPress;
    OnKeyDown     :=Self.OnKeyDown;
    TabStop       :=False;
  end;
  FProportional   :=True;
  ControlStyle    := ControlStyle - [csSetCaption];
  FIncrement      := 1;
  Text           :='0';
end;
__________________
Un saludo desde Canarias, "El abuelo Cebolleta"
Responder Con Cita