Jump to content

ListView select and multiple select


Guest Fredator
 Share

Recommended Posts

Guest Fredator

Hello all !

I try to do 2 things :

1) how to read multiple selection in ListView control ? GUICtrlRead only give me one o:)

2) How to start an action when an item in ListView get selected ? I found a way to do it with mouse click but it's not really clean... And if user change selected item with keyboard arrows, it does nothing :lmao: ...

Thanks for your help.

Link to comment
Share on other sites

I was just about to post for this question too!

I am trying to poll the entire contents of a ListBox (multiple fields) and i can only pull from them one at a time...

My script scans local computers with NET VIEW and populates a list... now i want to run a function to all of those MachineNames/IP's but i'm not even sure how one goes about selecting them automatically...

If it is declared as $List_1 (circa AutoBuilder) Is there an array for this?

$count = $List_1[0]

STEP $List_1[1] To $List_1[$count]

???

Thanks again folks!

Link to comment
Share on other sites

So far i have figured out how to step down through the list (somewhat)...

I use a ControlSend To step through the list starting at the top... (this is limmited, but getting somewhere)...

ControlSend('ListBox GUI', '', 'ListBox1', '{DOWN}')

This starts you at the first entry in the box and if you asign this to a button.. it will step down one line every time you click it...

You could make a Step function

Func ListStep()

      ControlSend('ListBox GUI', '', 'ListBox1', '{DOWN}')

      $listinput = GUICtrlRead($ListBox1)

EndFunc

Or maybe we could create a log file that takes all the data stored in the list box and just pull from the txtfile.... not as swanky as i would like but just a functional... plus i already know how to manipulate txtfile DB's...

Not a solution but i'm getting SOMEWHERE....

Edited by MadSc13ntist
Link to comment
Share on other sites

Guest Fredator

I think I wasn't that clear o:) .

I try to start an action (basically show some text in Edit control) when the user click with his mouse on one line of a ListView control. Or when user use keyboard arrows to change selected line in the ListView.

This is very basic use of ListView but I can't make it work :lmao:

A second part of my project would be to get which line are selected in a ListView, in case of multiple selection.

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...