[Gambas-user] How top clearing a readonly textbox

Jussi Lahtinen jussi.lahtinen at gmail.com
Sat Nov 26 03:21:09 CET 2022


Might be simplest to check the read only status before calling Clear().
But this surely works:
Dim sText As String = TextBox1.Text
TextBox1.Clear
TextBox1.Text = sText

The method _Change() is called after the change is done to the .Text thus
it is too late to stop.
Not sure if all this is wanted behavior.


Jussi



On Sat, Nov 26, 2022 at 3:50 AM BB <adamnt42 at gmail.com> wrote:

> As the help says, Textbox.Clear() "Clears the text". However, in the
> case where the textbox is ReadOnly then I don't want this to happen.
>
> I've tried several ways* but can't stop it. Any clues?
>
> b
>
> * overriding Clear, using Stop Event, even saving the original text and
> re-setting it
>
>
> ----[ http://gambaswiki.org/wiki/doc/netiquette ]----
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20221126/a2c60223/attachment.htm>


More information about the User mailing list