tags:

views:

73

answers:

1

I add a toolbar with some standard Delphi components to my application. Unfortunately, the stupid arrow is first glyph (does anyone even know what it is for?)

I would like to destroy it totally, or, at least, set itcs icon to blank, so that it blends in with the toolbar.

How can I do this?

I need some code which can be executed twice without causing an exception. Thanks

A: 

TToolButton gets its image from combining its ImageIndex property with the enclosing toolbar's Images property, which refers to a TImageList. To make a toolbar button have no image, assign ImageIndex := -1.

To remove the glyph from a TSpeedButton at design time, select the button, and then select the Glyph property in the Object Inspector. Press Del to clear the property. To do the same at run time, assign Button.Glyph := nil.

If you have a pre-made toolbar, such as TMediaPlayer or TDBNavigator, then you can't customize the buttons. They always show the arrow glyphs that are hard-coded in the control. You can choose to hide or show certain buttons, though. If you placed the control just to get a row of buttons and have no intention of using them to play media or navigate a database, then don't use that control. Just place a TPanel and put standalone buttons on it.

Rob Kennedy