Modify ↓
#3984 closed Bug (Completed)
GUICtrlSetGraphic stops working after Sleep
| Reported by: | Nine | Owned by: | |
|---|---|---|---|
| Milestone: | Component: | AutoIt | |
| Version: | 3.3.16.1 | Severity: | None |
| Keywords: | Cc: |
Description (last modified by )
As title says, only first circle is displayed. But if you remove the Sleep line in the loop, all 5 circles are displayed as intented...
#include <GUIConstants.au3> Local Const $size = 10, $xPos = 20, $yPos = 50, $Colour = "0x21FA06" GUICreate("Example", 300, 300) GUISetState() GUICtrlCreateGraphic(0, 0, 300, 300) GUICtrlSetGraphic(-1, $GUI_GR_COLOR, $Colour, $Colour) For $i = 0 To 4 GUICtrlSetGraphic(-1, $GUI_GR_ELLIPSE, $xPos + (($i + 1) * $size * 1.3), $yPos, $size, $size) Sleep(500) ConsoleWrite($i & @CRLF) Next Do Until GUIGetMsg() = $GUI_EVENT_CLOSE
Attachments (0)
Change History (3)
comment:1 by , 2 years ago
comment:3 by , 2 years ago
| Description: | modified (diff) |
|---|
Note:
See TracTickets
for help on using tickets.

Sorry for the delay,
In fact GUICtrlSetGraphic does not refresh after function that change the process of hangling interaction with the window just add a GUICtrlSetGraphic(-1, $GUI_GR_REFRESH) after Sleep(500)