I defined a ListCtrl and managed to get the ColumnSorterMixin working.
But to have the little arrow images showing when I click the headers I
need to use the method SetImageList and when I do this my ListCtrl
show a blank space where should be an icon at the start of each row.
I'm inserting my items with InsertStringItem that, by the
documentation should have no Image parameter, but that doesn't seem to
be the case. This problem can be seem in the ListCtrl demo. From my
point of view, if I replace the calls for InsertImageStringItem by
InsertStringItem that should give no images and much less blank spaces
where a image should be. Am I right?
I'm on report mode and everything else is working fine.
I defined a ListCtrl and managed to get the ColumnSorterMixin working.
But to have the little arrow images showing when I click the headers I
need to use the method SetImageList and when I do this my ListCtrl
show a blank space where should be an icon at the start of each row.
I'm inserting my items with InsertStringItem that, by the
documentation should have no Image parameter, but that doesn't seem to
be the case. This problem can be seem in the ListCtrl demo. From my
point of view, if I replace the calls for InsertImageStringItem by
InsertStringItem that should give no images and much less blank spaces
where a image should be. Am I right?
I'm on report mode and everything else is working fine.
The native ListView control on Windows assumes that if there is an image list then you want to use item icons, and so it reserves some space for them.
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!
Well, that makes difficult using the ColumnSorterMixin without having
images on my list =/
Is there a way to solve this problem without refactoring of the mixin
or anything like this?
···
On 8/7/06, Robin Dunn <robin@alldunn.com> wrote:
The native ListView control on Windows assumes that if there is an image
list then you want to use item icons, and so it reserves some space for
them.
The native ListView control on Windows assumes that if there is an image
list then you want to use item icons, and so it reserves some space for
them.
Well, that makes difficult using the ColumnSorterMixin without having
images on my list =/
Is there a way to solve this problem without refactoring of the mixin
or anything like this?
Some people have done it by having no text in the first column, and then setting the width of that column to zero. You have to change how you add items and access their values later, but it shouldn't be too hard.
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!
Some people have done it by having no text in the first column, and then
setting the width of that column to zero. You have to change how you
add items and access their values later, but it shouldn't be too hard.
Unless I forgot to call some method, at least on GTK (I believe wxPython
2.6.1.0), columns set to a width of zero are actually visible. Perhaps
only a few pixels wide, but still visible.
- Josiah
···
Robin Dunn <robin@alldunn.com> wrote:
Kao Cardoso Felix wrote:
> On 8/7/06, Robin Dunn <robin@alldunn.com> wrote:
>>
>> The native ListView control on Windows assumes that if there is an image
>> list then you want to use item icons, and so it reserves some space for
>> them.
>>
>
> Well, that makes difficult using the ColumnSorterMixin without having
> images on my list =/
> Is there a way to solve this problem without refactoring of the mixin
> or anything like this?
>
Some people have done it by having no text in the first column, and then
setting the width of that column to zero. You have to change how you
add items and access their values later, but it shouldn't be too hard.
The native ListView control on Windows assumes that if there is an image
list then you want to use item icons, and so it reserves some space for
them.
Well, that makes difficult using the ColumnSorterMixin without having
images on my list =/
Is there a way to solve this problem without refactoring of the mixin
or anything like this?
Some people have done it by having no text in the first column, and then setting the width of that column to zero. You have to change how you add items and access their values later, but it shouldn't be too hard.
Unless I forgot to call some method, at least on GTK (I believe wxPython
2.6.1.0), columns set to a width of zero are actually visible. Perhaps
only a few pixels wide, but still visible.
- Josiah
---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org
Unless I missed something, too, in Windows (wxPython 2.6.1.0) you have a width that is
enough near to zero, but you must not forget that the column can be resized! I derived (besides
other reasons) the class and overloaded EVT_LIST_COL_BEGIN_DRAG and EVT_SIZE,
vetoing the first when selected column is in hidden list
def OnColBeginDrag(self, event):
if event.GetColumn() in self.__hiddenColumns:
event.Veto()
and processing adequately the second.
Hope it helps.