quote:
Originally posted by whiz
Alright, how about this: dynamically add/edit/remove menu items in a MenuButtonControl (maybe in a similar way to OnGetScriptMenu() with the script menu).
I made
that same request before, but I still think this should get more attention. There are many controls which you can define in the interface XML but which can't easily be accessed from the script afterwards.
Take MenuButtonControls for instance: in Countdown Live, I wanted the menu entry labels to be changed while the window was opened. Nothing fancy, I just needed translations to be reloaded without re-opening windows. To get around the missing support, I had to completely recreate the menu button functionality: using a standard button control instead, creating a menu through the Windows API and then positioning the menu beneath the button. This works perfectly (it even gives additional features such as check marks and icons) but it's not something an average script developer would want to go through.
Talking about the Windows API: perhaps Plus! should provide easier access to some standard controls which can now only be accessed through the Windows API. I can imagine a beginning developer writing his first script getting headaches from working with the API when he wants to add a DateTimeControl, TreeViewControl or ProgressControl to his first window. Of course, the Windows API handles everything and it might be a bit silly if we were to wrap each and every API function or message in a Plus! script method, but still I think this should be considered. Should we expect scripters to learn working with Interop and the Windows API or should we make commonly used methods easier to access?