[Lazarus] ToolButtons - AutoSize and Visible
Bent Normann Olsen
bent at earmaster.com
Thu Jul 3 10:34:13 CEST 2008
Hi,
I've a couple of issues with ToolBar and its ToolButtons.
AutoSize:
You can check ShowCaptions for a ToolBar, and check AutoSize for each
ToolButton, but AutoSize have no effect - All tool buttons are set to
ToolBar.ButtonWidth.
Maybe this is left out by choice, or because no one use tool buttons with
only captions?
You can work around this by setting the width of a tool button at runtime (a
tool buttons AutoSize must be set to true).
Visible:
When you make one ToolButton invisible on Delphi, it realigns all the other
ToolButtons to fill out the space from the invisible button, and brings it
back at its usual ordered place (not reordered).
This doesn't happen on Lazarus, at least not on Win32 and Carbon - they just
leaves a big gap between the other buttons.
Maybe this is also left out by choice, or because no one needs it.
I can work around it by setting the invisible button width to 1, and back to
text width when visible. Setting the width to 0 will rearrange the order of
buttons, so that an invisible buttons doesn't reappear at its usual place.
Regards,
Normann
More information about the Lazarus
mailing list