Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#1414 closed Bug (No Bug)

_GUICtrlButton_SetSize bug when restoring window

Reported by: 403forbidden403@… Owned by:
Milestone: Component: AutoIt
Version: Severity: None
Keywords: _GUICtrlButton_SetSize Restore Cc:


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)


_GUICtrlButton_SetSize($Button_Big, 300, 100)

While 1
	$Msg = GUIGetMsg()
	Switch $Msg

AutoIt:   (Os:WIN_7/X86   Language:0409 Keyboard:00000409 Cpu:X86)

Attachments (0)

Change History (3)

comment:1 Changed 14 years ago by PsaltyDS

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:

Global $Button_Big = _GUICtrlButton_Create($Form, "Minimize and restore window to see", 8, 8, 219, 225)

comment:2 Changed 14 years ago by Valik

  • Resolution set to No Bug
  • Status changed from new to closed

Psalty is correct. Moving native controls with anything but GUICtrlSetPos() is not supported and will lead to bugs.

comment:3 Changed 14 years ago by Jpm

perhaps we have to change the doc example which is using GUICtrlCreateEdit()

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

as closed The ticket will remain with no owner.

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

Note: See TracTickets for help on using tickets.