Autor Beitrag
Mordilion
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 96

WinXP Prof., Win2k Prof.
Delphi 7 Prof., Delphi 2009 Prof., PHP4/5, CSS, HTML
BeitragVerfasst: So 16.03.03 20:12 
Hi, wollte wissen ob es möglich ist Icons in die Statusbar zu machen! und wenn ja würde ich gerne wissen wie :)

MfG
Mordi

_________________
Für das große Chaos haben wir Computer. Die übrigen Fehler machen wir von Hand.
Der Mensch ist das wichtigste und kostbarste Peripheriegerät einer Computeranlage.
FriFra
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 557

Win XP Prof, Win XP Home,Win Server 2003,Win 98SE,Win 2000,Win NT4,Win 3.11,Suse Linux 7.3 Prof,Suse Linux 8.0 Prof
D2k5 Prof, D7 Prof, D5 Standard, D3 Prof, K3 Prof
BeitragVerfasst: So 16.03.03 20:38 
1. Lade das Icon in ein image
2. onCreate (Form) schreibst du image1.parent:=Statusbar1;
3. Du musst das Image dann noch entspr. positionieren (z.B. image1.left=1;image1.top:=1;)
Luckie
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: So 16.03.03 21:07 
Das geht auch einfachher. Zur Not mal im Swiss-Delphi-Center kucken.
FriFra
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 557

Win XP Prof, Win XP Home,Win Server 2003,Win 98SE,Win 2000,Win NT4,Win 3.11,Suse Linux 7.3 Prof,Suse Linux 8.0 Prof
D2k5 Prof, D7 Prof, D5 Standard, D3 Prof, K3 Prof
BeitragVerfasst: So 16.03.03 21:11 
:shock: Einfacher?
Sind 3 Zeilen Code nicht einfach genug?
Luckie
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: So 16.03.03 21:14 
Und was passiert beim Verändern der Größe des Formulares, wenn sich die Breite der Panles ändert usw.?
FriFra
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 557

Win XP Prof, Win XP Home,Win Server 2003,Win 98SE,Win 2000,Win NT4,Win 3.11,Suse Linux 7.3 Prof,Suse Linux 8.0 Prof
D2k5 Prof, D7 Prof, D5 Standard, D3 Prof, K3 Prof
BeitragVerfasst: So 16.03.03 21:16 
Die Image Position befindet sich ja innerhalb der Statusbar, also bleibt es wo es ist...
Ausser es ist nicht in Panel[0] und die breite der Panels ändert sich... Wenn man die Positionierung aber onResize (Form) macht, dann bleibt es bei 3 Zeilen Code.


Zuletzt bearbeitet von FriFra am So 16.03.03 21:18, insgesamt 1-mal bearbeitet
Mordilion Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 96

WinXP Prof., Win2k Prof.
Delphi 7 Prof., Delphi 2009 Prof., PHP4/5, CSS, HTML
BeitragVerfasst: So 16.03.03 21:17 
danke leute für eure schnelle hilfe ;)

_________________
Für das große Chaos haben wir Computer. Die übrigen Fehler machen wir von Hand.
Der Mensch ist das wichtigste und kostbarste Peripheriegerät einer Computeranlage.
Luckie
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: So 16.03.03 21:25 
FriFra hat folgendes geschrieben:
Die Image Position befindet sich ja innerhalb der Statusbar, also bleibt es wo es ist... ausser es ist nicht in Panel[0] und die breite der Panels ändert sich...

Eben. Bei Panel 1, 2 und 3 wird es eben etwas komplizierter.

Kink: www.experts-exchange...lphi/Q_10207456.html
FriFra
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 557

Win XP Prof, Win XP Home,Win Server 2003,Win 98SE,Win 2000,Win NT4,Win 3.11,Suse Linux 7.3 Prof,Suse Linux 8.0 Prof
D2k5 Prof, D7 Prof, D5 Standard, D3 Prof, K3 Prof
BeitragVerfasst: So 16.03.03 21:33 
Es wird auch nicht viel komplizierter bei Panel 1,2,3 (man braucht zur relativen Position des Images nur z.B. StatusBar1.Panels[0].Width zu addieren)...
Wenn man es allerdings so macht wie im Beispiel, dann wird es wirklich komplizierter und vor allem wesentlich mehr Code...
Luckie
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: So 16.03.03 22:49 
So:
ausblenden Quelltext
1:
2:
hIcon := LoadImage(hInstance, MAKEINTRESOURCE(4), IMAGE_ICON, 16, 16, LR_DEFAULTCOLOR);
SendMessage(hStatusBar, SB_SETICON, 0, hIcon);

Kann man ganz einfach ein Icon aus der Ressource in der gewünschten Größe im gewünschten Panel anzeigen. :wink:

Wie das mit den Ressourcen geht bitte im Forum kucken.
Bela Urlaub
ontopic starhalf ontopic starofftopic starofftopic starofftopic starofftopic starofftopic starofftopic star
Beiträge: 453

WinXP Prof/Home, Win98SE (nur auf Server)
D6 Pers
BeitragVerfasst: Sa 29.03.03 21:12 
Titel: onCreate?
FriFra hat folgendes geschrieben:
2. onCreate (Form) schreibst du image1.parent:=Statusbar1;

Das onCreate blick ich net ganz. Wo kommt des hin?

_________________
mensch, menschen können auch probleme haben...
Luckie
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Sa 29.03.03 21:17 
OnCreate ist ein Ereigniss deiner Form. Einfach mal im Objekt-Inspektor kucken. Aber ich würde dir doch meinen Code ans Herz legen. Ist einfacher und entspricht wohl auch der üblichen Vorgehensweise.
Bela Urlaub
ontopic starhalf ontopic starofftopic starofftopic starofftopic starofftopic starofftopic starofftopic star
Beiträge: 453

WinXP Prof/Home, Win98SE (nur auf Server)
D6 Pers
BeitragVerfasst: Sa 29.03.03 21:33 
Titel: Ja ok!
Ja, ok, aba wo kommt der dann rein?
In die StatusBar oder ins Image1 oda wo anders?

_________________
mensch, menschen können auch probleme haben...
Luckie
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Sa 29.03.03 21:37 
Was ist wer und wo kommt was rein?
Bela Urlaub
ontopic starhalf ontopic starofftopic starofftopic starofftopic starofftopic starofftopic starofftopic star
Beiträge: 453

WinXP Prof/Home, Win98SE (nur auf Server)
D6 Pers
BeitragVerfasst: Sa 29.03.03 21:41 
Titel: Code
Dein Code, den du weiter oben angégeben und in der Antwort zu meiner Frage erwähnt hast...

_________________
mensch, menschen können auch probleme haben...
Luckie
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Sa 29.03.03 21:44 
Der kommt in das OnCreate-Ereignis der Form.

Das Icon oder Bitmap hast du schon in der Ressource?
Bela Urlaub
ontopic starhalf ontopic starofftopic starofftopic starofftopic starofftopic starofftopic starofftopic star
Beiträge: 453

WinXP Prof/Home, Win98SE (nur auf Server)
D6 Pers
BeitragVerfasst: Sa 29.03.03 21:46 
Titel: Hab ich
Ich hab das Bild in der Image1.
Wolltet du das wissen?

_________________
mensch, menschen können auch probleme haben...
Luckie
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Sa 29.03.03 21:49 
In einer TImage-Komponente nützt es dir bei meinem Code nicht viel. Das muß in eine Ressource.
Bela Urlaub
ontopic starhalf ontopic starofftopic starofftopic starofftopic starofftopic starofftopic starofftopic star
Beiträge: 453

WinXP Prof/Home, Win98SE (nur auf Server)
D6 Pers
BeitragVerfasst: Sa 29.03.03 21:55 
Titel: Wie
Und wie mach ich das?

_________________
mensch, menschen können auch probleme haben...
MSCH
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1448
Erhaltene Danke: 3

W7 64
XE2, SQL, DevExpress, DevArt, Oracle, SQLServer
BeitragVerfasst: Sa 29.03.03 21:58 
Grübel. Warum so viel Aufwand? Orpheus-Komponenten oder die mit Delphi ausgelieferten LMD-Tools haben einen Statusbar den man wie ein Panel nehmen kann - sprich diverse andere Objekte drauf plazieren. OHNE Code.
grez
msch