Modify

Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#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 by mLipok, 4 years ago

Description: modified (diff)
Version: 3.3.16.03.3.15.1

comment:2 by mLipok, 4 years ago

I checked your bug reports.
It looks like $GUI_DOCKALL works fine
HelpFile:

the control will not move during resizing

Bug or change is in $GUI_DOCKAUTO
HelpFile:

resize and reposition according to new window size

In 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

EndFunc

Smallest 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
Last edited 4 years ago by mLipok (previous) (diff)

in reply to:  2 ; comment:3 by anonymous, 4 years ago

$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:
.....

Last edited 4 years ago by mLipok (previous) (diff)

in reply to:  3 ; comment:4 by mLipok, 4 years ago

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?

Last edited 4 years ago by mLipok (previous) (diff)

in reply to:  4 comment:5 by anonymous, 4 years ago

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 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:6 by mLipok, 4 years ago

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 J-Paul Mesnage, 4 years ago

Hi,
it was a regression in fixing #2962
The fix has already sent to Jon in March 2021

comment:8 by J-Paul Mesnage, 4 years ago

Owner: set to J-Paul Mesnage
Status: newassigned

Thanks,
Fix sent to Jon

comment:9 by Jon, 4 years ago

Milestone: 3.3.15.6
Owner: changed from J-Paul Mesnage to Jon
Resolution: Fixed
Status: assignedclosed

Fixed by revision [12715] in version: 3.3.15.6

in reply to:  9 comment:10 by anonymous, 4 years ago

Replying to Jon:

Fixed by revision [12715] in version: 3.3.15.6

What does this "Fixed" mean? The issue still extists in 3.3.16.0 (or again)

comment:11 by Jon, 4 years ago

Milestone: 3.3.15.63.3.16.1

Fixed by revision [12717] in version: 3.3.16.1

Modify Ticket

Action
as closed The owner will remain Jon.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.