函数参考


_GUICtrlStatusBar_SetMinHeight

设置状态窗口绘图区域最低高度

#Include <GuiStatusBar.au3>
_GUICtrlStatusBar_SetMinHeight($hWnd, $iMinHeight)

参数

$hWnd 控件句柄
$iMinHeight 最低高度像素值

返回值

None.

注意/说明

None.

相关

_GUICtrlStatusBar_GetHeight

示例/演示


#include <GUIConstantsEx.au3>
#include <GuiStatusBar.au3>
#include <WinAPI.au3>

$Debug_SB = False ; 检查传递给函数的类名, 设置为True并输出到一个控件的句柄,用于检查它是否工作

_Main()

Func _Main()

    Local $hGUI, $hStatus
    Local $aParts[3] = [75, 150, -1]

    ; 创建 GUI
    $hGUI = GUICreate("(Example 1) StatusBar Set Min Height", 400, 300)
    $hStatus = _GUICtrlStatusBar_Create($hGUI)
    GUISetState()

    ; Set parts
    _GUICtrlStatusBar_SetParts($hStatus, $aParts)
    _GUICtrlStatusBar_SetText($hStatus, "Part 1")
    _GUICtrlStatusBar_SetText($hStatus, "Part 2", 1)

    ; Set minimum height
    _GUICtrlStatusBar_SetMinHeight($hStatus, 30)

    ; 循环直到用户退出
    Do
    Until GUIGetMsg() = $GUI_EVENT_CLOSE
    GUIDelete()
EndFunc   ;==>_Main