Opened 2 years ago

Last modified 22 months ago

#3877 closed Bug

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

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

Description

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 (0)

Note: See TracTickets for help on using tickets.