On Mon, Nov 5, 2012 at 6:31 PM, <[email protected]> wrote:
> Do I overlook a detail? - The sequence
>
> editObject~select /* select all text */
> editObject~clearText /* discard selected text */
>
> should wipe out all text from an edit control. Using Win7 Starter
> Edition this works fine if the edit control is not created with
> style READONLY. With READONLY the text is selected but not erased.
>
> In the manual I did not find a hint about this variable behaviour.
> editObject~setText('') works in either case.
>
Just go with what works. ;-)
The clearText method uses the clipboard for clearing text. The system sees
that the edit control is read only, so it won't let you alter the text.
And deleting the text is altering it.
The setText() method on the other hand programmatically sets the text in
the edit control, so it works. When an edit control is read only, the
system prevents the *user* from altering the text. But, it does not
prevent the *application* from altering the text. Using the clearText
method simulates the user choosing clear text from a system menu, which is
why it doesn't work for read only edit controls.
--
Mark Miesfeld
------------------------------------------------------------------------------
LogMeIn Central: Instant, anywhere, Remote PC access and management.
Stay in control, update software, and manage PCs from one command center
Diagnose problems and improve visibility into emerging IT issues
Automate, monitor and manage. Do more in less time with Central
http://p.sf.net/sfu/logmein12331_d2d
_______________________________________________
Oorexx-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/oorexx-users