Has anyone faced the following couple of issues with ultimatelistctrl:
-
Editing labels in columns > 0. See attached script. The items in column can be edited, but not in column 2. Is this a bug?
-
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 (4.42 KB)
I meant. The items in column 1 can be edited, but not in column 2.
···
On Thu, Jun 9, 2016 at 11:21 AM, Emad Dlala emad.dlala@gmail.com wrote:
Has anyone faced the following couple of issues with ultimatelistctrl:
- Editing labels in columns > 0. See attached script. The items in column can be edited, but not in column 2. Is this a bug?
- 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
Sorry again. It’s not my day today. I forgot to attach the right file. Now attached.
x_wx_ULC.py (1.19 KB)
···
On Thu, Jun 9, 2016 at 11:22 AM, Emad Dlala emad.dlala@gmail.com wrote:
I meant. The items in column 1 can be edited, but not in column 2.
On Thu, Jun 9, 2016 at 11:21 AM, Emad Dlala emad.dlala@gmail.com wrote:
Has anyone faced the following couple of issues with ultimatelistctrl:
- Editing labels in columns > 0. See attached script. The items in column can be edited, but not in column 2. Is this a bug?
- 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
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.
···
On Thu, Jun 9, 2016 at 2:32 PM, Emad Dlala emad.dlala@gmail.com wrote:
Sorry again. It’s not my day today. I forgot to attach the right file. Now attached.
On Thu, Jun 9, 2016 at 11:22 AM, Emad Dlala emad.dlala@gmail.com wrote:
I meant. The items in column 1 can be edited, but not in column 2.
On Thu, Jun 9, 2016 at 11:21 AM, Emad Dlala emad.dlala@gmail.com wrote:
Has anyone faced the following couple of issues with ultimatelistctrl:
- Editing labels in columns > 0. See attached script. The items in column can be edited, but not in column 2. Is this a bug?
- 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
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 (126 KB)
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.
Thanks,
Emad
···
On Thu, Jun 16, 2016 at 1:18 AM, Marc Souilah marc.souilah.unilim@gmail.com wrote:
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
–
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-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
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.