Modify

#1705 closed Bug (No Bug)

Control Resizing before WinMove

Reported by: anonymous Owned by:
Milestone: Component: AutoIt
Version: 3.3.6.1 Severity: None
Keywords: Cc:

Description

I saw like a ticket, but there is not clear what exactly fixed.
In this ticket very clearly shows what the bug.

At the beginning of script I create Form and ListView. Then I resize ListView and then I resize Form and here appears a bug (sizes of ListView returned to the original values).

#include <GuiConstantsEx.au3>

;Opt("GUIResizeMode", $GUI_DOCKALL)

$Form = GUICreate("Form", 300, 300, 0, 0)
GUISetState()

$hListView = GUICtrlCreateListView("ListView", 8, 8, 10, 10)

Sleep(1000)

; --------------- Resizing Listview ------------------
ControlMove($Form, "", $hListView, 8, 8, 200, 200)
;WinMove(GUICtrlGetHandle($hListView), "", 8, 8, 200, 200)
; ----------------------------------------------------

Sleep(1000)

; ------- Resizing Form  -----------
WinMove($Form, "", 0, 0, 600, 600)
; ----------------------------------

; After WinMove sizes of ListView returned to the original values

Do
Until GUIGetMsg() = $GUI_EVENT_CLOSE

Attachments (0)

Change History (5)

comment:1 by hunt, on Jul 7, 2010 at 5:52:00 AM

Hm, I also used _WinAPI_MoveWindow instead WinMove and ControlMove and no Effect!
I do not know what to do in this situation. How do to avoid this bug?

comment:2 by hunt, on Jul 7, 2010 at 7:22:51 AM

Hm, with GuiCtrlSetPos the bug disappears.
This is a bug or not?

in reply to:  2 comment:3 by Jpm, on Jul 13, 2010 at 10:24:28 AM

Replying to hunt:

Hm, with GuiCtrlSetPos the bug disappears.
This is a bug or not?

in fact some situation works with ControlMove or WinMove but GUICtrlSetPos is supposed to handle correctly move for GUI controls. No Bug for me

comment:4 by Jpm, on Jul 13, 2010 at 10:32:16 AM

Resolution: No Bug
Status: newclosed

comment:5 by anonymous, on Dec 12, 2018 at 9:24:56 AM

Got unexpected behavior using ControlMove() on GUI controls too.
Fixed using GUICtrlSetPos().
Maybe this should be stated in documentation.

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.