#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 mLipok)
#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 Changed 3 years ago by mLipok
- Description modified (diff)
- Version changed from 3.3.16.0 to 3.3.15.1
comment:2 follow-up: ↓ 3 Changed 3 years ago by mLipok
comment:3 in reply to: ↑ 2 ; follow-up: ↓ 4 Changed 3 years ago by anonymous
$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
comment:4 in reply to: ↑ 3 ; follow-up: ↓ 5 Changed 3 years ago by 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 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 in reply to: ↑ 4 Changed 3 years ago by anonymous
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 Changed 3 years ago by mLipok
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 Changed 3 years ago by Jpm
Hi,
it was a regression in fixing #2962
The fix has already sent to Jon in March 2021
comment:8 Changed 3 years ago by Jpm
- Owner set to Jpm
- Status changed from new to assigned
Thanks,
Fix sent to Jon
comment:9 follow-up: ↓ 10 Changed 3 years ago by Jon
- Milestone set to 3.3.15.6
- Owner changed from Jpm to Jon
- Resolution set to Fixed
- Status changed from assigned to closed
Fixed by revision [12715] in version: 3.3.15.6
comment:10 in reply to: ↑ 9 Changed 3 years ago by anonymous
comment:11 Changed 3 years ago by Jon
- Milestone changed from 3.3.15.6 to 3.3.16.1
Fixed by revision [12717] in version: 3.3.16.1
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.
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: