Modify ↓
Opened on Jan 16, 2010 at 10:19:29 PM
Closed on Jan 19, 2010 at 2:37:20 AM
Last modified on Jan 20, 2010 at 11:30:02 AM
#1414 closed Bug (No Bug)
_GUICtrlButton_SetSize bug when restoring window
| Reported by: | Owned by: | ||
|---|---|---|---|
| Milestone: | Component: | AutoIt | |
| Version: | 3.3.3.3 | Severity: | None |
| Keywords: | _GUICtrlButton_SetSize Restore | Cc: |
Description
In any situation, if you create a button and then change the size of it using the _GUICtrlButton_SetSize function, it works fine until you minimize and restore the window. After the window is restored, the button returns to it's original size.
#include <GUIConstantsEx.au3>
#include <GuiButton.au3>
Global $Form = GUICreate("Test", 314, 293, 241, 152)
Global $Button_Big = GUICtrlCreateButton("Minimize and restore window to see", 8, 8, 219, 225)
GUISetState(@SW_SHOW)
Sleep(2500)
_GUICtrlButton_SetSize($Button_Big, 300, 100)
While 1
$Msg = GUIGetMsg()
Switch $Msg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
AutoIt:3.3.3.3 (Os:WIN_7/X86 Language:0409 Keyboard:00000409 Cpu:X86)
Attachments (0)
Change History (3)
comment:2 by , on Jan 19, 2010 at 2:37:20 AM
| Resolution: | → No Bug |
|---|---|
| Status: | new → closed |
Psalty is correct. Moving native controls with anything but GUICtrlSetPos() is not supported and will lead to bugs.
comment:3 by , on Jan 20, 2010 at 11:30:02 AM
perhaps we have to change the doc example which is using GUICtrlCreateEdit()
Note:
See TracTickets
for help on using tickets.

If you are going to mess around with the control using the UDFs, then in general, create the control with the UDFs also. Changing the button creation to this avoids the issue: