From: Kevin A. <al...@se...> - 2004-09-17 15:34:37
|
On Sep 17, 2004, at 2:26 AM, normanwinn wrote: > Hi, > > Since my last post on doing on this I have made opening the resource > editor optional. If a checkbox is checked and the file looks like a > resource file then it is opened in the resource editor. If unchecked > it is opened in the code editor. > > I then went on to see if I could highlight the search results. Using > FindFiles to go code shopping I found the the 'redemo.py' implements > this very nicely. So, feeling brave, I started to cut and paste the > necessary functions into my version of FindFiles and alter the > component names accordingly. Finally got it running but bumped into > the problem that List component has no text attribute. Tried using a > TextArea component instead but this lacks the attributes of a list. > > Clearly, I need the functionality of a List but with a text attribute. > I notice there are various ListBox controls in wxPython but I am too > young in PythonCard to try to weave my own component, > > Norman > Originally, the findfiles tool did use a TextArea and if you look at on_listResults_mouseDoubleClick you'll see the code for calculating the clickLine commented out. You can probably go into your findfiles.rsrc.py file and change the type of the listResults from 'List' to 'TextArea', add an 'editable':False attribute.Then comment out the code that applies to a List and uncomment the code for calculating the line that was double-clicked. Unfortunately, the code for adding lines to listResults will need to be tweaked as well. Once the anonymous cvs web pages are back online you could look for one of the early versions of findfiles to see the selection code, etc. used before I switched to using a List. I suspect that I added some kind of comment like 'switched to List component for listResults' or something similar when I made the change. ka |