Jump to content
Sign in to follow this  
piccaso

ListView

Recommended Posts

piccaso

i tryed this, didnt work...

#include <GUIConstants.au3>
$Form1 = GUICreate("Test", 237, 112, 192, 125)
$List1 = GUICtrlCreateListView("x|y|z", 8, 16, 217, 84, -1, $WS_EX_CLIENTEDGE)
GUISetState(@SW_SHOW)
GUICtrlSetData($List1,"a|b|c|d|e|f"); d,e,f columns are not created...
While 1
    $msg = GuiGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
        ExitLoop
    EndSelect
WEnd

i didnt did find anything in the docs... :P


CoProc Multi Process Helper libraryTrashBin.nfshost.com store your AutoIt related files here!AutoIt User Map

Share this post


Link to post
Share on other sites
GaryFrost

i tryed this, didnt work...

#include <GUIConstants.au3>
$Form1 = GUICreate("Test", 237, 112, 192, 125)
$List1 = GUICtrlCreateListView("x|y|z", 8, 16, 217, 84, -1, $WS_EX_CLIENTEDGE)
GUISetState(@SW_SHOW)
GUICtrlSetData($List1,"a|b|c|d|e|f"); d,e,f columns are not created...
While 1
    $msg = GuiGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
        ExitLoop
    EndSelect
WEnd

i didnt did find anything in the docs... :P

#include <GUIConstants.au3>
$Form1 = GUICreate("Test", 237, 112, 192, 125)
$List1 = GUICtrlCreateListView(" | | | | | ", 8, 16, 217, 84, -1, $WS_EX_CLIENTEDGE)
GUISetState(@SW_SHOW)
GUICtrlSetData($List1,"a|b|c|d|e|f"); d,e,f columns are not created...
While 1
    $msg = GuiGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
        ExitLoop
    EndSelect
WEnd

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Share this post


Link to post
Share on other sites
piccaso

i worked out this, but i doubt that its the 'real' solution...

#include <GUIConstants.au3>
$Form1 = GUICreate("test", 148, 130, 192, 125)
$List1 = GUICtrlCreateListView("x|y|z", 8, 8, 129, 71)
$Button1 = GUICtrlCreateButton("test 1", 8, 88, 129, 17)
$Button2 = GUICtrlCreateButton("test 2", 8, 108, 129, 17)
GUISetState(@SW_SHOW)
While 1
    $msg = GuiGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
        ExitLoop
    Case $msg = $Button1
        if GUICtrlDelete($List1) Then $List1 = GUICtrlCreateListView("a|b|c|d|e|f|g|h", 8, 8, 129, 71)
    Case $msg = $Button2
        if GUICtrlDelete($List1) Then $List1 = GUICtrlCreateListView("y|z", 8, 8, 129, 71)          
    EndSelect
WEnd


CoProc Multi Process Helper libraryTrashBin.nfshost.com store your AutoIt related files here!AutoIt User Map

Share this post


Link to post
Share on other sites
GaryFrost

You might want to look at the GuiListView UDFs in the help

_GUICtrlListViewDeleteColumn

_GUICtrlListViewInsertColumn

_GUICtrlListViewHideColumn

etc...


SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Share this post


Link to post
Share on other sites
Valuater

if you are working with just those two widths

maybe this

#include <GUIConstants.au3>
$Form1 = GUICreate("test", 148, 130, 192, 125)
$List1 = GUICtrlCreateListView("x|y|z", 8, 8, 129, 71)
$List2 = GUICtrlCreateListView("a|b|c|d|e|f|g|h", 8, 8, 129, 71)
GUICtrlSetState( -1, $GUI_HIDE)
$Button1 = GUICtrlCreateButton("test 1", 8, 88, 129, 17)
$Button2 = GUICtrlCreateButton("test 2", 8, 108, 129, 17)
GUISetState(@SW_SHOW)
While 1
    $msg = GuiGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
        ExitLoop
    Case $msg = $Button1
        GUICtrlSetState( $List1, $GUI_HIDE)
        GUICtrlSetState( $List2, $GUI_SHOW)
    Case $msg = $Button2
        GUICtrlSetState( $List2, $GUI_HIDE)
        GUICtrlSetState( $List1, $GUI_SHOW)   
    EndSelect
WEnd

8)


NEWHeader1.png

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.