Modify

#3095 closed Bug (No Bug)

Resizing GUI Controls before showing GUI

Reported by: DutchCoder Owned by:
Milestone: Component: AutoIt
Version: 3.3.14.0 Severity: None
Keywords: Cc:

Description (last modified by guinness)

A little change detected in Window handling since 3.3.12.0

ReSizing GUI Controls works only now after showing the GUI.
Work Around is simple: Show the Window first before WinMove(), but works different than before.

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

$GUI = GUICreate("Exapmle", 200, 200, -1, -1, BitOR($GUI_SS_DEFAULT_GUI, $WS_SIZEBOX, $WS_MAXIMIZEBOX))
$Edit = GUICtrlCreateEdit("Text", 5, 5, 190, 190)
GUICtrlSetResizing(-1, $GUI_DOCKBOTTOM + $GUI_DOCKTOP + $GUI_DOCKLEFT + $GUI_DOCKRIGHT)

WinMove($GUI, "", 100, 100, 300, 300)
GUISetState(@SW_SHOW)

While 1
	Switch GUIGetMsg()
		Case -3
			ExitLoop
	EndSwitch
WEnd

GUIDelete($GUI)
Exit

Attachments (0)

Change History (5)

comment:1 by guinness, on Jul 27, 2015 at 9:03:41 AM

Description: modified (diff)

comment:2 by guinness, on Jul 27, 2015 at 9:04:02 AM

Please pay attention to how you append code to a ticket. I have amended your ticket this time.

comment:3 by J-Paul Mesnage, on Jul 27, 2015 at 12:11:59 PM

In fact there is a Note on this subject in GUICreate()

Note: The handle returned from this function is a real windows handle, which means it can be used in the same way as the result of WinGetHandle().
WinMove() use before GuiSetState() to change GUI window size will not change the position/resizing of defined Controls.

perhaps it could be good to duplicate it on GUISetState() and GUICtrlSetResizing()

comment:4 by DutchCoder, on Jul 27, 2015 at 4:07:01 PM

Perfect. As for me this issue can be ignored as a bug.

comment:5 by J-Paul Mesnage, on Jul 28, 2015 at 5:22:38 AM

Resolution: No Bug
Status: newclosed

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.