[dabo-users] dEditor selection

2011-01-25 Thread Ricardo Araoz
Working on a dEditor control. In the parent form I have this code in my search method: ed = self.Editor start = 0 end = len(ed.Value) srch = TxtToSearchFor selStart = ed.FindText(start, end, srch) selEnd = selStart + len(srch) ed.SelectionPosition = (selStart, selEnd)

Re: [dabo-users] dEditor selection

2011-02-03 Thread Ed Leafe
On Jan 25, 2011, at 9:37 PM, Ricardo Araoz wrote: > Working on a dEditor control. In the parent form I have this code in my > search method: > >ed = self.Editor >start = 0 >end = len(ed.Value) >srch = TxtToSearchFor > >selStart = ed.FindText(start, end, srch) >selEnd = se

Re: [dabo-users] dEditor selection

2011-02-04 Thread Ricardo Araoz
El 03/02/11 16:55, Ed Leafe escribió: > On Jan 25, 2011, at 9:37 PM, Ricardo Araoz wrote: > >> Working on a dEditor control. In the parent form I have this code in my >> search method: >> >>ed = self.Editor >>start = 0 >>end = len(ed.Value) >>srch = TxtToSearchFor >> >>selStart

Re: [dabo-users] dEditor selection

2011-02-04 Thread Ed Leafe
On Feb 4, 2011, at 10:50 AM, Ricardo Araoz wrote: > for the present case this will work. Just use the dBaseMenuBar and > modify it to my needs. > But I can imagine a couple of scenarios where this would not be enough. >i - say I want to do the search stuff from a button (guess the > answer to

Re: [dabo-users] dEditor selection

2011-02-04 Thread Ricardo Araoz
El 04/02/11 13:41, Ed Leafe escribió: > On Feb 4, 2011, at 10:50 AM, Ricardo Araoz wrote: > >> for the present case this will work. Just use the dBaseMenuBar and >> modify it to my needs. >> But I can imagine a couple of scenarios where this would not be enough. >>i - say I want to do the searc

Re: [dabo-users] dEditor selection

2011-02-04 Thread Ed Leafe
On Feb 4, 2011, at 12:13 PM, Ricardo Araoz wrote: > Done. Opens the Find/Edit dialog and when I hit the find button I get : > > 2011-02-04 14:03:56 - ERROR - Active control isn't text-based. > > Tried placing a self.Editor.setFocus() before the call but same results. OK, I keep forgetti

Re: [dabo-users] dEditor selection

2011-02-04 Thread Ricardo Araoz
El 04/02/11 14:19, Ed Leafe escribió: > On Feb 4, 2011, at 12:13 PM, Ricardo Araoz wrote: > >> Done. Opens the Find/Edit dialog and when I hit the find button I get : >> >> 2011-02-04 14:03:56 - ERROR - Active control isn't text-based. >> >> Tried placing a self.Editor.setFocus() before the call bu

Re: [dabo-users] dEditor selection

2011-02-04 Thread Ed Leafe
On Feb 4, 2011, at 12:54 PM, Ricardo Araoz wrote: > Ok, it kind of works now. > When looking "Down" everything's ok, but when looking "Up" the selected > text (that would be the found string) is displaced, that is, the > appropriate number of characters are selected but off a couple of > positions