Reputation: 3022
I put a TToolBar
on my form and add some TSpeedButton
. I ensure myself that Wrapable
is set to true and run the application. But when I shrink the form the buttons don't wrap on new line. What am I missing ? I am using Delphi 2009.
Upvotes: 2
Views: 697
Reputation: 125687
You need to set the TToolBar.AutoSize
to True
, and add separators between groups of buttons so there's a place for it to split the toolbar into sections.
It's also better to use TToolButton
on the TToolBar
instead, as it's designed to work with them. Right-click the toolbar and choose New Button
or New Separator
. Assign the images you want to display to a TImageList
, and assign the imagelist to the TToolbar.Images
property, then set the ImageIndex
for each button to display an image from the list. (Another advantage is that you can also separate imagelists to the HotImages
and DisabledImages
properties as well.)
Upvotes: 6