Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2012-10

Toolbar buttons with caption on right

3 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Graeme Geldenhuys

Hi,

How do I get the toolbar button captions to appear on the right of the button image? When I enable ShowCaptions, they always appear below the images. What I want, is like what can be seen in a Delphi app - see attached screenshots.

Also, how to I centre the image in the toolbar button height? As you can see from the Lazarus screenshot, the images appear in the top/left of the button.

I'm using Lazarus (trunk) with FPC 2.6.0

Cheers,
Graeme.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: delphi.png
Type: image/png
Size: 2716 bytes
Desc: not available
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20121004/9ab67885/attachment.png> -------------- next part --------------
A non-text attachment was scrubbed...
Name: lazarus.png
Type: image/png
Size: 3515 bytes
Desc: not available
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20121004/9ab67885/attachment-0001.png>

Reply by email

Howard Page-Clark
to Graeme Geldenhuys
Graeme Geldenhuys wrote
How do I get the toolbar button captions to appear on the right of the button image? When I enable ShowCaptions, they always appear below the images. What I want, is like what can be seen in a Delphi app - see attached screenshots.
If you use TSpeedButton, just set button.Layout:= blGlyphLeft
and button.ShowCaption:= True;
Also, how to I centre the image in the toolbar button height? As you can see from the Lazarus screenshot, the images appear in the top/left of the button.

On Windows they are automatically centred. Is this a GTK oddity?

Reply by email

Graeme Geldenhuys
to Howard Page-Clark
Howard Page-Clark wrote
If you use TSpeedButton, just set button.Layout:= blGlyphLeft and button.ShowCaption:= True;

TToolbar and TToolButton doesn't seem to have such options - I thought captions and glyphs were common in toolbars these days. :-(

Anyway, I replaced TToolbar with a TBevel and TSpeedButton's. Now I have the desired look, thanks.

On Windows they are automatically centred. Is this a GTK oddity?

I guess just another widgetset bug.

Graeme.

Reply by email