[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Supress TextEditor Change event


On Mon, 9 Sept 2024 at 18:07, Bruce Steers <bsteers4@xxxxxxxxx> wrote:

> On Mon, 9 Sept 2024 at 17:42, Bruce Steers <bsteers4@xxxxxxxxx> wrote:
>
>> I have the following code..
>>
>> I'm currently working around it by using my own lock variable so i set
>> like this.
>> $bFreezeEditor = True
>> SetProp(TextEditor1, "Text", sText)  ' SetProp Locks object, sets prop,
>> then unlocks
>> Wait  ' let that timer trigger
>> $bFreezeEditor = True  ' OOPS
>>
>
> of course i meant False in that last line :-\
> BruceS
>

I've now fixed it by saving this as TextEditor.class in my .src

' Gambas class file

Export

Public Sub _RaiseChange()

  If Object.IsLocked(Me) Then Return
  Super._RaiseChange

End

Now it does not trigger Change event if locked

Respects

Follow-Ups:
Re: Supress TextEditor Change eventBenoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx>
References:
Supress TextEditor Change eventBruce Steers <bsteers4@xxxxxxxxx>
Re: Supress TextEditor Change eventBruce Steers <bsteers4@xxxxxxxxx>