Ver Mensaje Individual
  #4  
Antiguo 19-02-2014
Avatar de ecfisa
ecfisa ecfisa is offline
Moderador
 
Registrado: dic 2005
Ubicación: Tres Arroyos, Argentina
Posts: 10.508
Reputación: 36
ecfisa is a splendid one to beholdecfisa is a splendid one to beholdecfisa is a splendid one to beholdecfisa is a splendid one to beholdecfisa is a splendid one to beholdecfisa is a splendid one to beholdecfisa is a splendid one to behold
Hola de nuevo Jorge.

No hay problema por la confusión.

Te agrego unas líneas de código de ejemplo que te van a permitir un mayor manejo de los Hints mediante la clase THintWindow:
Código Delphi [-]
...
type
  TMiHintWindow = Class (THintWindow)
    constructor Create (AOwner: TComponent); override;
  end;

  TForm1 = class(TForm)
    BitBtn1: TBitBtn;
    procedure FormCreate(Sender: TObject);
    procedure FormDestroy(Sender: TObject);
  private
    FOldHintWindow: THintWindowClass;
    FHintColor: TColor;
    FHintPause: Integer;
    FHintHidePause: Integer;
  public
  end;

var
  Form1: TForm1;

implementation

{ TMiHintWindow }
constructor TMiHintWindow.Create(AOwner: TComponent);
begin
  inherited Create(AOwner);
  Canvas.Font.Name := 'Comic Sans MS' ; // nombre de la fuente
  Canvas.Font.Size := 15;  // tamaño
  Canvas.Font.Style:= [fsBold]; // estilo
end;

procedure TForm1.FormCreate(Sender: TObject);
begin
  with Application do
  begin
    // salvar valores
    FOldHintWindow := HintWindowClass; 
    ShowHint       := false;
    HintWindowClass:= TMiHintWindow;
    ShowHint       := True;
    FHintColor     := HintColor;
    FHintPause     := HintPause;
    FHintHidePause := HintHidePause;
    //
    HintColor      := clYellow;  // fondo amarillo
    HintPause      := 50; // 50 ms antes de que se visualice
    HintHidePause  := 1600; // la visualización dura 1600 ms.
  end;
end;

...

procedure TForm1.FormDestroy(Sender: TObject);
begin
  // restaurar valores
  with Application do
  begin
    HintColor    := FHintColor;
    HintPause    := FHintPause;
    HintHidePause:= FHintHidePause;
  end;
  HintWindowClass:= FOldHintWindow;
end;

Saludos
__________________
Daniel Didriksen

Guía de estilo - Uso de las etiquetas - La otra guía de estilo ....
Responder Con Cita