|Syntactic Confectionery Delight|
Win32::GUI::Richedit strange results for deselecting a selectionby tomsell (Acolyte)
|on Feb 06, 2013 at 19:24 UTC||Need Help??|
tomsell has asked for the
wisdom of the Perl Monks concerning the following question:
I wonder if people could confirm an observation I made when interacting with a Win32::GUI::Richedit control.
To deselect selected text, one can click outside of the selection or within the selection. Strangely though, a handler for the MouseUp event will see different values when querying the Richedit control upon clicking the control:
Note that the Textfield control behaves correctly.
Here's the runnable code for Richedit and Textfield which prints to STDERR
Background to this: I'd like to to enable/disable a "Copy Selected Text" toolbar button based on the presence of selected text. Is this the right approach or might there be a workaround for the RichEdit behaviour?