Modify ↓
      
        Opened 16 years ago
Closed 16 years ago
#1116 closed Bug (Fixed)
GUICtrlCreateGraphic not obeying GUIResizeMode
| Reported by: | anonymous | Owned by: | Jpm | 
|---|---|---|---|
| Milestone: | 3.3.1.2 | Component: | AutoIt | 
| Version: | 3.3.0.0 | Severity: | None | 
| Keywords: | Cc: | 
Description
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
    Attachments (0)
Change History (1)
comment:1 Changed 16 years ago by Jpm
- Milestone set to 3.3.1.2
- Owner set to Jpm
- Resolution set to Fixed
- Status changed from new to closed
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.
Note: See
        TracTickets for help on using
        tickets.
    

Fixed in version: 3.3.1.2