Hi,
I need to take all the contents of a listctrl widget to a python list.
How can it be done?
Thanks in advance.
Hi,
I need to take all the contents of a listctrl widget to a python list.
How can it be done?
Thanks in advance.
http://www.wxpython.org/docs/api/wx.ListCtrl-class.html
Look at some of the methods like GetItem() etc. You can walk the
rows/cols and append them to lists.
On Fri, Feb 11, 2011 at 8:20 AM, Shansal <sansal.birbas@gmail.com> wrote:
Hi,
I need to take all the contents of a listctrl widget to a python list.
How can it be done?
Basically I cant write an algorithm for this task.
On 11 Şubat, 16:32, Ben Timby <bti...@gmail.com> wrote:
On Fri, Feb 11, 2011 at 8:20 AM, Shansal <sansal.bir...@gmail.com> wrote:
> Hi,> I need to take all the contents of a listctrl widget to a python list.
> How can it be done?wxPython API Documentation — wxPython Phoenix 4.2.2 documentation
Look at some of the methods like GetItem() etc. You can walk the
rows/cols and append them to lists.
Just put the contents in a list BEFORE you put them in the listctrl.
On Feb 11, 7:20 am, Shansal <sansal.bir...@gmail.com> wrote:
Hi,
I need to take all the contents of a listctrl widget to a python list.
How can it be done?Thanks in advance.
-------------------
Mike Driscoll
I cary out some additions and deletions on the listcontrol. So I need
to transfer the last state of the listctrl to a list of lists.
I think I will have to use grid for this purpose.
On 11 Şubat, 18:08, Mike Driscoll <kyoso...@gmail.com> wrote:
On Feb 11, 7:20 am, Shansal <sansal.bir...@gmail.com> wrote:
> Hi,
> I need to take all the contents of a listctrl widget to a python list.
> How can it be done?> Thanks in advance.
Just put the contents in a list BEFORE you put them in the listctrl.
-------------------
Mike Driscoll
Or you can use the wx.ListCtrl in virtual mode. That way there isn't a 2nd copy of the data in the listctrl, it just asks you for the values as it needs them for painting the display, and you provide them directly from the master list. Additions and deletions are simply done in the master list data object and then you tell the listctrl what is the new count and to repaint itself to adjust to the changes.
On 2/13/11 10:51 PM, Shansal wrote:
I cary out some additions and deletions on the listcontrol. So I need
to transfer the last state of the listctrl to a list of lists.
I think I will have to use grid for this purpose.
--
Robin Dunn
Software Craftsman
Does virtual List support listmix.ColumnSorterMixin ?
I create this class but when I have lost of records y take a while and
aplication hang up
On 14 feb, 15:57, Robin Dunn <ro...@alldunn.com> wrote:
On 2/13/11 10:51 PM, Shansal wrote:
> I cary out some additions and deletions on the listcontrol. So I need
> to transfer the last state of the listctrl to a list of lists.
> I think I will have to use grid for this purpose.Or you can use the wx.ListCtrl in virtual mode. That way there isn't a
2nd copy of the data in the listctrl, it just asks you for the values as
it needs them for painting the display, and you provide them directly
from the master list. Additions and deletions are simply done in the
master list data object and then you tell the listctrl what is the new
count and to repaint itself to adjust to the changes.--
Robin Dunn
Software Craftsmanhttp://wxPython.org
No, because it uses the listctrl's sort functionality but the listctrl doesn't hold any data so it can't sort it. But since you hold all the data in your master list you should be able to add similar functionality without too much trouble. Catch the column header events, sort your data list, and tell the listctrl to update its display. You can look at the ColumnSorterMixin code to see how to set the up/down arrows in the header and how to get the header clicks.
On 2/14/11 1:00 PM, podio wrote:
Does virtual List support listmix.ColumnSorterMixin ?
--
Robin Dunn
Software Craftsman
Thanks Robin !
On 14 feb, 19:19, Robin Dunn <ro...@alldunn.com> wrote:
On 2/14/11 1:00 PM, podio wrote:
> Does virtual List support listmix.ColumnSorterMixin ?
No, because it uses the listctrl's sort functionality but the listctrl
doesn't hold any data so it can't sort it. But since you hold all the
data in your master list you should be able to add similar functionality
without too much trouble. Catch the column header events, sort your
data list, and tell the listctrl to update its display. You can look at
the ColumnSorterMixin code to see how to set the up/down arrows in the
header and how to get the header clicks.--
Robin Dunn
Software Craftsmanhttp://wxPython.org