Autor Beitrag
Codewalker
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 46



BeitragVerfasst: Mo 18.04.05 20:26 
Hi Leute!

Ich versuche eine TActionToolBar mit Bildern zu gestalten die Semitransparenz unterstüzten. Mit PNG als Format ist die Transparenz kein Problem, aber den Buttons in der ToolBar kann man nur über eine ImageList und Indizes Bilder zuordnen und eine ImageList unterstützt nur Bmp und Ico.

Gibt es irgendwo eine Komponente oder einen Trick um das trotzdem hinzukriegen?
Codewalker Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 46



BeitragVerfasst: Mo 18.04.05 20:49 
Ziel der Sache ist es hauptsächlich, das die Symbole nicht mehr so einen kantigen Rand haben. Vorbild ist hier für mich Linux und MacOsX. Da geht das doch auch :(
Codewalker Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 46



BeitragVerfasst: Mi 25.05.05 10:54 
Ich hab das Problem gelöst. Unter www.thany.org gibt es eine TPNGImageList. Damit ist das kein Problem mehr
redbird
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 38

Win XP, Vista Business (64bit), Win 7 Prof. (64bit)
Delphi 7, Java, PHP
BeitragVerfasst: Fr 17.02.06 21:42 
Hallo,
dank deinem Post bin ich eben auf die gleiche Komponente gestoßen. Nun meine Frage:
Wie schaffe ich es, dass die Bilder auch dann transparent sind, wenn ich sie aus der imagelist herauslade?

Mit

IL.GetBitmap(0, Image1.Picture.Bitmap);

besitzen die Bilder noch immer einen weißen Hintergrund.

Danke für die Hilfe

Gruß
redbird
Codewalker Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 46



BeitragVerfasst: Sa 18.02.06 14:30 
Mit
ausblenden Delphi-Quelltext
1:
PngImageList1.PngImages[0].PngImage					


kommst du an das PngObject. Das kannst du einfach einem TPicture zuweisen. Zum Beispiel so:

ausblenden Delphi-Quelltext
1:
 Image1.Picture.Assign(PngImageList1.PngImages[0].PngImage);					
redbird
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 38

Win XP, Vista Business (64bit), Win 7 Prof. (64bit)
Delphi 7, Java, PHP
BeitragVerfasst: Sa 18.02.06 21:18 
Perfekt! Vielen Dank für die schnelle und treffende Antwort.

Ich bin auf dem Wege diesem Forum einen Schrein zu widmen.
redbird
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 38

Win XP, Vista Business (64bit), Win 7 Prof. (64bit)
Delphi 7, Java, PHP
BeitragVerfasst: Di 04.07.06 17:51 
Hmm, ich habe neulich Delphi 7 und etwaige Komponenten neuinstalliert.

Normalerweise lade ich von einer pngimagelist ein Bild in eine Image Komponente.
Das funktioniert auch soweit. Da sich die Bildgröße der Bilder in der Imagelist aber von der Bildergöße der Imagekomponente unterscheidet, habe ich bisher Image1.stretch := true angewendet.

Nun funktioniert das nicht mehr. Die Bilder werden zwar reingeladen, allerdings besitzen sie dann auch die Orginalgröße, werden also nicht mehr verkleinert.

Wie könnte ich dieses Problem am geschicktesten lösen, ohne gleich eine neue Imagelist mit kleineren Bildern anzulegen?

Gruß
redbird
Codewalker Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 46



BeitragVerfasst: Di 04.07.06 17:54 
Soweit ich weiß, ist in dem PNG-Paket von thany.org auch eine PNG-Collection dabei. Diese ist zwar kein derrivat einer TImageList, kann aber Bilder unterschiedlicher Größe fassen. Damit sollte das eigentlich machbar sein.
redbird
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 38

Win XP, Vista Business (64bit), Win 7 Prof. (64bit)
Delphi 7, Java, PHP
BeitragVerfasst: Di 04.07.06 18:26 
Danke für die äußerst schnelle Antwort.

Werde mir die Sache mal näher anschauen...