I am dyanamically creating speedbuttons in tab change procedure, i want to made speed button disabled , when it is disabled it is not showing the loaded image. how to show the image on speed button when it is in disable state. I am using the code SpeedButton,SpeedButton.Glyph.LoadFromFile(Path) AND USING SpeedButton.numGlyphs =1
How to Show bitmap image in Tspeedbutton when it is in disables state
The image used in the Glyph can contain upto 4 images, one for each state of the SpeedButton (up, down, disabled, selected).
The images are placed adjacent to each other in a single bitmap file that is used for the Glyph property of the SpeedButton. Use NumGlyphs to indicate how many images are used in the Glyph (eg. you can use only 2 or only 3 images).
Read the documentation on SpeedButton Glyph property.
This does not do the trick when the glyph comes from an action. I even have
DisabledImages
assigned on the action manager (which I have pointed to the same as the regular images), thus the Glyph
gets automagically assigned. However, it does not accommodate for disabled images. Setting GlyphCount
to 1 does nothing either. –
Orthman © 2022 - 2024 — McMap. All rights reserved.
Up
,Disabled
,Clicked
,Down
. Having one image means it's used for all states, two are used forUp
andDisabled
, and so forth. The link to the most recent docs (which still applies to D7, asTSpeedButton
hasn't changed much) is here. If only one image is provided, the VCL creates a masked version of it to use for the disabled state, which is often hidden (invisible) or only partially drawn. – Truda