5 posts • Page 1 of 1
The QT4 RichText editor example had a good display of this (long time since I read it). It enables you to freeze an object/control, i.e. hinder it from raising events while carrying out other tasks. In that example it was about setting format and updating tool button's status while typing if I remember correctly.
Just a little and simple example:
Code: Select all
Public Sub ToggleButton1_Click() If ToggleButton1.Value Then Object.Lock(Button1) ToggleButton1.Text = "Now Button1's locked !" ' Button1 click event will not be raised ! Else Object.Unlock(Button1) ToggleButton1.Text = "Now Button1's unlocked !" ' Button1 click event will be raised ! Endif End Public Sub Button1_Click() Print "Sum liber !" End
Who is online
Users browsing this forum: No registered users and 2 guests