Hi I am not sure who is the maintainer of ObjectListView.
"Phillip" from the AUTHOR.TXT
or "wbruhin" the Bitbucket account who owns the probject?
I think about patching some things on ObjectListView to improve it. But
before starting the work I would ask the maintainer who need to accept
and merge the patches (or PullRequests).
1. Mark "private" memebers and update the docu
The documentation (in-code) doesn't name all member objects.
e.g. 'sortColumnIndex' and 'sortAscending' are not described. But I
think they are important. The doc explain that all objects which are
not named in the doc are per convention "private". But they miss a
'_' in the beginning of their names.
So I would
a) discuss about what is "private" and what not
b) rename the "private" with a '_'
c) update the docu about all "public" member objects
2. 'width' and 'isSpaceFilling'
a)
After create all ColumnDef()'s and set them with SetColumns() there
is no easy way to set a new 'width' or a 'isSpaceFilling' on a column.
The 'width' can be manipulated with 'wx.ListCtrl' stuff. But this
would break the OLV-concept about 'isSpaceFilling'. Spacefilling is a
concept not present in wx.ListCtrl. So OLV need to manage this and
the width of all columns by itself.
I would have like a solution to set the width and the spacefilling of
a column after its creation.
OLV.SetSpaceFilling(columnIndex, isSpaceFilling=True)
OLV.SetColumnWidth(columnIndex, width)
b)
There are missing getter. I would wish this
OLV.IsSpaceFilling(idx)
OLV.GetWidth(idx)
Maybe a OLV.GetColumnDef(idx), too?
What would you think about it?
Hi,
Hi I am not sure who is the maintainer of ObjectListView.
"Phillip" from the AUTHOR.TXT
or "wbruhin" the Bitbucket account who owns the probject?
Phillip is the author and creator of the control, as he moved on to other things I made a friendly fork (i.e. Phillip was fine with it).
I think about patching some things on ObjectListView to improve it. But
before starting the work I would ask the maintainer who need to accept
and merge the patches (or PullRequests).
PR's please against Bitbucket.
1. Mark "private" memebers and update the docu
The documentation (in-code) doesn't name all member objects.
e.g. 'sortColumnIndex' and 'sortAscending' are not described. But I
think they are important. The doc explain that all objects which are
not named in the doc are per convention "private". But they miss a
'_' in the beginning of their names.
So I would
a) discuss about what is "private" and what not
b) rename the "private" with a '_'
c) update the docu about all "public" member objects
Changes should be done in a 'backwards' compatible way, so I think 'b' is out. I think updating the documentation is a good idea.
2. 'width' and 'isSpaceFilling'
a)
After create all ColumnDef()'s and set them with SetColumns() there
is no easy way to set a new 'width' or a 'isSpaceFilling' on a column.
The 'width' can be manipulated with 'wx.ListCtrl' stuff. But this
would break the OLV-concept about 'isSpaceFilling'. Spacefilling is a
concept not present in wx.ListCtrl. So OLV need to manage this and
the width of all columns by itself.
I would have like a solution to set the width and the spacefilling of
a column after its creation.
OLV.SetSpaceFilling(columnIndex, isSpaceFilling=True)
OLV.SetColumnWidth(columnIndex, width)
b)
There are missing getter. I would wish this
OLV.IsSpaceFilling(idx)
OLV.GetWidth(idx)
Maybe a OLV.GetColumnDef(idx), too?
can't you do this on the ColumnDef? e.g. ColumnDef.isSpaceFilling
I need to get going, will be away for a few days, so don't have time to look at the code.
Werner
···
On 3/3/2015 12:59, moonkid@posteo.org wrote:
> b) rename the "private" with a '_'
Changes should be done in a 'backwards' compatible way, so I think
'b' is out. I think updating the documentation is a good idea.
Understand. What would you think about adding deprecated messages for
the "old private" memebers?
I wouuld implement it with @propertys givin out a message that this is
deprecated and will be removed in the future - minimum one year or
later (thinking about old-stuff linux distros like Debian, etc).
>
> 2. 'width' and 'isSpaceFilling'
> a)
> After create all ColumnDef()'s and set them with SetColumns()
> there is no easy way to set a new 'width' or a 'isSpaceFilling' on
> a column. The 'width' can be manipulated with 'wx.ListCtrl' stuff.
> But this would break the OLV-concept about 'isSpaceFilling'.
> Spacefilling is a concept not present in wx.ListCtrl. So OLV need
> to manage this and the width of all columns by itself.
> I would have like a solution to set the width and the
> spacefilling of a column after its creation.
> OLV.SetSpaceFilling(columnIndex, isSpaceFilling=True)
> OLV.SetColumnWidth(columnIndex, width)
> b)
> There are missing getter. I would wish this
> OLV.IsSpaceFilling(idx)
> OLV.GetWidth(idx)
> Maybe a OLV.GetColumnDef(idx), too?
can't you do this on the ColumnDef? e.g. ColumnDef.isSpaceFilling
I can read the members with that. But this is just a workaround for me:
olvCtrl.columns[i].isSpaceFilling is ugly code. There should be getters.
And what about setters? There have to be some kind of recreation of the
control if the width or spacefilling of a column is set to a new value.
So a nice setter would be a good place for that. And because the
width-calculating routing (forgot the name) is in OLV, the
getters/setters should be located in the OLV and not in the ColumnDef.
The ColumnDef doesn't know how to act if its isSpaceFilling is set from
False to True. The OLV then have to recalculate the width of the other
columns (maybe with spacefilling=True).
Because of this spacefilling-width-calculating routine in OLV I am
agsinst the solution to set the width of a column with a wx.ListCtrl
function. When a wx.ListCtrl reset the width of a column, what is about
a other column that has an isSpaceFilling=True in OLV?
That is why this width-calculating stuff should be centralized in OLV.
···
On 2015-03-03 13:19 Werner <wernerfbd@gmx.ch> wrote: