[wxPython-users] No Highlight of text selection

Robin Dunn robin at alldunn.com
Mon Jan 1 12:24:08 PST 2007


Morton Publications wrote:
> Using "tipWindow," "fancyStaticText," and Robin's helpful "Wordwrap" 
> module, I have made a tooltip like popup that can display html formatted 
> text (bold, italic, color, etc). I use it to show Bible verses in the 
> popup with a "motion" mouse event when the mouse is over a Bible 
> reference in an htmlWindow. It works well except for two problems,
>  
> 1. The highlightimg from the selected word from Html "SelectWord" 
> follows the mouse all over the window. This is annoying. I need to hide 
> this highlighting. I have tried various Freeze and Thaw combinations to 
> no avail. What is the solution? 

Without a working example it's very hard to even guess about this.  What 
kind of event is OnReadPopup bound to?


>  
> 2. When the cursor moves to empty space from a word, the word remains 
> highlighted and the popup (if a reference) remains displayed. Even if 
> the cursor is on the other side of the window (as long as it doesn't 
> cross over another word, then that word is highlighted). I've tried to 
> find a way to make a wx.Rect from the highlight to set bounds, but 
> havent succeeded. Any suggestions?

I think I would just assume that if the cursor has moved more than a 
certain amount from the position where it was when you showed the popup, 
then assume that the word has changed and react accordingly.


-- 
Robin Dunn
Software Craftsman
http://wxPython.org  Java give you jitters?  Relax with wxPython!





More information about the wxpython-users mailing list