|
294 | Koda | Application | Bug Report | Medium | Adding context menu to an icon error in on event mode | Assigned | Martin Gibson | 29.05.2011 |
Task Description
Using On Event mode, if you add a context menu to an icon there is an error in the code generated. The code for the menus is inserted between the code for the icon and the code for the onclick definition for the icon
$IconBox = GUICtrlCreateIcon("shell32.dll", -10, 748, 223, 34, 34, BitOR($GUI_SS_DEFAULT_ICON,$SS_SUNKEN))
GUICtrlSetResizing(-1, $GUI_DOCKRIGHT+$GUI_DOCKTOP+$GUI_DOCKWIDTH+$GUI_DOCKHEIGHT)
GUICtrlSetTip(-1, "Create a containing rectangle")
$IconBoxcontext = GUICtrlCreateContextMenu($IconBox)
$MenuAskMargins = GUICtrlCreateMenuItem("Always ask for the margins", $IconBoxcontext)
GUICtrlSetOnEvent(-1, "MenuAskMarginsClick")
$MenuFixedMargins = GUICtrlCreateMenuItem("Use the set margins", $IconBoxcontext)
GUICtrlSetOnEvent(-1, "MenuFixedMarginsClick")
$MenuSetMargins = GUICtrlCreateMenuItem("Set the container margins", $IconBoxcontext)
GUICtrlSetOnEvent(-1, "MenuSetMarginsClick")
$MenuRemoveBox = GUICtrlCreateMenuItem("delete the Container", $IconBoxcontext)
GUICtrlSetOnEvent(-1, "MenuRemoveBoxClick")
GUICtrlSetOnEvent(-1, "IconBoxClick") ;<---------------------------------this line should be before CreateContextMenu line
|