Autor Beitrag
DELPHIn
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 98

Windows Vista
Delphi 2007 für Win 32 Prof.
BeitragVerfasst: So 30.10.05 16:35 
Mittlerweile weis ich, wie man in einer StatusBar Bilder anzeigt.
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
procedure THaupt.StatusBarMainDrawPanel(StatusBar: TStatusBar;
  Panel: TStatusPanel; const Rect: TRect);
begin
  if Panel.Index = 1 then  //Datenbank schreibgeschützt
    if nurlesen.Checked then
      ImageListButtons1.Draw(StatusBarMain.Canvas,Rect.Left,Rect.Top,22,true)
    else
      ImageListButtons1.Draw(StatusBarMain.Canvas,Rect.Left,Rect.Top,-1,true);

Allerdings habe ich ein Problem dabei:
Wenn das Bild wieder gelöscht werden soll, bleibt es dennoch stehen. Es verschwindet erst, wenn man mit einem anderen Fenster drüberfährt.
Was mache ich falsch?
Auch ein Refrash oder Repaint bringt keinen Erfolg!

Danke

DELPHIn

_________________
DELPHIn
=> Errare humanum est
Alstar
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 827



BeitragVerfasst: So 30.10.05 16:40 
Hi!
Schonmal mit Update probiert?

Alstar
DELPHIn Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 98

Windows Vista
Delphi 2007 für Win 32 Prof.
BeitragVerfasst: Di 01.11.05 16:03 
Ja, Update geht auch nicht.
Bzw. es geht alles, aber eben nur manchmal. Wenn die Anzeige der Bilder mal nicht aktualisiert wird, muss man nur mit einem anderen Fenster die Statusbar verdecken und schon wird alles korrekt dargestellt.
Sehr merkwürdig!
Ich habe das jetzt umgangen, es werden jetzt graue Duplikate der Bilder drübergelegt statt sie zu löschen. Sieht auch gut aus und erfüllt den Zweck.
Mich würde aber dennoch interessieren was ich falsch mache.

DELPHIn

_________________
DELPHIn
=> Errare humanum est
Luckie
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Di 01.11.05 19:01 
Lannes
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2352
Erhaltene Danke: 4

Win XP, 95, 3.11, IE6
D3 Prof, D4 Standard, D2005 PE, TurboDelphi, Lazarus, D2010
BeitragVerfasst: Di 01.11.05 19:39 
Hallo,

oder damit:
ausblenden Delphi-Quelltext
1:
StatusBar1.Invalidate;					

_________________
MfG Lannes
(Nichts ist nicht Nichts) and ('' <> nil ) and (Pointer('') = nil ) and (@('') <> nil )
DELPHIn Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 98

Windows Vista
Delphi 2007 für Win 32 Prof.
BeitragVerfasst: Fr 11.11.05 10:36 
Hat funktioniert, danke!

DELPHIn

_________________
DELPHIn
=> Errare humanum est