Quantcast
Channel: WinDev Forum
Viewing all articles
Browse latest Browse all 1914

[WD21]Menu Option Grayed - SOLVED (no replies)

$
0
0
Good day

How will I access a specific menu option to gray it?

The code example is something like this:

MenuName is string
MenuName = EnumMenu("WIN_MAIN", 1) // Read the 1st menu of the windowv MyWindow
WHILE MenuName <> ""
j is int = 1
NameSubMenu is string
NameSubMenu = EnumMenu(MenuName, j) // Read the 1st option of the menu
WHILE NameSubMenu <>""
IF HReadSeekFirst(WMenuAccess,MenuNameMenuIndex,[MenuName,IntegerPart(Val(Replace(NameSubMenu,MenuName+"_","")))]) THEN
IF WMenuAccess.MenuAllowed = False THEN
MenuSelectMinus(NameSubMenu)
ELSE
MenuSelectPlus(NameSubMenu)
END
//MenuName..NameSubMenu..Grayed = WMenuAccess.MenuAllowed
END
j++ // Next option
NameSubMenu = EnumMenu(MenuName, j)
END
i++ // Next menu
MenuName = EnumMenu(MyWindow, i)
END

The MenuSelectPlus or MenuSelectMinus returns an error saying that 'No menu option named ???? was found but it is there.

Thanks in advance

Ericus Steyn

Viewing all articles
Browse latest Browse all 1914

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>