Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   GUI-Design mit VCL / FireMonkey / Common Controls (https://www.delphipraxis.net/18-gui-design-mit-vcl-firemonkey-common-controls/)
-   -   Delphi alternating text (https://www.delphipraxis.net/12733-alternating-text.html)

Remote1 3. Dez 2003 11:03


alternating text
 
wie erhalte ich bei einem mouseover einen alternating text wie bei html

ps: ich möchte keine statusbar

Sharky 3. Dez 2003 11:13

Re: alternating text
 
Hai remote1,

meinst Du so etwas:

Delphi-Quellcode:
var
 alternate : Boolean = False;

procedure TForm1.FormCreate(Sender: TObject);
begin
 Timer1.Enabled := False;
end;

procedure TForm1.Label1MouseEnter(Sender: TObject);
begin
 Timer1.Enabled := True;
end;

procedure TForm1.Timer1Timer(Sender: TObject);
begin
 If (alternate) then
  begin
   Label1.Caption := 'Text1';
  end
 else
  begin
   Label1.Caption := 'Text2';
  end;
  alternate := not (alternate);
end;

procedure TForm1.Label1MouseLeave(Sender: TObject);
begin
 Timer1.Enabled := False;
end;
P.S.: Ich verschiebe das mal nach VCL.

Remote1 3. Dez 2003 11:18

Re: alternating text
 
wenn man bei html über ein bild o.ä. geht kommtz doch immer ien kleiner text (alternating text) und genau den möchte ich auch in delphi

Sharky 3. Dez 2003 11:20

Re: alternating text
 
Wie wäre es mit einem Hint.

MathiasSimmack 3. Dez 2003 11:21

Re: alternating text
 
Wusste ich doch :)
Das nennt sich "Hint" oder "Tooltip". Schau mal in deinen Objektinspektor. Manche Controls bieten das von sich aus an. Bei einigen müsste man wahrscheinlich via API nachhelfen.


Alle Zeitangaben in WEZ +1. Es ist jetzt 17:40 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz