XML tree view with Popups/Combo Boxes for node values

I am using XML files for the project settings in an application I’m building. As these project settings can have many options, I’d like for there to be a simple tree view of them, with popup menus (or in some cases combo boxes) for the values in the node tree.

That is, the user will start a new project and the tree will be populated with default values. But the values can be clicked on, bringing up a popup menu (or in some cases a combo box) of the available choices. These settings would eventually be saved to an XML file representing that project’s settings, and similarly, when a previous project XML file is loaded, it will populate the tree with that project’s values.

Does something like this exist in the form of a plugin we can quickly implement? Here is an example of the kind of thing I’m trying to do:

I see several plugins out there that would handle expanding nodes as in this example, but none that use popups to display a predefined list of options - Some use checkboxes within expanded nodes, which is a clunky way to do this, and really not the correct UI element for what I’m trying to accomplish

Hmm - is this a really out-there request? I’m surprised there have been no responses yet.

I found this, which is kinda similar to what I’m looking for, but it’s not clear to me if this is actively updated (there are still lots of references to RealBasic on the page).

[EDIT: PropertiesListBox does not look like it’s actively updated. The example project comes up with a ton of compile errors. Probably all fixable, but I don’t really want to spend the time debugging that.]

@Jeremie_L may be can answer your questions about this product ?

Thank you @Jean-Yves_Pochez for mentioning me.

PropertyListbox is now open-sourced on Github: GitHub - jkleroy/Xojo-Desktop-PropertyListbox

The project compiles correctly with the latest version of Xojo :slight_smile:

Thanks. I’ll check this out tomorrow.

Thanks for posting this. The images are missing, but I was able to copy the BMP files from the example on your web site, and convert them to PNGs to make it run in the latest release of Xojo. Cool.

Unfortunately, it’s not really what I’m looking for, since it has a lot of specific formatting data inside the XML file (I really want to try to keep the XML as generic as possible).

For example, from PropertyListbox:

              <param type="5" visible="True" required="True">

How would you set a default value for the popup, when the file is loaded?

Ideally what I’d like is something that can read in any old validly formatted XML file and display it, and if there are multiple choices for a given property it will show those. For example, something like this to get the popup in the screenshot above:

            <OutputShape type="popup">
               <Shape>Stretch to fit</Shape>
               <Shape selected="true">Square Pixels</Shape>
               <Shape>4x3 Display</Shape>
               <Shape>16x9 Display</Shape>

I already have an XML file I’ve started to set up for all of these items (as that’s how the project files will be saved). My original plan was that I would load that and use it to populate predefined popup menus, text fields, etc. What I’m hoping to do is find a widget that can load in an XML file, display it as a tree, and if certain nodes are flagged accordingly (type=“popup” in the example above), then it would display as a popup with the Selected element selected. This would also allow for flexibility in effectively changing the UI without having to lay out all the controls manually first. In cases where you might want to adjust camera settings, for example, there could be dozens and dozens of settings and the camera file is already saved as XML. So being able to load it up like this means I can include that in my application without having to use the camera manufacturer’s clunky app to modify templates.

In any case, maybe this just doesn’t exist. Seems like it’d be a really useful thing though, for allowing you to build a set of basic controls in a tree format, from an XML file, and just have it appear in the UI without the XML file having to be specific to the code used to display the tree.