Challenge: custom textctrl

Can a custom textctrl be created such that each group of text (each line in a file) could have an associated custom widget?

note: Initially I tried to implement such that, for each group of text, a new custom widget with textctrl was added to a stack with that line, but became slow (apparently) because of memory usage.

How might it be possible to do any of the following? If possible, which one, if any, would be most practical to implement?

1. Identify a block of text (with a border, for instance) when cursor is in that text, along with its associated data/widgets on a side panel

2. Display custom widgets on textctrl (in between or associated with lines)

Thanks

Hi Aaron,

···

On 06/09/2013 14:02, Aaron knuf wrote:

Can a custom textctrl be created such that each group of text (each line in a file) could have an associated custom widget?

Sounds more like a ListCtrl to me.

Download the wxPython demo and have a look at e.g.:
- HyperTreeList
- UltimateListCtrl

Or maybe I don't understand what you are looking for.

Werner

Thanks for the direction.

I ended up finding UltimateListTextCtrl, although unable to initiate it, receiving the error: “Exception: invalid item index in GetItem”

**note: **

I just installed Python 2.6.1 as needed for the wxPython Demo

In the attached file, I also tried initiating the UltimateListTextCtrl with an empty list item

test – UltimateListTextCtrl.py (2.47 KB)

···

On Friday, September 6, 2013 7:02:40 AM UTC-5, Aaron knuf wrote:

Can a custom textctrl be created such that each group of text (each line in a file) could have an associated custom widget?

note: Initially I tried to implement such that, for each group of text, a new custom widget with textctrl was added to a stack with that line, but became slow (apparently) because of memory usage.

How might it be possible to do any of the following? If possible, which one, if any, would be most practical to implement?

  1. Identify a block of text (with a border, for instance) when cursor is in that text, along with its associated data/widgets on a side panel
  1. Display custom widgets on textctrl (in between or associated with lines)

Thanks

I never used it myself, but with the following changes it runs and
displays.
Change line 18 to:
self.ultimateList = ULC.UltimateListCtrl(self, agwStyle =
wx.LC_REPORT And comment line 29 - this is creating a second list
At this point I see a list with two rows and columns.
Werner

···

On 07/09/2013 12:24, Aaron knuf wrote:

Thanks for the direction.

      I ended up finding UltimateListTextCtrl, although unable to

initiate it, receiving the error: “Exception: invalid item
index in GetItem”

**note: **

      I just installed Python 2.6.1 as needed for the

wxPython Demo

      In the attached file, I also tried initiating the

UltimateListTextCtrl with an empty list item

After changing line 18 as directed, I had to comment out line 29 (the UltimateListTextCtrl) for this to run, displaying via the UltimateListCtrl. The ULC was only created to pass into the UltimateListTextCtrl to instantiate it. The error still occurs.

Sorry for the delayed response.

···

On Saturday, September 7, 2013 5:56:56 AM UTC-5, werner wrote:

On 07/09/2013 12:24, Aaron knuf wrote:

Thanks for the direction.

      I ended up finding UltimateListTextCtrl, although unable to

initiate it, receiving the error: “Exception: invalid item
index in GetItem”

**note: **

      I just installed Python 2.6.1 as needed for the

wxPython Demo

      In the attached file, I also tried initiating the

UltimateListTextCtrl with an empty list item

I never used it myself, but with the following changes it runs and

displays.

Change line 18 to:

        self.ultimateList = ULC.UltimateListCtrl(self, agwStyle =

wx.LC_REPORT

And comment line 29 - this is creating a second list



At this point I see a list with two rows and columns.



Werner