Solved

event disabling

Posted on 1997-06-19
1
157 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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

808 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