Function Reference

_GUICtrlListView_SetItemCut

アイテムがカット&ペースト操作用にマークされているかを設定します。

#Include <GuiListView.au3>
_GUICtrlListView_SetItemCut($hWnd, $iIndex[, $fEnabled = True])

 

パラメータ

$hWnd コントロールのハンドル
$iIndex アイテムのゼロ始まりのインデックス
$fEnabled [オプション]Trueの場合は設定され、それ以外の場合は設定が解除されます。

 

返し値

成功: True
失敗: False

 

注意

なし。

 

関連

_GUICtrlListView_GetItemCut

 


#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 $hListView
   
    GUICreate("ListView Set Item Cut", 400, 300)
    $hListView = GUICtrlCreateListView("", 2, 2, 394, 268)
    GUISetState()

    ; 列を追加
    _GUICtrlListView_AddColumn($hListView, "Column 1", 100)
    _GUICtrlListView_AddColumn($hListView, "Column 2", 100)
    _GUICtrlListView_AddColumn($hListView, "Column 3", 100)

    ; アイテムを追加
    _GUICtrlListView_AddItem($hListView, "Row 1: Col 1", 0)
    _GUICtrlListView_AddSubItem($hListView, 0, "Row 1: Col 2", 1)
    _GUICtrlListView_AddSubItem($hListView, 0, "Row 1: Col 3", 2)
    _GUICtrlListView_AddItem($hListView, "Row 2: Col 1", 1)
    _GUICtrlListView_AddSubItem($hListView, 1, "Row 2: Col 2", 1)
    _GUICtrlListView_AddItem($hListView, "Row 3: Col 1", 2)

    ; アイテム2をカット
    _GUICtrlListView_SetItemCut($hListView, 1)
    MsgBox(4160, "Information", "Item 2 Cut: " & _GUICtrlListView_GetItemCut($hListView, 1))

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