Modify

Opened 12 months ago

Closed 9 months ago

Last modified 9 months ago

#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 Changed 9 months ago by Jpm

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 Changed 9 months ago by Jpm

  • Resolution set to Completed
  • Status changed from new to closed

Doc updated

comment:3 Changed 9 months ago by mLipok

  • Description modified (diff)

Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Modify Ticket

Action
as closed The ticket will remain with no owner.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.