Opened on Mar 8, 2022 at 12:46:19 PM
Closed on May 2, 2022 at 3:31:34 PM
Last modified on May 16, 2022 at 2:30:38 PM
#3865 closed Bug (Fixed)
Image Control resizing behave as forced $GUI_DOCKWIDTH and $GUI_DOCKHEIGHT
| Reported by: | anonymous | Owned by: | Jon |
|---|---|---|---|
| Milestone: | 3.3.16.1 | Component: | AutoIt |
| Version: | 3.3.15.1 | Severity: | None |
| Keywords: | GUICtrlSetResizng, GUICtrlCreatePic | Cc: |
Description (last modified by )
#include <GUIConstants.au3> #include <WindowsConstants.au3> Test() Func Test() GUICreate("My GUI picture", 350, 300, -1, -1, BitOR($WS_CAPTION, $WS_SIZEBOX + $WS_SYSMENU)) ; will create a dialog box that when displayed is centered GUICtrlCreatePic('C:\Program Files (x86)\AutoIt3\Examples\GUI\logo4.gif', 10, 10, 330, 280) GUICtrlSetResizing(-1, $GUI_DOCKALL) GUISetState(@SW_SHOW) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE, -3 ExitLoop EndSwitch WEnd EndFunc
Attachments (0)
Change History (11)
comment:1 by , on Mar 8, 2022 at 2:39:36 PM
| Description: | modified (diff) |
|---|---|
| Version: | 3.3.16.0 → 3.3.15.1 |
follow-up: 3 comment:2 by , on Mar 8, 2022 at 2:52:37 PM
follow-up: 4 comment:3 by , on Mar 9, 2022 at 11:23:18 AM
$GUI_DOCKALL should resize the picture and keep the distance to all sides the same.
$GUI_DOCKAUTO should also resize the picture, relative to the GUI size. (distance to the sides would relatively grow/shrink)
Replying to mLipok:
I checked your bug reports.
It looks like $GUI_DOCKALL works fine
HelpFile:
the control will not move during resizingBug or change is in $GUI_DOCKAUTO
HelpFile:
resize and reposition according to new window sizeIn Au3.3.15.0 it works fine.
Starting from Au3.3.15.1 it is not resizing, only repositioning.
My testing script:
#AutoIt3Wrapper_AutoIt3Dir="z:\AutoItPortable\AutoIt_3_3_15_0" ;~ #AutoIt3Wrapper_AutoIt3Dir="z:\AutoItPortable\AutoIt_3_3_15_1" #AutoIt3Wrapper_UseX64=n #include <GUIConstants.au3> #include <WindowsConstants.au3> Test() Func Test() GUICreate(@AutoItVersion, 350, 300, -1, -1, BitOR($WS_CAPTION, $WS_SIZEBOX + $WS_SYSMENU)) ; will create a dialog box that when displayed is centered ;~ GUICtrlCreateButton("text", 10, 10, 330, 280) GUICtrlCreatePic("z:\AutoItPortable\App\Examples\GUI\logo4.gif", 10, 10, 330, 280) ;~ GUICtrlCreatePic("C:\Program Files (x86)\AutoIt3\Examples\GUI\logo4.gif", 10, 10, 330, 280) ;~ GUICtrlSetResizing(-1, $GUI_DOCKALL) GUICtrlSetResizing(-1, $GUI_DOCKAUTO) GUISetState(@SW_SHOW) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE, -3 ExitLoop EndSwitch WEnd EndFuncSmallest repro:
#include <GUIConstants.au3> Test() Func Test() GUICreate(@AutoItVersion, 350, 300, -1, -1, BitOR($WS_CAPTION, $WS_SIZEBOX + $WS_SYSMENU)) GUICtrlCreatePic("C:\Program Files (x86)\AutoIt3\Examples\GUI\logo4.gif", 10, 10, 330, 280) GUICtrlSetResizing(-1, $GUI_DOCKAUTO) GUISetState(@SW_SHOW) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE, -3 ExitLoop EndSwitch WEnd EndFunc
follow-up: 5 comment:4 by , on Mar 9, 2022 at 2:15:07 PM
Replying to anonymous:
$GUI_DOCKALL should resize the picture and keep the distance to all sides the same.
Why you think that should resize the picture ?
Documentatin says:
$GUI_DOCKALL 802 (2+32+256+512) so the control will not move during resizing
To clarify I will add
$GUI_DOCKALL 802 (2+32+256+512) so the control will not change (move/resize) during window resizing
Is it clear now?
comment:5 by , on Mar 10, 2022 at 8:23:20 AM
Your're right, I Meant $GUI_DOCKBORDERS
#include <GUIConstants.au3>
#include <WindowsConstants.au3>
Test()
Func Test()
GUICreate("My GUI picture", 350, 300, -1, -1, BitOR($WS_CAPTION, $WS_SIZEBOX + $WS_SYSMENU)) ; will create a dialog box that when displayed is centered
GUICtrlCreateLabel("", 10, 10, 330, 280)
GUICtrlSetBkColor(-1, 0xF07F7F)
GUICtrlSetResizing(-1, $GUI_DOCKBORDERS)
GUICtrlCreatePic('C:\Program Files (x86)\AutoIt3\Examples\GUI\logo4.gif', 15, 15, 320, 270)
GUICtrlSetResizing(-1, $GUI_DOCKBORDERS)
GUISetState(@SW_SHOW)
While 1
Switch GUIGetMsg()
Case $GUI_EVENT_CLOSE, -3
ExitLoop
EndSwitch
WEnd
EndFunc
Replying to mLipok:
Replying to anonymous:
$GUI_DOCKALL should resize the picture and keep the distance to all sides the same.
Why you think that should resize the picture ?
Documentatin says:
$GUI_DOCKALL 802 (2+32+256+512) so the control will not move during resizingTo clarify I will add
$GUI_DOCKALL 802 (2+32+256+512) so the control will not change (move/resize) during window resizingIs it clear now?
comment:6 by , on Mar 10, 2022 at 2:57:47 PM
Ok.
Now I agree that $GUI_DOCKBORDERS but also $GUI_DOCKAUTO works wrong.
The issue occurs in case GUICtrlCreatePic was used to create the control, but there is no problem with controls created by: GUICtrlCreateButton.
It starts on AutoIt 3.3.15.1
comment:7 by , on Mar 23, 2022 at 4:42:45 PM
Hi,
it was a regression in fixing #2962
The fix has already sent to Jon in March 2021
comment:8 by , on Apr 8, 2022 at 4:35:54 PM
| Owner: | set to |
|---|---|
| Status: | new → assigned |
Thanks,
Fix sent to Jon
follow-up: 10 comment:9 by , on May 2, 2022 at 3:31:34 PM
| Milestone: | → 3.3.15.6 |
|---|---|
| Owner: | changed from to |
| Resolution: | → Fixed |
| Status: | assigned → closed |
Fixed by revision [12715] in version: 3.3.15.6
comment:11 by , on May 16, 2022 at 2:30:38 PM
| Milestone: | 3.3.15.6 → 3.3.16.1 |
|---|
Fixed by revision [12717] in version: 3.3.16.1

I checked your bug reports.
It looks like $GUI_DOCKALL works fine
HelpFile:
Bug or change is in $GUI_DOCKAUTO
HelpFile:
In Au3.3.15.0 it works fine.
Starting from Au3.3.15.1 it is not resizing, only repositioning.
My testing script:
Smallest repro: