Forum > Lazarus Extra Components
SpkToolbar features
GermanOak:
Could someone please tell me, if SkpToolbar supports the following:
* dropdown menus
* nested flyouts from dropdown menus
* custom themes on 1 and 2
* icons (next to captions) on 1 and 2
* open dropdown on mouse-down, then trigger selected command on mouse-up
* hover from dropdown to dropdown (once clicked, no need to click again and again)Thanks in advance. I really appreciate all information and screenshots.
BlueIcaro:
This may can help you:
https://forum.lazarus.freepascal.org/index.php/topic,51552.0.html?PHPSESSID=j6gg4s8gjisef3v2ilb1nclt35
/BlueIcaro
wp:
In the attachment you see a screenshot of one of the demo programs coming with the package. It shows the built-in styles and hopefully answers most of your questions. But let me add:
/3/ Dropdown menus just are the system popup menus, they are not painted by the SpkToolbar - which may lead to an inconsistent GUI.
Just check it out. The package is available on Online-Package-Manager, its installation is just a single-click effort.
GermanOak:
Thanks a ton, you helped me both. I read up on the linked topic, and judging from the screenshots, this is mainly a ribbon interface. But if I understand correctly, the style-tab also offers a radio button that switches to Classical. Which is what I am looking for.
--- Quote from: wp on February 20, 2023, 06:47:47 pm ---/3/ Dropdown menus just are the system popup menus, they are not painted by the SpkToolbar - which may lead to an inconsistent GUI.
--- End quote ---
That's a downer. However, in the topic BlueIcaro linked me to, one of the screenshots shows an appearance editor. But I guess that does not apply to the dropdown menus, as wp pointed out.
--- Quote from: wp on February 20, 2023, 06:47:47 pm ---Just check it out. The package is available on Online-Package-Manager, its installation is just a single-click effort.
--- End quote ---
I am a total noob. Downloaded Lazarus and also the SpkToolbar package, but never got to the point, where I could see anything else but code, let alone play with the SpkToolbar GUI and try it out.
FYI, a very helpful developer referred me over here to this site, to check out SpkToolbar and decide whether or not it fits my needs. From what I gathered, it does offer classical dropdowns, but only in standard Windows system styles. They cannot be themed and styled by the target application. Is that correct?
wp:
--- Quote from: GermanOak on February 21, 2023, 01:16:17 am ---
--- Quote from: wp on February 20, 2023, 06:47:47 pm ---/3/ Dropdown menus just are the system popup menus, they are not painted by the SpkToolbar - which may lead to an inconsistent GUI.
--- End quote ---
That's a downer. However, in the topic BlueIcaro linked me to, one of the screenshots shows an appearance editor. But I guess that does not apply to the dropdown menus, as wp pointed out.
--- End quote ---
Of course not. How could it? It's necessary to write a "TSpkPopupMenu" which links to the TSpkToolbar, gets the style data from it and paints itself accordingly. However, "somebody" has to write it...
--- Quote from: GermanOak on February 21, 2023, 01:16:17 am ---
--- Quote from: wp on February 20, 2023, 06:47:47 pm ---Just check it out. The package is available on Online-Package-Manager, its installation is just a single-click effort.
--- End quote ---
I am a total noob. Downloaded Lazarus and also the SpkToolbar package, but never got to the point, where I could see anything else but code, let alone play with the SpkToolbar GUI and try it out.
--- End quote ---
I strongly advise that you do the first steps at first and try to understand the Lazarus way of writing an application. There are lots of tutorials and videos about this, but nothing about SpkToolbar.
To install SpkToolbar, open "Package" > "Online Package Manager", check the SpkToolbar entry and click "Install". Confirm the question to rebuild the IDE, and after a while the IDE restarts and has the component in the component palette tab "SpkToolbar"
To use the component go to the new "SpkToolbar" tab, click on the component icon (the only one on this tab) and then on the form. This adds an empty instance of the TSpkToolbar to the top of the form. Double-click on the SpkToolbar to open the TSpkToolbar contents editor. At first click on the left-most button ("Add tab") (and repeat if you need more tabs). Select the tab in the tree view of the contents editor and click the next button after the divider line ("Add pane") (and repeat for further panes). Make sure that the pane is selected, then click on the dropdown button of the first button in the next group. Select the kind of button from the dropdown, e.g. "Small button". Repeat for another button. The two buttons are placed side-by-side. If you want them to be arranged vertically, select the second button in the tree; go to the object inspector (the narrow table at the left of the IDE) and find the property "TableBehaviour" and select "tbBeginsRow".
To change the caption of tab/pane/button select the corresponding object in the tree of the contents editor, go to the object inspector again and enter the text in the "Caption" property.
To add icons you must add imagelists to the form. You need two of them - one for the LargeImages property of the SpkToolbar (use 32x32 images here), and one for the Images property (16x16 images). In the contents editor, select the button to which you want to assign an image, and then, in the object inspector, pick the requested image from the dropdown list of the ImageIndex property.
Etc. - I don't want to give a complete tutorial here. Just play with it and learn by doing.
Navigation
[0] Message Index
[#] Next page