Opened 3 years ago

Last modified 2 years ago

#3877 closed Bug

$GUI_ONTOP hides the control when already on top — at Version 1

Reported by: Nine Owned by:
Milestone: 3.3.16.1 Component: AutoIt
Version: 3.3.16.0 Severity: None
Keywords: Cc:

Description (last modified by mLipok)

Setting the button to $GUI_ONTOP makes it disappear :

#include <GUIConstants.au3>

Local $hGUI = GUICreate("Example", 300, 200, -1, -1, BitOR($WS_POPUP, $WS_BORDER))
GUISetBkColor(0xC0C0C0)

Local $idLabel = GUICtrlCreateLabel("", 0, 0, 300, 200, Default, $GUI_WS_EX_PARENTDRAG)

Local $idClose = GUICtrlCreateButton("Close", 210, 170, 85, 25)
GUICtrlSetState(-1, $GUI_ONTOP)

GUISetState()

While True
  Switch GUIGetMsg()
    Case $GUI_EVENT_CLOSE, $idClose
      ExitLoop
    Case $idLabel
      ConsoleWrite("Label" & @CRLF)
  EndSwitch
WEnd

Giving focus ($GUI_FOCUS) to the button is a workaround, but when GUI has hundred controls it is hardly viable.

Change History (1)

comment:1 Changed 3 years ago by mLipok

  • Description modified (diff)
Note: See TracTickets for help on using tickets.