AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Programmierung allgemein Multimedia Delphi Ungewollte Transparenz bei einem ToolbarButton
Thema durchsuchen
Ansicht
Themen-Optionen

Ungewollte Transparenz bei einem ToolbarButton

Ein Thema von Xong · begonnen am 30. Okt 2008 · letzter Beitrag vom 3. Nov 2008
 
Benutzerbild von Xong
Xong

Registriert seit: 9. Jan 2008
186 Beiträge
 
Delphi 2006 Professional
 
#4

Re: Ungewollte Transparenz bei einem ToolbarButton

  Alt 3. Nov 2008, 09:57
Der Support hat sich gemeldet.

Meine Email:
How to avoid transparency of an bitmap-image assigned to a TAdvToolbarButton?
Hi!

I am currently using your component TAdvToolBar to create a toolbar like it is described in the tutorial at http://www.tmssoftware.com/site/atbdev.asp
To create image-toolbarbuttons I assign an bitmap-image to the Glyph-property of the button. Unfortunatly, the image is drawn with transparency. The color of the pixel in the bottom left corner of the image is set as the transparency-color. I do not want to have this transparency.

How can I avoid this?

I tried to set the Transparent-property of the Glyph to false, but this affected nothing.
Do I have to call something like an Update-method to see the change?

My System is Windows 2003 with Borland Developer Studio 2003.

I am looking forward to hear from you soon.

Yours,
Robert Rupf

PS: I tried to set the Picture-property of the Button. If I use a bitmap-file the image has transparency, with a png-file i dont get transparency.
So, how can I allow to assign bitmaps (without transparency of course...)?


Die Antwort:
RE: How to avoid transparency of an bitmap-image assigned to a TAdvToolbarButton?
Currently, when a glyph is used , it is hardcoded that this glyph or
picture is drawn with transparency. If you do not want transparency,
this will have to be changed in the method

procedure TAdvCustomToolBarButton.DrawGlyphAndCaption

by removing the calls:

AGlyph.Transparent := true;

and

FPicture.Graphic.Transparent := true;

Thanks for your interest in our components and
let us know if we can be of any further help.



Meine Lösung:
Einfaches Überschreiben der Methode ist nicht möglich. Man muss die gesamte Komponente ändern.
Dafür legt man eine neue Unit im Projekt an, die genauso, wie die alte heißt, also AdvToolBar.pas.
Darin werden die zwei oben genannten Codezeilen auskommentiert und fertig ist das untransparente Bild.

Alternativ kann man natürlich auch eine eigene Komponente ableiten...

LG,
Xong
  Mit Zitat antworten Zitat
 


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 16:34 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz