• Status Assigned
  • Percent Complete
    0%
  • Task Type Bug Report
  • Category Application
  • Assigned To
    Admin
  • Operating System All
  • Severity Medium
  • Priority Very Low
  • Reported Version 1.7.3.0
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Koda
Opened by Martin Gibson - 29.05.2011

FS#294 - Adding context menu to an icon error in on event mode

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
Martin Gibson commented on 29.05.2011 23:14

But if you set the Generate code option to 'variables instead "-1" where possible' then it is no longer a problem.

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing