Hi all,
Is it possible to make the main screen (with menu bar) works like a Windows desktop? i.e. users can create his/her own shortcuts (buttons) and can organize them (drag and drop) by themselves?
Tony
Hi all,
Is it possible to make the main screen (with menu bar) works like a Windows desktop? i.e. users can create his/her own shortcuts (buttons) and can organize them (drag and drop) by themselves?
Tony
For MenuBar and MenuItems:
http://documentation.xojo.com/index.php/MenuItem
http://documentation.xojo.com/index.php/MenuBar
For Buttons: you have to place a default one in your window, and then in other buttons, place code to make a clone, set its name, its location, etc.
Get an eye here:
http://documentation.xojo.com/index.php/PushButton
for example.
Or in the developer web site:
http://developer.xojo.com/home
Or in your Xojo IDE help.
I learned recently that many things are doable with Xojo even if nothing can be found in the Language Reference. As an example, how can you remove Column (2) of a ListBox (at application run time) ? Not an easy per se task, but doable.
Yes.
Some hints:
Treat each button as a class, with properties you need to record. It helps to start with an existing class that has as many as you want.
(For example, a canvas already has left, top, width, height, and potentially a backdrop property)
Your class could perhaps add a property to record the action expected when it is clicked upon.
Each new one added , would be a clone of an original button or canvas on screen, created as an array control, with index = 0
Moving them around : see the example project
Canvas Drag Rect Example
Under Examples -> Graphics and Multimedia
When your app closes, iterate through your collection of objects and save the current details to a preferences file or a local database.
Read these back in when the application starts again.
Jeff: a far better answer than mine !
Thanks, I will give it a try. Just want to get one hint: is that I need to draw buttons by myself instead of using generic buttons?
Thanks again.