Hi,
Here are my requirements:
- Readble Columns No, Id, Type, Price
- Editable Columns Product, Qty
- Insert a custom TextCtrl when click on Product (for auto-complete)
- Increase height of rows. (height = height of Default TextCtrl)
- When product is entered move/jump cursor to Qty cell.
- When Qty is entered, move cursor to next row’s product cell.
If ListCtrl’s cell can provide me these events then I don’t need to
attach my custom auto-complete textctrl in cell.
- wx.EVT_TEXT
- wx.EVT_KILL_FOCUS
- wx.EVT_KEY_DOWN
- wx.EVT_TEXT_ENTER # When enter key is pressed
I am also open for other widgets like Grid, ObjectListView or UltimateListCtrl.
wxPython 2.8.12.1
Windows
Cheers
list-edit.py (3.57 KB)
ObjectListView / ListCtrl provides most of these features, although the row height stuff can be tricky. You might have to create a pop-up text control too if you don’t like the built-in way of editing the “cells”. On the other hand, UltimateListCtrl is pure Python and supports embedding of other controls, such as the text control. It is also easier to hack / enhance since it’s Python!
···
On Tuesday, July 3, 2012 1:20:24 AM UTC-5, Prashant wrote:
Hi,
Here are my requirements:
- Readble Columns No, Id, Type, Price
- Editable Columns Product, Qty
- Insert a custom TextCtrl when click on Product (for auto-complete)
- Increase height of rows. (height = height of Default TextCtrl)
- When product is entered move/jump cursor to Qty cell.
- When Qty is entered, move cursor to next row’s product cell.