Menus and VISIBLE property (OpenInsight 32-Bit)
At 25 MAY 2006 03:12:07PM Richard Hunt wrote:
Using OI version 7.1.1, it seems that the visible property will return the position of the form's menu item, rather than, what I was expecting, the visible status or value. So it becomes rather difficult to disable visiblity and restore visiblity.
Is this an intended result?
Second… Is it ok to use the "SEND_MESSAGE" messages "MENU_INSERT" and "MENU_DELETE"? Are there any licensing restrictions? I ask because I do not see these items in the "HELP".
At 25 MAY 2006 06:32PM Gerald Lovel wrote:
When I experimented with this, making a menu item invisible and then making it visible was vewwy baad; I think the menu popup got reordered in the process.
Here are my menu handling guidelines: Items outside of the user's access privilege are deleted from the menu STRUCT before the menu is displayed. Items which are currently non-functional but permitted in general are grayed out through dynamic menu routines at display time. (Remember to reenable all menu items afterward, so that the disable is only temporary.) Nothing gets inserted into a menu once a menu is displayed for reasons you note.
Gerald
At 25 MAY 2006 07:59PM Warren Auyong wrote:
My understanding is "MENU_INSERT" is a no-no except during design/development. Thus you cannot build a menu on-the-fly by adding items. You can delete items from a menu, just not add them during code execution.
There have been many heated and not so heated threads on this subject in the past.
There are third party tools available.
At 25 MAY 2006 08:20PM Gerald Lovel wrote:
So if MENU_INSERT is only valid during development, what use is it really? MenuStruct=Get_Property(@Window:".MENU","ORIG_STRUCT") or MenuStruct=Start_Window(…) followed by DESTROY and CREATE is another approach which would be safer if you could only figure out how to handle the menu tree …but maybe I shouldn't talk about that …