ฟอรั่มของบล็อก http://pssix.blogspot.com


_guictrllistbiew_deletallitem(); ใช้ไม่ได้ T_T

Share

pureexe
PSsix Member High Class
PSsix Member High Class


จำนวนข้อความ : 73
ความนิยม : 8
เข้าร่วมเมื่อ : 27/04/2011

_guictrllistbiew_deletallitem(); ใช้ไม่ได้ T_T

ตั้งหัวข้อ by pureexe on 21/11/11, 04:35 pm

Code:
#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 ; Check ClassName being passed to ListView functions, set to True and use a handle to another control to see it work

Example1()


Func Example1()
    Local $GUI, $hListView

    $GUI = GUICreate("ListView Delete All Items", 400, 300)

    $hListView = GUICtrlCreateListView("col1|col2|col3", 2, 2, 394, 268)
    GUISetState()

    ; 3 column load
    For $iI = 0 To 9
        _GUICtrlListView_InsertItem($hListView,"5555555555")
    Next

    MsgBox(4160, "Information", "Delete All Items")
    ; Items created using built-in function, pass the control ID
   sleep(5000)
   MsgBox(64,"","Detory IT Now")
    _GUICtrlListView_DeleteAllItems($hListView)

    ; Loop until user exits
    Do
    Until GUIGetMsg() = $GUI_EVENT_CLOSE
    GUIDelete()
EndFunc  ;==>Example1

max30012540
PSsix Member High Class
PSsix Member High Class

PSsix Program Coder
จำนวนข้อความ : 98
ความนิยม : 10
เข้าร่วมเมื่อ : 10/10/2011
อายุ : 19

Re: _guictrllistbiew_deletallitem(); ใช้ไม่ได้ T_T

ตั้งหัวข้อ by max30012540 on 21/11/11, 05:05 pm

ลองแก้ _GUICtrlListView_InsertItem($hListView,"5555555555") เป็น GUICtrlCreateListViewItem("5555555555", $hListView) ครับ (ตัวอย่างก็มี)

POS
PSsix
PSsix


จำนวนข้อความ : 1151
ความนิยม : 323
เข้าร่วมเมื่อ : 19/07/2010

Re: _guictrllistbiew_deletallitem(); ใช้ไม่ได้ T_T

ตั้งหัวข้อ by POS on 22/11/11, 07:34 am

Code:
 #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 ; Check ClassName being passed to ListView functions, set to True and use a handle to another control to see it work

Example1()


Func Example1()
    Local $GUI, $hListView

    $GUI = GUICreate("ListView Delete All Items", 400, 300)

    $hListView = GUICtrlCreateListView("col1|col2|col3", 2, 2, 394, 268)
    GUISetState()

    ; 3 column load
    For $iI = 0 To 9
        _GUICtrlListView_InsertItem($hListView,"5555555555")
    Next

;~    MsgBox(4160, "Information", "Delete All Items")
    ; Items created using built-in function, pass the control ID
;~    sleep(5000)
   MsgBox(64,"","Detory IT Now")
    _GUICtrlListView_DeleteAllItems(GUICtrlGetHandle($hListView))

    ; Loop until user exits
    Do
    Until GUIGetMsg() = $GUI_EVENT_CLOSE
    GUIDelete()
EndFunc  ;==>Example1


||----------------------------------------------------------------------------------------------------------------||

กลุ่ม AutoIt ในเฟสบุ๊ค
[You must be registered and logged in to see this link.]

++++++++++++++++++++++++++++++++++++++++++++
pssix.blogspot.com

    เวลาขณะนี้ 28/02/17, 02:46 pm