﻿id	summary	reporter	owner	description	type	status	milestone	component	version	severity	resolution	keywords	cc
1116	GUICtrlCreateGraphic not obeying GUIResizeMode	anonymous	Jpm	"GUICtrlCreateGraphic is not obeying AutoItSetOption(""GUIResizeMode"", $GUI_DOCKALL). The following script will demonstrate this issue.  Click its 'Toggle Width' button
repeatidly to see the effect.  The ""Exit"" button stays where it was placed, $button_the GUICtrlCreateGraphic shifts left and right when the button is clicked.


{{{
#include <GUIConstantsEx.au3>

$sTitle = ""GUICtrlCreateGraphic Doesn't Obey Resize""
$iRed = 0xff0000
$iBlue = 0x0000ff

GUICreate($sTitle, 230, 270)
;;  The following has no effect on GUICtrlCreateGraphic()
AutoItSetOption(""GUIResizeMode"", $GUI_DOCKALL)
;;
$gr1 = GUICtrlCreateGraphic(10, 10, 100, 100)
GUICtrlSetColor(-1, $iBlue)
;;
$gr2 = GUICtrlCreateGraphic(120, 10, 100, 100)
GUICtrlSetColor(-1, $iRed)
;;
$iButton = GUICtrlCreateButton(""Toggle Width"", 10, 120, 100, 20)
$iExit = GUICtrlCreateButton(""Exit"", 130, 120, 80, 20)
;;
$iLabel = GUICtrlCreateLabel(""Click the Toggle Width button"" &@LF& ""a few times."", 40, 150, 200, 50)
$iLabe2 = GUICtrlCreateLabel(""GUICtrlCreateGraphic objects 'resize' even"" &@LF& ""though option GUIResizeMode"" &@LF& ""$GUI_DOCKALL is set to"" &@LF& ""$GUI_DOCKALL.  Other controls okay."", 10, 200, 210, 70)

GUISetState(@SW_SHOW)

$iSize = 1
While 1
  $iMsg = GUIGetMsg()
  Switch $iMsg
    Case $GUI_EVENT_CLOSE
      ExitLoop
    Case $iExit
      ExitLoop
    Case $iButton
      $a1 = WinGetPos($sTitle, """")
      If $iSize = 1 Then
        WinMove($sTitle, """", $a1[0], $a1[1], 150, $a1[3])
        GUICtrlSetData($iLabel, ""The Red Graphic"" & @LF & ""Window Moved."" & @LF & ""So did the Blue."")
        GUICtrlSetColor($iLabel, $iRed)
        $iSize = 2
      Else
        WinMove($sTitle, """", $a1[0], $a1[1], 230, $a1[3])
        GUICtrlSetData($iLabel, ""Click the Toggle Width button"" &@LF& ""a few times."")
        GUICtrlSetColor($iLabel, -1)
        $iSize = 1
      EndIf
  EndSwitch
WEnd
}}}
"	Bug	closed	3.3.1.2	AutoIt	3.3.0.0	None	Fixed		
