Solved

event disabling

Posted on 1997-06-19
1
162 Views
Last Modified: 2010-04-04
I'm writing my event handlers etc. in the main form module that Delphi generated for me.  Is there an easy way to switch event transmission off and on?  I want to be able to change screen appearance by assigning into component properties *without* triggering "OnChange" events.
0
Comment
Question by:nobbyclark
1 Comment
 
LVL 2

Accepted Solution

by:
icampbe1 earned 100 total points
ID: 1337251
Yes, Subclass the components in question (create a descendant class) and create a new property in that class called DisableEvent (for example).  Supply your own OnChange handler for the origianl component (the ancestor) instead of the one that was plugged in.  Set your new property to TRUE when 'you' want to silently set the other properties.  If it isn't set to true, then you call the original event handler.

It would be nice if all components had a virtual procedure called change that you could override (like Click) and then generate the event if you want to.

0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

837 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question