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 mLipok)

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 J-Paul Mesnage, on Mar 22, 2024 at 12:53:53 PM

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)

comment:2 by J-Paul Mesnage, on Mar 23, 2024 at 11:18:41 AM

Resolution: Completed
Status: newclosed

Doc updated

comment:3 by mLipok, on Mar 28, 2024 at 7:12:43 PM

Description: modified (diff)

Modify Ticket

Action
as closed The ticket will remain with no owner.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.