Data Access Worldwide Knowledge Base

Article ID 2080
Article Title HOWTO: Share the button's OnClick event handler at container level
Article URL http://www.dataaccess.com/kbasepublic/kbprint.asp?ArticleID=2080
KBase Category VDF (GENERAL)
Date Created 12/22/2004
Last Edit Date 12/24/2004


Article Text
QUESTION:
Can I - and how - share the event handler for buttons at a container level? In other words: I have a container with a couple of buttons. Can I make them all execute the same message defined at container level?

ANSWER:
This is - of course - possible. There are several ways to achieve this. They are demonstrated in the enclosed view. In short, they are:

- Send a shared message from the OnClick event in each of the buttons using the automatic message delegation system of Visual DataFlex
- Resend the message OnClick via an explicit delegation call from the button's OnClick event
- Assign a different method identifier to the button's message identifier property



Contributed By:
Vincent Oorsprong
Company: Data Access Worldwide
email: vincent.oorsprong@dataaccess.eu
Web Site: http://www.dataaccess.eu

Web Links Related to this Article
File ButtonEventCodeShare.vw
URL=http://www.dataaccess.com/KBasePublic/Files/2080.ButtonEventCodeShare.vw


Email this Article
Email this Article to a Colleague
Send Feedback on this Article to Data Access Worldwide
Copyright ©2010 Data Access Corporation. All rights reserved.

The information provided in the Data Access Technical Knowledge Base is provided "as is" without warranty of any kind. Data Access Corporation disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. In no event shall Data Access Corporation or its suppliers be liable for any damages whatsoever including direct, indirect, incidental, consequential, loss of business profits or special damages, even if Data Access Corporation or its suppliers have been advised of the possibility of such damages. Some states do not allow the exclusion or limitation of liability for consequential or incidental damages so the foregoing limitation may not apply.