Unit Ochbtn

Classes

TOCHButton -

Functions

Register - ______________________________________________________________________________

Types

TOCHDefault
TOCHEvent
TOCHOrientation

Constants

Variables


Functions


procedure Register;

______________________________________________________________________________

Types


TOCHDefault = (bdNone,bdOK,bdCancel,bdHelp);

TOCHEvent = procedure (const OKButton: boolean) of object
OCH Button V1.00 - January 06, 1998 Copyright (c) 1998 by Demian Disclaimer: This component is distributed as Freeware. There is no charge or warranty whatsoever. The author will not be held responsible for any direct or indirect damage resulting from the use of the component or any derivatives thereof. In short: USE IT AT YOUR OWN RISK! You are allowed to include the component code in any commercial or non commercial product. You are also allowed to make as many copies of the component as you want and distribute them, as long as you do not receive any money for the copying/distribution. You can send any comments, suggestions and bugs to demian@bhnet.com.br New versions can be found at: http://www.bhnet.com.br/~demian http://web.unix.horizontes.com.br/~demian If you do any modification to this code, please send me a copy. If you use this code on any 'real-life' application, please let me know. If you think this code is completely useless, please DON'T LET ME KNOW! Description: TCustomPanel descendent which encapsulates 3 buttons (OK, Cancel, Help) in one panel, allowing the system to treat them as a single object. How to use it: 1. Install the component [VNM Pallete]; 2. Drop one TOCHButton onto a form; 3. Set the 'Orientation' and 'HelpContext' properties; 4. Doubleclick the component for specifying the actions to be executed when the OK button or Cancel button are clicked (There's no event for the Help button. Just specify a value for the 'HelpContext' property). Then, on the TOCHButton OnClick event, insert this code: if OKButton then {OK button action...} else {Cancel button action...};
TOCHOrientation = (Horizontal,Vertical);

Constants


Variables