[wxPython-users] Find dialog focus
Saketh Bhamidipati
saketh.bhamidipati at gmail.com
Mon Aug 7 11:35:55 PDT 2006
On 8/7/06, Robin Dunn <robin at alldunn.com> wrote:
>
> Saketh Bhamidipati wrote:
> > I have a Find dialog (not the standard one) which has a Find Next
> > button. When this button is clicked, a TextCtrl in the parent window
> > highlights the result. If Find Next is clicked again, then the TextCtrl
> > highlights the next result. And so on, starting from the beginning again
> > if no results are found.
> >
> > The Find Next feature works perfectly, and the highlighting works as
> > well. However, my problem is that the highlighting only shows up in the
> > parent window if the Find dialog is closed. For instance, if I have up
> > the Find dialog, and hit "Find Next" three times, the third instance of
> > the query will be highlighted in the TextCtrl, but I can't see the
> > highlight until I close the Find dialog. Since the Find dialog is modal,
> > the parent window loses its focus - that's why the highlight can't be
> > seen, I think.
>
> Correct.
>
> >
> > How can I fix my program so that the user can see the highlighted text
> > in the frame even while there is a modal Find dialog? Should I change
> > the Find dialog to be a child frame?
>
> The standard find/replace dialog gets around this by not using
> ShowModal, just Show, on the dialog.
>
> --
> Robin Dunn
> Software Craftsman
> http://wxPython.org Java give you jitters? Relax with wxPython!
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: wxPython-users-unsubscribe at lists.wxwidgets.org
> For additional commands, e-mail: wxPython-users-help at lists.wxwidgets.org
>
> I changed ShowModal() to Show() and now everything works fine. Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.wxwidgets.org/pipermail/wxpython-users/attachments/200608=
07/5590ab93/attachment.htm
More information about the wxpython-users
mailing list