Jump to content

How to get selected item info from ListView?


JesuZ
 Share

Recommended Posts

Very simple question, now when I finally have data in my ListView, I can find way to find out which on one of items is selected!

What might be function for this?

Also, if there's way to resize window, when choosing another tab...

Or do other actions when changing to the another tab...

Here's image about GUI

Posted Image

Edited by JesuZ
Link to comment
Share on other sites

_GUICtrlListView_GetSelectedIndices()

_GUICtrlListView_GetItemTextArray() OR _GUICtrlListView_GetItemTextString()

I also make sure that the $LVS_SINGLESEL style is set in the Listview() and IIRC, I set the extended style to $LVS_EX_FULLROWSELECT

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Link to comment
Share on other sites

Thanks!

Got it work with _GUICtrlListView_GetSelectedIndices(), but had to convert result to Int (?is this normal?)

Any ideas about GUI size...?

Is there chance to resize GUI window while running program?

Link to comment
Share on other sites

There should be no need to convert _GUICtrlListView_GetSelectedIndices() to an int , if you dont set $fArray or set it false it Returns pipe "|" delimited string, if you set fArray true it returns an array.

To move/resize a window use

WinMove( "title", "text", x, y [, width [, height[, speed]]] )
GDIPlusDispose - A modified version of GDIPlus that auto disposes of its own objects before shutdown of the Dll using the same function Syntax as the original.EzMySql UDF - Use MySql Databases with autoit with syntax similar to SQLite UDF.
Link to comment
Share on other sites

Thanks!

Got it work with _GUICtrlListView_GetSelectedIndices(), but had to convert result to Int (?is this normal?)

Any ideas about GUI size...?

Is there chance to resize GUI window while running program?

Normal for those functions and I initially had the same issue. I usually use Number() instead but Integer() should work fine.

George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

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