Autor Beitrag
mimi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 3458

Ubuntu, Win XP
Lazarus
BeitragVerfasst: Do 14.04.05 21:00 
Hallo,
ich möchte gerne das in meiner Statusbar die Hint die dort schon angezeigt werden gelb sind und nicht clBlack.
Dafür habe ich die eigenschaft:font.color geändern in:clYellow aber die bleiben schwars.

ich habe folgenden code:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
procedure TForm1.ApplicationEvents1Hint(Sender: TObject);
begin
  StatusBar1.SimpleText:=Application.Hint
end;

warum bleibt es clBlack ? wie kann ich dort die farbe veränden ?

_________________
MFG
Michael Springwald, "kann kein englisch...."
Keldorn
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 2266
Erhaltene Danke: 4

Vista
D6 Prof, D 2005 Pro, D2007 Pro, DelphiXE2 Pro
BeitragVerfasst: Do 14.04.05 21:17 
Ich glaub, das ging nicht.
Du kannst die statusbar aber bei drawpanel selber zeichnen und dort Farbe etc. frei wählen.

Mfg Frank

_________________
Lükes Grundlage der Programmierung: Es wird nicht funktionieren.
(Murphy)
mimi Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 3458

Ubuntu, Win XP
Lazarus
BeitragVerfasst: Fr 15.04.05 08:35 
hast du dafür ein beispiel ? das hatte ich versucht und nicht hinbekommen, weil ich nicht wusste wie ich die Farbe ändern kann. :(

_________________
MFG
Michael Springwald, "kann kein englisch...."
Keldorn
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 2266
Erhaltene Danke: 4

Vista
D6 Prof, D 2005 Pro, D2007 Pro, DelphiXE2 Pro
BeitragVerfasst: Fr 15.04.05 11:25 
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
procedure TForm1.StatusBar1DrawPanel(StatusBar: TStatusBar; Panel: TStatusPanel;const Rect: TRect);
begin
  with Statusbar do
    begin
      Canvas.fillrect(rect);

      Canvas.font.Color:=clred;
      Canvas.textout(Rect.Left+2,rect.Top+2,panel.Text);
    end;
end;


das geht aber nicht mit simplepanel und simpletext. Du mußt mind. ein Panel erstellen (per OI bei der Statusbar, nicht mit TPanel verwechseln) und dort den Text einstellen. den Style des Panels auf Psownerdraw stellen.

Mfg Frank

_________________
Lükes Grundlage der Programmierung: Es wird nicht funktionieren.
(Murphy)
GTA-Place
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
EE-Regisseur
Beiträge: 5248
Erhaltene Danke: 2

WIN XP, IE 7, FF 2.0
Delphi 7, Lazarus
BeitragVerfasst: Fr 15.04.05 12:06 
Du brauchst nur ein Extra-Label.

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
  with Label1 do
  begin
    Parent := StatusBar1;
    Transparent := True;
    Alignment := taCenter;
    Layout := tlCenter;
    Align := alClient;
    Font.Style := [fsBold];
    Font.Color := clYellow;
  end;

_________________
"Wer Ego-Shooter Killerspiele nennt, muss konsequenterweise jeden Horrorstreifen als Killerfilm bezeichnen." (Zeit.de)
mimi Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 3458

Ubuntu, Win XP
Lazarus
BeitragVerfasst: Fr 15.04.05 16:37 
@Keldorn
werde ich mal testen.

_________________
MFG
Michael Springwald, "kann kein englisch...."