Jump to content

Search the Community

Showing results for tags 'Center'.

  • 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 6 results

  1. Hello Forum, I'm trying to vertically center text in label controls, but no way. The search on the forum returns no result, or I don't search the right way When I insert a button and a label of same size close to each other, the text is centered on the button, but top aligned on the label, or edit. Which doesn't look really aesthetic Any idea is welcome Thanks in advance, Thoms
  2. Hello. I've got a problem. I want to center my input vertically, but I don't have any single idea how to do it. There's my example code: #include <GUIConstantsEx.au3> $GUI = GUICreate("Gui", 237, 93, 192, 124) $Input1 = GUICtrlCreateInput("Center vertically isn't correct", 16, 16, 201, 62) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd What could I do? Greetings, "genotypek".
  3. Multi-monitor aware window centring function. Can handle various work area setups as outlined below: Those are the variants I've tested. #include <Math.au3> #include <WinAPI.au3> #include <WinAPIConstants.au3> #include <WinAPIGdi.au3> #include <WinAPISys.au3> #include <WindowsConstants.au3> Func activeWindowCenter() Const $window = WinGetHandle('[ACTIVE]') Const $monitorInfo = _WinAPI_GetMonitorInfo(_WinAPI_MonitorFromWindow($window)) Const $area[] = [DllStructGetData($monitorInfo[1], 1), DllStructGetData($monitorInfo[1], 3), DllStructGetData($monitorInfo[1], 2), DllStructGetData($monitorInfo[1], 4)] Const $size = WinGetPos($window) If @error Then Return EndIf If BitAND(_WinAPI_GetWindowLong($window, $GWL_STYLE), $WS_MAXIMIZE) Then Return EndIf Const $areaWidth = _Max($area[0], $area[1]) - _Min($area[0], $area[1]) Const $windowOffsetX = ($areaWidth - $size[2]) / 2 Const $x = _Min($area[0], $area[1]) + $windowOffsetX Const $areaHeight = _Max($area[2], $area[3]) - _Min($area[2], $area[3]) Const $windowOffsetY = ($areaHeight - $size[3]) / 2 Const $y = _Min($area[2], $area[3]) + $windowOffsetY WinMove($window, '', $x, $y, $size[2], $size[3], 2) EndFunc Here's simple usage: ; include the definition HotKeySet('#o', 'activeWindowCenter') While 1 Sleep(1000) WEnd
  4. I would like to center the text on a Group box (GUICtrlCreateGroup()) along its top horizontal line, but I can't find any examples of this. Can this be done? Example script: #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <EditConstants.au3> Example() Func Example() Local $flags = 0, $iMsg = 0 GUICreate("My GUI group") $flags = BitOR($flags, $WS_THICKFRAME) $flags = BitOR($flags, $ES_CENTER) GUICtrlCreateGroup("Group 1", 10, 20, 190, 140, $flags) ; I want to cnter "Group 1" GUICtrlCreateRadio("Radio 1", 20, 50, 50, 20) GUICtrlCreateRadio("Radio 2", 20, 70, 60, 50) GUICtrlCreateGroup("", -99, -99, 1, 1) GUISetState(@SW_SHOW) ; Loop until the user exits. While 1 $iMsg = GUIGetMsg() If $iMsg = $GUI_EVENT_CLOSE Then ExitLoop WEnd EndFunc ;==>Example
  5. Hello, I am currently using this code: Func StatusIndicator($sStatus, $sSize = 8.5, $hParent = 0) ; Function for my program, feel free to use it $aDimensions = _StringSize($sStatus, $sSize) $hGUI = GUICreate("", 50 + $aDimensions[2], 50 + $aDimensions[3], -1, -1, $WS_POPUP, -1, $hParent) GUISetBkColor(0xFFFFFF) $hLabel = GUICtrlCreateLabel($sStatus, (50 + $aDimensions[2]) / 2, (50 + $aDimensions[3]) / 2, $aDimensions[2], $aDimensions[3]) GUISetState() While 1 WEnd EndFuncI cant get $hLabel centered in the GUI, I don't know what's wrong Thanks in advance, TD
  6. Hey Guys i just want to know how can i start pixel search by middle of screen or window ? thanks
×
×
  • Create New...