Hi,
I was looking at various GUI toolkits to draw inspiration for a Toolbar widget for fpGUI. Up until now I have simply used a Bevel and Buttons (though fpGUI's buttons have more functionality that LCL's TButton). This works well, but I thought I would created a dedicated widget for the task.
The following criteria was given to me:
* easily add buttons
* easily add images
* set toolbar style. Controlling the visual aspect for text only, images only, text below images, text to the side, adhere to desktop environment preferences.
While looking at LCL's Toolbar and ToolButton functionality, and trying the simple ideas listed above, I can across some flaws or bugs in LCL. I'm using the Lazarus 1.0.4 release.
What works:
- Adding buttons are easy
- Adding images are easy
Problems:
- I used a set of 24x24 PNG images, but the images get clipped in the ImageList Property Editor. Right and Bottom of images are clipped in the image preview area. It looks like the ImageList is hardcoded to 16x16 images only! Why the 16px size limit?
- Image are also clipped on the toolbar buttons. The default toolbar button size appear to be too small for the images used.
- I then resized the heigh of the toolbar - toolbuttons don't resize? So what does the AutoSize property do?
- I then set AutoSize = True of each toolbutton, but the buttons don't change size at all???
- Why does the Toolbar have a Caption property??
- Where do I set the toolbar style? I only found Toolbar.ShowCaptions, but nowhere do I see, text only, image only, text below image, text to right of image, adhere to desktop preference (Gnome & KDE at least).
See attached screenshot showing the clipping and resize issues.
I thought I would raise these issues in the mailing list first, before I report them all as bugs in Mantis.
Regards,
- Graeme -
