Jump to content

ListBox1 with multiple columns?


Recommended Posts

Is there a way i can read the text from a ListBox1 from a column other than the first?

Using GuiList.au3 i'm able to read the first column, unfortunately my app puts a single space in the first column of every item in this listbox. I can't figure out a way to read the text from the other columns.

Can anyone help?

Thanks!

Link to comment
Share on other sites

sure, its called the helpfile!

_GuiCtrlListViewGetItemTextArray

learn to research

Ah well thank you for being rude. I hadn't had my fair share today and was begining to think i might be entitled to some respect.

Actually, i did extensivly read through the help file, and i went through the au3 file itself, though i didn't see this. Do you know which Beta version this first appeared in? I thought i had the latest but maybe not.

Thanks,

Quasar

Link to comment
Share on other sites

Ah well thank you for being rude. I hadn't had my fair share today and was begining to think i might be entitled to some respect.

Actually, i did extensivly read through the help file, and i went through the au3 file itself, though i didn't see this. Do you know which Beta version this first appeared in? I thought i had the latest but maybe not.

Thanks,

Quasar

Ah nevermind, i see the problem this is for the ListView control. I need to do this for the ListBox control (see my original message - the class name is ListBox1. The GuiList.au3 does not seem to contain an equivalent function. Of course, a ListBox's columns are much different than a ListView's columns..

Any ideas? I assume it must be possible.. it just doesn't seem to be in written yet :whistle:

Thanks!

Quasar

Link to comment
Share on other sites

Is there a way i can read the text from a ListBox1 from a column other than the first?

Using GuiList.au3 i'm able to read the first column, unfortunately my app puts a single space in the first column of every item in this listbox. I can't figure out a way to read the text from the other columns.

Can anyone help?

Thanks!

Can you post your code?

Link to comment
Share on other sites

Can you post your code?

Well.. i don't have any code yet :)

I just need a function that can read from a ListBox.

I've go an application which has some data listed in a ListBox.. but when i use _GUICtrlListGetText() on it, i get " " for every entry. So it looks like they have put a space in the first column and then all of the real data in the rest of the columns.

Please note that this is a ListBox, and not a ListView.

All of the other functions work properly.. i can add to it, delete from it, get it's count, move the index around, etc.. but all i need is the text from the other columns.

Right now i'm just sending a Control+C to it, which copys the entire line with each column seperated by tabs, then breaking that up to get the first visible column (the one i need), which works fine, but it'd prefer a "better" way :whistle:

Link to comment
Share on other sites

Well.. i don't have any code yet :whistle:

I've go an application which has some data listed in a ListBox.. but when i use _GUICtrlListGetText() on it, i get " " for every entry. So it looks like they have put a space in the first column and then all of the real data in the rest of the columns.

Are you sure you're using _GUICtrlListGetText correctly? Is it erroring out?

I have to ask because you didn't post any code. (For external apps you need the Control's Handle, not a Control ID/ClassNameNN)

[font="Tahoma"]"Tougher than the toughies and smarter than the smarties"[/font]

Link to comment
Share on other sites

Are you sure you're using _GUICtrlListGetText correctly? Is it erroring out?

I have to ask because you didn't post any code. (For external apps you need the Control's Handle, not a Control ID/ClassNameNN)

Yeah, before i was using the Control ID (the comment in the file says ControlID) but i saw on here somehwere that i should be using the handle, so i tried that.. before it was erroring out, but now it just returns a single space. What *should* it return for an item in a ListBox with multiple columns?

I'll find the exact code snippet i had, but this is basically what it did..

Link to comment
Share on other sites

Yeah, before i was using the Control ID (the comment in the file says ControlID) but i saw on here somehwere that i should be using the handle, so i tried that.. before it was erroring out, but now it just returns a single space. What *should* it return for an item in a ListBox with multiple columns?

I'll find the exact code snippet i had, but this is basically what it did..

The GuiList.au3 functions is for a single column ListBox, hadn't had the time nor the inclination to work with multiple columns in a ListBox.

Might try googling for it.

Gary

SciTE for AutoItDirections for Submitting Standard UDFs

 

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

 

Link to comment
Share on other sites

The GuiList.au3 functions is for a single column ListBox, hadn't had the time nor the inclination to work with multiple columns in a ListBox.

Might try googling for it.

Gary

Thanks Gary.

For now i'll just stick to using copy/paste to get at the values. Not the best, but works, so..

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