Jump to content

How to delete a ListView GUI Control?


sabine-uwe
 Share

Recommended Posts

Hello

I try to delete a ListView (and later on to create a new one).

With the GUICtrlDelete command it doesn´t work.

Is it my fault or is it realy impossible to delet a ListView-Controle ? :P

Tjanks for your help

Uwe

(I use AutoIt 3.1.1 from 7th Apr, 2005)

#include <GUIConstants.au3>

GUICreate ( "My GUI delete control", 200,200,800,200)
$test=GUICtrlCreateListView ("Test|ab", 10,10,185,50 )
$del=GUICtrlCreateButton("Delete control", 50,70,70,20 )
GUISetState ()

; Run the GUI until the dialog is closed
Do
    $msg = GUIGetMsg()
    if $msg = $del then
        GUICtrlDelete($test)
    endif
Until $msg = $GUI_EVENT_CLOSE
Edited by sabine-uwe
Link to comment
Share on other sites

sabine-uwe I try your script the only thing that I add is after the listview is deleted the script wait 5 secs and create the listview again but basicly the rest is the same your post it.

#include <GUIConstants.au3>

GUICreate ( "My GUI delete control", 200,200,800,200)
$test=GUICtrlCreateListView ("Test|ab", 10,10,185,50 )
$del=GUICtrlCreateButton("Delete control", 50,70,70,20 )
GUISetState ()

; Run the GUI until the dialog is closed
Do
    $msg = GUIGetMsg()
    if $msg = $del then
        GUICtrlDelete($test)
        sleep(5000)
        $test=GUICtrlCreateListView ("Test|ab", 10,10,185,50 )
    endif
Until $msg = $GUI_EVENT_CLOSE
It work fine on my computer Windows XP Sp2 and using AutoIt lates beta 3.1.1.97.

Are you using AutoIt Beta? if not you can get it here!!!

AutoIt Scripts:NetPrinter - Network Printer UtilityRobocopyGUI - GUI interface for M$ robocopy command line
Link to comment
Share on other sites

Hello Danny35d

Thanks for your answer.

Now I tried the same original script with

AutoIt v3.1.1 from 7th Apr, 2005 -> does not work -> ListView does not disapear :P

AutoIt v3.1.1.97 (beta) from 15.12.2005 -> everythink is fine how it should be -> ListView deleted :lmao:

So it might be a bug in the current stable version . ?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...