[Gambas-user] Controls WebForm Ignore Events
Mayost Sharon
sharon at 455.co.il
Fri Jan 26 14:43:12 CET 2018
---------- Original Message -----------
From: Benoît Minisini <g4mba5 at gmail.com>
To: Gambas Mailing List <user at lists.gambas-basic.org>, Mayost Sharon <sharon at 455.co.il>
Sent: Fri, 26 Jan 2018 14:01:35 +0100
Subject: Re: [Gambas-user] Controls WebForm Ignore Events
> Le 26/01/2018 à 13:55, Mayost Sharon a écrit :
> > Hello
> >
> > gambas: 3.10.0
> >
> >
> > Hello
> >
> > Is there a possibility to cancel EVENT of a control
> > I need this for the controls of WebForm
> >
> > In my example I do it
> > But it's complicated
> > I want not to run the WebTextBox1 event when I press WebButton1
> >
> > If there was such a possibility
> > WebTextBox.IgnoreEvent = True
> > This will cause a WebTextBox
> > events disable
> >
> > or should give an event filter
> > WebTextBox.IgnoreEvent = "Change;Clear"
> > Only Disable Events "Change" and "Clear"
> >
> >
> > Thanks
> >
> > ' Gambas class file
> >
> > Export
> > Private ignore_event As Boolean
> >
> > Public Sub WebTextBox1_Change()
> > If ignore_event = False Then
> > WebLabel1.Text = WebTextBox1.Text
> > Endif
> > End
> >
> > Public Sub WebButton1_Click()
> > ignore_event = True
> > WebTextBox1.Text = "sharon"
> > ignore_event = False
> > End
> >
>
> You can prevent a Gambas object from raising events by using
> Object.Lock() / Object.Unlock().
>
> Beware : that way you can't ignore events raised from the browser (in
> that example, when the user changes the text of the WebTextBox1
> control). Only those that are raised immediately from your code on the
> server side.
>
> Regards,
>
> --
> Benoît Minisini
------- End of Original Message -------
Thank you
But I see that this lock talks about files and not about events
Link to your documentation
http://gambaswiki.org/wiki/lang/lock
More information about the User
mailing list