Sign in to follow this  
Followers 0
sabine-uwe

How to delete a ListView GUI Control?

4 posts in this topic

#1 ·  Posted (edited)

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

Share this post


Link to post
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

Share this post


Link to post
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 . ?

Share this post


Link to post
Share on other sites

that's a new demonstration than the beta is more stable than the stable official release :P

Share this post


Link to post
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
Sign in to follow this  
Followers 0