BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Disappearing Glyph on TSpeedButton

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Graphics
View previous topic :: View next topic  
Author Message
Jeff Gaines
Guest





PostPosted: Sun Sep 26, 2004 10:32 am    Post subject: Disappearing Glyph on TSpeedButton Reply with quote




I have a TSpeedButton on a form with a 16x16 bitmap as its glyph.

When I disable the button the glyph disappears, it comes back when the
button is enabled.

All the other TSpeedButtons on the form show a grayed out image when
disabled.

Any pointers as to why this should happen? All the bitmaps I am using
are 16x16 and have a 1 pixel wide purple margin round them as the
transparency colour.

--
Jeff Gaines - Damerham Hampshire UK
Posted with XanaNews 1.16.4.6
http://www.wilsonc.demon.co.uk/d7xananews.htm
Back to top
Jeff Gaines
Guest





PostPosted: Sun Sep 26, 2004 4:12 pm    Post subject: Re: Disappearing Glyph on TSpeedButton Reply with quote



On 26/09/2004 Kiss Miklós wrote:

Quote:
When I disable the button the glyph disappears, it comes back when
the button is enabled.

The SpeedButton has a property NumGlyphs which sets the number of
glyphs in the loaded bitmap. Usually the bitmap You load should be 2
or 3 times wider than it's height. The first square stores the image
to be shown when the button is enabled the second when it's disabled
and the third when it's down. I might be wrong so see the online help
for a more detailed and accurate description.

All the other TSpeedButtons on the form show a grayed out image when
disabled.

What the SpeedButton does when you set a square bitmap to be the
glyph is to 'edge detect' the image and the resulting image will be
shown when it's disabled. So when the bitmap does'nt have any sharp
lines in it it will be gray.

Hope this helps,
MikKi

MikKi

Many thanks for that, I am not very creative but I will try and draw
some wider bitmaps since that will give me more control over what is
displayed.

I think your point about edge detection was the issue here. The colour
of the graphic was too close to that of the transparent colour - I
changed that to black and it now works as I was expecting it to.

Thanks again.



--
Jeff Gaines - Damerham Hampshire UK
Posted with XanaNews 1.16.4.6
http://www.wilsonc.demon.co.uk/d7xananews.htm

Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Graphics All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.