Possible issues in ultimatelistctrl??

115 views
Skip to first unread message

Emad Dlala

unread,
Jun 9, 2016, 2:21:51 PM6/9/16
to wxpytho...@googlegroups.com
Has anyone faced the following couple of issues with ultimatelistctrl:

1. Editing labels in columns > 0. See attached script. The items in column can be edited, but not in column 2. Is this a bug?
2. Even for the items in column 1, the user needs to click twice on the item to start editing. Any idea how to make the editing behavior with one click like in the standard ListCtrl. I went to the source code of the ultimatelistctrl  but was not able to figure it out.

Andrea Gavana, perhaps it's your turn :)

Thanks,
Emad
x_UNDO_5.py

Emad Dlala

unread,
Jun 9, 2016, 2:22:55 PM6/9/16
to wxpytho...@googlegroups.com
I meant. The items in column 1 can be edited, but not in column 2.

Emad Dlala

unread,
Jun 9, 2016, 5:32:31 PM6/9/16
to wxpytho...@googlegroups.com
Sorry again. It's not my day today. I forgot to attach the right file. Now attached. 
x_wx_ULC.py

Emad Dlala

unread,
Jun 13, 2016, 7:17:21 PM6/13/16
to wxpytho...@googlegroups.com
Just a reminder if anyone is using ultimatelistctrl and facing the same issues? It seems this is one of the not very much tested classes.  

Marc Souilah

unread,
Jun 16, 2016, 4:18:11 AM6/16/16
to wxPython-users
Hi,

For the double click, I have notice the same behavior on my system and I think this is probably the normal way for this widget.

By default, you can not edit other cell than the first column. But to do so you can use the wx.lib.mixins.listctrl.TextEditMixin, like discussed in this link.
https://groups.google.com/forum/#!topic/wxpython-users/1LvqwzoD-oQ

Unfortunately, there is a problem like indicate in this thread:
http://comments.gmane.org/gmane.comp.python.wxpython.devel/5504
The normal wx.ListCtrl that the format attribute is "self.m_format" where in the UltimateListCtrl is "self._format".
The TextEditMixin is directly using the format attribute and when it does it blows up because it cannot find "m_format" in the UltimateListCtrl.
A few quick find and replaces to the UltimateListCtrl to change self._format to self.m_format did the trick.

See the working example attached

Regards,

Marc
x_wx_ULC.7z

Emad Dlala

unread,
Jun 16, 2016, 12:28:57 PM6/16/16
to wxpytho...@googlegroups.com, marc.soui...@gmail.com
Hi Marc,

Thank you for sharing the fix! 

I wish the behavior of editing the text would look like the one below in the picture; one left click makes the text highlighted and ready for editing, exactly like in wx.ListCtrl. That is the common behavior for lists. 

Inline image 1

Thanks,
Emad

--
You received this message because you are subscribed to the Google Groups "wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wxpython-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

ult.png

Damien Ruiz

unread,
Jun 30, 2016, 10:06:31 AM6/30/16
to wxPython-users, marc.soui...@gmail.com
Hi,

You can also add widgets to the UltimateListCtrl (as in the demo with the Combobox), with the SetItemWindow function.

Combined with a wx.TextCtrl it would give you the behavior you want, but you'll have to manage some things on your own such as row highlighting.


Reply all
Reply to author
Forward
0 new messages