Jump to content

Search the Community

Showing results for tags 'Label Tab Resize'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 1 result

  1. Can anyone get this red label to position itself correctly on resizing the GUI? #include <WindowsConstants.au3> #include <GUIConstantsEx.au3> #include <GuiTab.au3> #include <MsgBoxConstants.au3> #include <Array.au3> Opt('GUIResizeMode', 1) ; see GUICtrlSetResizing ;GUIRegisterMsg($WM_SIZE, '_WM_RESIZE') ;GUIRegisterMsg($WM_SIZING, '_WM_RESIZE') Global $hTab Global $hCoverLabel Example() Func Example() Local $aRect, $sRect, $hTab ; Create GUI GUICreate("Tab Control Get Display Rect", 400, 300, -1, -1, $WS_SIZEBOX + $WS_SYSMENU + $WS_MINIMIZEBOX + $WS_MAXIMIZEBOX + $WS_CAPTION + $WS_POPUP) $hTab = GUICtrlCreateTab(10, 10, 380, 280) GUICtrlSetResizing(-1, $GUI_DOCKAUTO) GUISetState(@SW_SHOW) ; Add tabs GUICtrlCreateTabItem("Tab 0") GUICtrlSetResizing(-1, $GUI_DOCKAUTO) GUICtrlCreateTabItem("") GUICtrlCreateTabItem("Tab 1") GUICtrlSetResizing(-1, $GUI_DOCKAUTO) GUICtrlCreateTabItem("") GUICtrlCreateTabItem("Tab 2") GUICtrlSetResizing(-1, $GUI_DOCKAUTO) GUICtrlCreateTabItem("") ; Get empty tab display rectangle Local $aRect1 = _GUICtrlTab_GetItemRect($hTab, 2); xul, yul, xlr, ylr Local $aRect2 = _GUICtrlTab_GetDisplayRect(GUICtrlGetHandle($hTab)); xul, yul, xlr, ylr ;_ArrayDisplay($aRect1) ;_ArrayDisplay($aRect2) $hCoverLabel = GUICtrlCreateLabel('', $aRect1[2] + 10, 10, ($aRect2[0] + $aRect2[2]) - $aRect1[2], $aRect2[1]) GUICtrlSetBkColor(-1, '0x00ff0000') ; Loop until the user exits. Do Until GUIGetMsg() = $GUI_EVENT_CLOSE GUIDelete() EndFunc ;==>Example Func _WM_RESIZE($hWnd, $iMsg, $iwParam, $ilParam) ; resizes control when interface resizing Local $aRect1 = _GUICtrlTab_GetItemRect($hTab, 2) Local $aRect2 = _GUICtrlTab_GetDisplayRect(GUICtrlGetHandle($hTab)) GUICtrlSetPos($hCoverLabel, $aRect1[2] + 10, 10, ($aRect2[0] + $aRect2[2]) - $aRect1[2], $aRect2[1]) GUICtrlSetBkColor(-1, 0x00ff0000) Return EndFunc ;==>_WM_RESIZE
×
×
  • Create New...