Robert,
I had jumped to the XML solution before I got to the end of your query.
It is ideal for tree structured data.
I've just completed a user interface editor (for embedded software using
a touch screen interface) where the menu structures (menus, groups,
buttons, handlers, positions) are all stored as XML. The code to load
and store the structures from XML is very straightforward, and the "X"
nature makes it easy to build up progressively as you develop the
requiremetns and application.
I've just had to add unique ids to the positions to allow them to be
activated programmatically, and I could do it without breaking any of
the existing data files.

This approach allwows the look and feel of our application to be changed
with no changes to the software.

Regards,
Ken

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Robert Meek
Sent: 26 December 2005 14:16
To: [email protected]
Subject: Storing dynamically built menus


        I'm trying something new in my interfaces.  I have a kind of
control bar with individual buttons having both text and a glyph on each
one and set up to form a vertical toolbar.  Each button when clicked
opens up a dropdown list which is basically a popup menu control.  The
user can then add items by name to each dropdown list which the
application automatically assigns a common event to.  The common event
reads the menu item's name to distinguish how and what it accomplishes.
This much is quite easy and I've done it before storing the item list as
a dat file and loading it into a TStringList which the application reads
at startup to re-build the dropdown list as it last was.  But now I want
to allow the user to add submenu items to any dropdown item, and in turn
add third level submenu items to any of them, and then forth level
submenu items to any of them, and so on building a kind of tree view
arrangement a lot like window's own Programs menu.
        So what I'm looking for is a way to best store this menu
structure so that it can easily be reloaded, edited, and saved when ever
necessary. I've used a dB table hooked up to a dBTreeview to handle this
type of storage before, but for this I was thinking of xml.  Has anyone
else written a structure like this to an xml file?  

from Robert Meek dba Tangentals Design



_______________________________________________
Delphi mailing list -> [email protected]
http://www.elists.org/mailman/listinfo/delphi

_______________________________________________
Delphi mailing list -> [email protected]
http://www.elists.org/mailman/listinfo/delphi

Reply via email to