[ObjectListView] get info about sorting

I want to ask a ObjectListView object if and which of its columns
(index would be enough) are sorted and in which direction (asc or desc).

I know
  ObjectListView.GetSortColumn()
which return a ColumnDef object.

But I can see now way how to ask about the index of the ColumnDef.

In wx.ListCtrl I can not found anything about sorting.

I want to ask a ObjectListView object if and which of its columns
(index would be enough) are sorted and in which direction (asc or desc).

I am not aware of a way to get at the column index and the sort direction.

What use case do you have that you need that?

I know
   ObjectListView.GetSortColumn()
which return a ColumnDef object.

Why is the ColumnDef not good enough?

But I can see now way how to ask about the index of the ColumnDef.

In wx.ListCtrl I can not found anything about sorting.

There is a ColumnSorterMixin: http://wxpython.org/Phoenix/docs/html/lib.mixins.listctrl.ColumnSorterMixin.html#lib-mixins-listctrl-columnsortermixin

Did you see the dataview stuff: http://wxpython.org/Phoenix/docs/html/dataview.1classindex.html

Werner

···

On 2/28/2015 4:24, moonkid@posteo.org wrote:

ObjectListView has attributes sortColumnIndex and sortAscending.

···

On Saturday, February 28, 2015 at 3:24:45 AM UTC, moo...@posteo.org wrote:

I want to ask a ObjectListView object if and which of its columns

(index would be enough) are sorted and in which direction (asc or desc).

I know

ObjectListView.GetSortColumn()

which return a ColumnDef object.

But I can see now way how to ask about the index of the ColumnDef.

In wx.ListCtrl I can not found anything about sorting.

I like my applications to remember "gui metrics" (window size,
position, in list-ctrls column widht, ordering, etc).

I push this really far:
My app run on different machines with different displays.
So it stores all this informations for each display size separate. :wink:

···

On 2015-02-28 12:28 Werner <wernerfbd@gmx.ch> wrote:

What use case do you have that you need that?

Are you aware of wx.lib.agw.persist - http://wxpython.org/Phoenix/docs/html/lib.agw.persist.html#module-lib.agw.persist

Werner

···

On 2/28/2015 22:21, moonkid@posteo.org wrote:

On 2015-02-28 12:28 Werner <wernerfbd@gmx.ch> wrote:

What use case do you have that you need that?

I like my applications to remember "gui metrics" (window size,
position, in list-ctrls column widht, ordering, etc).

I push this really far:
My app run on different machines with different displays.
So it stores all this informations for each display size separate. :wink:

Mhm... Sounds ok but maybe to much.

What about ObjectListView? I need to implement a handler for it.
What is really stored for the wx-classes? What is the meaning of
"properties of the windows"?
To much questions. To intransparent.

And I think it can not handle different display sizes out-of-the-box.
I would need to implement this my self (maybe different config-files
for each display-size).

I prefer to get the control for myself. :wink:

And my solution is (in the future *fg*) generic and portable between
all gui-libs.

···

On 2015-03-01 12:18 Werner <wernerfbd@gmx.ch> wrote:

Are you aware of wx.lib.agw.persist -