KillerToolbar : save configuration

Does anyone know how/have the example code to save and load the state of a killertoolbar after it has been customised using the customisation window?
(I can no longer find any documentation for this class, and the current ‘demo’ from Graffiti who now own it doesnt have any example code or help.)

I found my receipt for purchasing it 3/15/2009 :slight_smile: I’ll dig around in my archives and if I find the docs I’ll shoot you a PM.

If you are talking about the customize option in the contextual menu and you want the user selection to persist between sessions I believe you will have to serialize the toolbar state and reload the state at launch. The version I purchased is full source. If yours is too then adding save/load methods should be doable.

Put in a breakpoint to look at the toolbar state when you close the customization window. The toolbar style (Big Icons / Small Icons, etc.) is the “ToolbarStyle” property and there are two arrays “KTBList” which is all the buttons on the toolbar and “KTBButton” which is the buttons being displayed (ie not removed). Between these you can save the state to a preference file and restore it in your initialization of the toolbar on launch.

It is and was.
Ive managed to get something working for ‘visible/not visible’, based on serialising the visible properties of the AvailableButtons array. (KTBList)

Then after setting up the bars in the window open event , I work through the saved preferences - and if a setting exists for a button with the same name, I show/hide it.

The ordering of the buttons seems to require a rebuild of the array , however.
That code is a bit obtuse, so for the moment I have restricted the customisation to simple show/hide until I think of something better

This is something I can certainly add to KillerToolbar. If you’re still using the old version with modern versions of Xojo, you’re probably seeing some major issues by now. I’ve done a lot of work keeping that class current, and honestly don’t get enough bug reports for it.

I thought it was more or less frozen.
Went to the website to see if there were any online docs (I dont seem to have any on-disc ones) and failed to find anything useful other than a compiled demo , which is a bit like buying a car from the brochure.

I have the older version bought with source code, but thankfully I don’t have any issues at all…
I’ve kept it current along the way too.
Although Ive no intention of changing the code for the new framework. (Or ever using the new framework actually)

But back to topic: If no-one else is asking for it, its probably not worth your time adding it to the commercial class.

The documentation that you see is basically what was provided to me as the official documentation when I purchased KillerToolbar all those years ago. I keep meaning to give it some proper documenting, but I’ve dropped the ball. My apologies.

It’s still a worthwhile addition that I think many users will take advantage of. I’m going to evaluate adding this functionality for Release 24 of GraffitiSuite. If you like, I can send you the methods that I create for this after implementation, since it is your request.

Thank you for posting this.