The 'disabled' attribute for StartMenuCommand & StartMenuGroup doesn't seem to work. There is one called 'hidden' (undocumented) which works, but we really want to grey-out options which aren't available to the user.
I'm not able to reproduce the issue, 'disabled' attribute works on my side.
What version of Genero are you using?
BDL is 2.11.03 and GDC is 2.11.05.
Attached example shows code, GDC and debug tree.
It seems to be because we are using a 'tree' menu. With a 'menu' menu it works. Is this a feature of tree menus, or can this be changed?
This is a bug when the StartMenu is displayed as treeview. When displayed as a pull-down menu ("menu") or as a treeview in a popup window ("poptree") it's working.
I've registered it as bug #Bz.11532.
Sorry for the inconvenience and thanks for reporting.
By accident, I have noticed that this can be made to work by adding in "CALL ui.Interface.Refresh()" after the StartMenu is first created or during it's creation (ie in a FOR loop). It doesn't work if the refresh comes after the build of the StartMenu has finished.
Yes, this is "expected" (understand: the code in the product reflects this behavior, and of course there is a bug):
the code to manage the attribute "disabled" in the StartMenu is there and is working. What is not working is the code which applies the attribute at the widget creation. So when creating the StartMenu as tree, we don't apply the attribute, but later on when you modify the attribute, it is applyed.
So the workaround is expected to work - you can use it safely (if there is no side effect) until the fixed version comes out.