Function Reference

_GUICtrlListView_GetItemSpacingY

コントロール内のアイテム間の縦の間隔を取得します。

#Include <GuiListView.au3>
_GUICtrlListView_GetItemSpacingY($hWnd[, $fSmall = False])

 

パラメータ

$hWnd コントロールのハンドル
$fSmall [オプション]どちら表示のアイテム間の間隔を取得するかを指定します:
 True - スモールアイコン表示
False - アイコン表示

 

返し値

縦の間隔を返します。

 

注意

なし。

 

関連

_GUICtrlListView_GetItemSpacing

 


#AutoIt3Wrapper_au3check_parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6
#include <GuiConstantsEx.au3>
#include <GuiListView.au3>

Opt('MustDeclareVars', 1)

$Debug_LV = False ; ListView関数に渡されるClassNameを調べる。動作を確認するにはTrueを設定し、他のコントロールのハンドルを使用

_Main()

Func _Main()
    Local $iX, $iY, $hListView
   
    GUICreate("ListView Get Item Spacing Y", 400, 300)
    $hListView = GUICtrlCreateListView("", 2, 2, 394, 268)
    GUISetState()

    ; 列を追加
    _GUICtrlListView_AddColumn($hListView, "Items", 100)

    ; アイテムを追加
    _GUICtrlListView_AddItem($hListView, "Item 1")
    _GUICtrlListView_AddItem($hListView, "Item 2")
    _GUICtrlListView_AddItem($hListView, "Item 3")

    ; アイテム間のスペースを表示
    $iX = _GUICtrlListView_GetItemSpacingX($hListView)
    $iY = _GUICtrlListView_GetItemSpacingY($hListView)
    MsgBox(4160, "Information", StringFormat("Item Spacing: X=%d, Y=%d", $iX, $iY))

    ; ユーザーが終了するまでループ
    Do
    Until GUIGetMsg() = $GUI_EVENT_CLOSE
    GUIDelete()
EndFunc   ;==>_Main