Help with wxListCtrl

I created a wxListCtrl with the following line

···

----------------------------------------------------------------------
self.myList = wxListCtrl(self, ID_list,
  wxDefaultPosition, (1050, 600),
  style=wxLC_REPORT | wxLC_SINGLE_SEL |
  wxLC_SORT_ASCENDING)
----------------------------------------------------------------------

It has 8 columns and a few hundred lines of data. I would like to
search through the data in the various fields to see if they match user
supplied search criteria which is specific for each column.

When I try to examine the text in a line with

text = self.myList.GetItemText(3)

I get only the first column of line #3. Is there a way I can get the
data in all the columns?

Thanks.
Gary

Can someone give me a hint as to how I could sub-class a wxDirDialog? I'd like to be able to add another button to the dialog for extra options...

John Hoffman wrote:

Can someone give me a hint as to how I could sub-class a wxDirDialog?
I'd like to be able to add another button to the dialog for extra options...

I don't think you can. I wanted to do that (to offer the user the choice
of file format to save in). In the end I resorted to a dialog box
beforehand to select the format etc with a browse button that
brings up the DirDialog (or FileDialog) to select where it goes.

Roger

I created a wxListCtrl with the following line

----------------------------------------------------------------------
self.myList = wxListCtrl(self, ID_list,
  wxDefaultPosition, (1050, 600),
  style=wxLC_REPORT | wxLC_SINGLE_SEL |
  wxLC_SORT_ASCENDING)
----------------------------------------------------------------------

It has 8 columns and a few hundred lines of data. I would like to
search through the data in the various fields to see if they match user
supplied search criteria which is specific for each column.

When I try to examine the text in a line with

text = self.myList.GetItemText(3)

I get only the first column of line #3. Is there a way I can get the
data in all the columns?

not by default but you can create one easy:

use these:

list.GetItem(index, col)
item.GetText()

and iterate over the list.GetColumnCount() to extract the data :smiley:

···

On Mon, 19 Apr 2004 21:49:27 -0400, Gary Jaffe <gfj555@yahoo.com> wrote:

Thanks.
Gary

--
Peter Damoc
Hacker Wannabe
http://www.sigmacore.net/about.html

> I created a wxListCtrl with the following line
>
> -------------------------------------------------------------------
> --- self.myList = wxListCtrl(self, ID_list,
> wxDefaultPosition, (1050, 600),
> style=wxLC_REPORT | wxLC_SINGLE_SEL |
> wxLC_SORT_ASCENDING)
> -------------------------------------------------------------------
> ---
>
> It has 8 columns and a few hundred lines of data. I would like to
> search through the data in the various fields to see if they match
> user supplied search criteria which is specific for each column.
>
> When I try to examine the text in a line with
>
> text = self.myList.GetItemText(3)
>
> I get only the first column of line #3. Is there a way I can get
> the data in all the columns?

not by default but you can create one easy:

use these:

list.GetItem(index, col)
item.GetText()

and iterate over the list.GetColumnCount() to extract the data :smiley:

Worked like a charm.
Thanks,
Gary

···

On Tue, 20 Apr 2004 08:57:13 +0300 "Peter Damoc" <pdamoc@gmx.net> wrote:

On Mon, 19 Apr 2004 21:49:27 -0400, Gary Jaffe <gfj555@yahoo.com> > wrote:

>
> Thanks.
> Gary

--
Peter Damoc
Hacker Wannabe
sigmacore.net

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail:
wxPython-users-help@lists.wxwidgets.org

Roger Binns wrote:

John Hoffman wrote:

Can someone give me a hint as to how I could sub-class a wxDirDialog?
I'd like to be able to add another button to the dialog for extra options...

I don't think you can.

Correct. The "common dialogs" are implemented on Windows by calling a standared win32 API in ShowModal. They are not true wxDialogs so there is nothing that is overridable in derived classes.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!