Jump to content

simple multi list box


jloyzaga
 Share

Recommended Posts

I'd just like to find an example of a multi select list box that outputs the selections to a file. Finding lots of complex examples in examples folder and cannot find and simple ones. like simple single select list box. 

I'm trying to put together a selection criteria. where listbox 1 has a list of environment names - when selected it will open up another control (overlay is good to cover first GUI) it then lists Applications. When selected I will use the selection to list some items from excel as a multi select list box. So are there simple examples of these that i can look at and use to create a gui that I can understand?

 

Joe

Link to comment
Share on other sites

2 hours ago, jloyzaga said:

So are there simple examples of these that i can look at and use to create a gui that I can understand?

I am sure there are examples, that will help you but maybe you have to read more as one.

 

Edit: BTW you can edit your post's, to create a new one isn't needed.

Edited by AutoBert
Link to comment
Share on other sites

Here is a simple Listbox:

Spoiler
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <GUIListBox.au3>
#include <WindowsConstants.au3>

$Form1 = GUICreate("Form1", 444, 438, 203, 124)
$List1 = GUICtrlCreateList("", 88, 32, 321, 331)
$addfiles = GUICtrlCreateButton("Add Files", 128, 384, 105, 33)
$clearall = GUICtrlCreateButton("Clear All", 280, 384, 97, 33)
GUISetState(@SW_SHOW)


While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $addfiles
            _addfiles()
        Case $clearall
            _GUICtrlListBox_ResetContent($List1)


    EndSwitch
WEnd


Func _addfiles()
        _GUICtrlListBox_AddFile($List1, @WindowsDir & "\notepad.exe")
        _GUICtrlListBox_AddFile($List1, @WindowsDir & "\regedit.exe")
        _GUICtrlListBox_AddString($List1, "Just a String")

EndFunc

 

And here is a post with the next step.

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

×
×
  • Create New...