问题
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
回答1:
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.
来源:https://stackoverflow.com/questions/11686409/how-to-show-bitmap-image-in-tspeedbutton-when-it-is-in-disables-state