Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Win32::GUI::Richedit strange results for deselecting a selection

by Athanasius (Monsignor)
on Feb 07, 2013 at 14:37 UTC ( #1017669=note: print w/ replies, xml ) Need Help??


in reply to Win32::GUI::Richedit strange results for deselecting a selection

I suspect that Anonymous Monk’s reply is the best advice. However, if you need to persevere with Win32::GUI, the following strategy might provide an acceptable workaround:

  • Create an additional read-only text box to display the text selected in the RichEdit control (by calling $re->GetSelText()).
  • Update this on every MouseUp event.
  • Also provide a “Cancel” button to allow the user to set the RichEdit control text selection to the empty string.
  • When the “Cancel” button is pressed, blank-out the read-only text box and reset the RichEdit control.
  • Implement the “Copy Selected Text” button as originally intended.

The advantage is that the user can see the current selection, so knows when it’s necessary to press the “Cancel” button. The main disadvantage is the provision of an extra widget.

I haven’t attempted to implement this idea. Just a thought, and I hope it helps,

Athanasius <°(((><contra mundum Iustus alius egestas vitae, eros Piratica,


Comment on Re: Win32::GUI::Richedit strange results for deselecting a selection
Select or Download Code
Re^2: Win32::GUI::Richedit strange results for deselecting a selection
by Anonymous Monk on Feb 07, 2013 at 15:15 UTC

    the following strategy might provide an acceptable workaround

    Or patch Richedit.xs so selchange works :)

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1017669]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (13)
As of 2014-10-01 14:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    What is your favourite meta-syntactic variable name?














    Results (22 votes), past polls