Copyright: Copyright (C) by Vladimir Kladov, 1999-2001
Citation: Copyright (C) by Vladimir Kladov, 1999-2001


Introduction to KOL

KOL is an abbreviator for Key Objects Library for Delphi, which allows to create very small GUI applications for Windows 9x/Me/NT/2K/XP. KOL itself is not visual and contains only poor Pascal objects, not classes. To allow developing KOL-based projects visually, MCK (Mirror Classes Kit) provided.

KOL supports now Delphi2, Delphi3, Delphi4, Delphi5 and Delphi6.

You may contact author by sending e-mail to: bonanzas@xcl.cjb.net.

On internet, KOL Web Page is located at: http://xcl.cjb.net


Unit KOL.PAS

This is the main unit of KOL library. Its size is greater than 1,6 MBytes, and it contains definitions and code for the most of objects of Key Objects Library. This is done so, because every unit, used in Delphi project, adds some amount of size (about 50-100 bytes) to the executable, but the main purpose of KOL is to economy size of the executable.

Following objects are defined in KOL (for objects, having mirror components in MCK, those are listed too, for quick reference):

<not finished>

And following groups of utility functions and procedures are defined in KOL:

File handling routines

Date/time handling routines

String handling routines

Color working routines

Keyboard extension routines

See also: MCK units mirror, mckCtrls, mckObjs.


Color working routines from KOL.PAS unit

KOL unit

Color2RGB

Color2RGBQuad

ColorsMix


Color2RGB function
Color2RGB

KOL unit

Converts color to RGB, if necessary.

function Color2RGB( Color: TColor ): TColor;


Color2RGB function
Color2RGBQuad

KOL unit

Converts color to RGB quad.

function Color2RGBQuad( Color: TColor ): TRGBQuad;

Note: colors in RGB quad are layed another, that RGB values.

Color is converted first to RGB using Color2RGB function.


ColorsMix function
ColorsMix

KOL unit

Mixes two colors, creating the mean among those.

function ColorsMix( Color1, Color2: TColor ): TColor;


Keyboard extension routines from KOL.PAS unit

KOL unit

MakeAccelerator


MakeAccelerator function
MakeAccelerator

KOL unit

Creates accelerator record.

type

  TMenuAccelerator = packed Record

    fVirt: Byte;	{ or-combination of FSHIFT, FCONTROL, FALT, FVIRTKEY, FNOINVERT }

    Key: Word;	{ character or virtual key code (FVIRTKEY flag is present above) }

    Hidden: Byte;	{ used to save visibility of menu item flag (1 - Hidden, 0 - Visible) }

  end;

function MakeAccelerator( fVirt: Byte; Key: Word ): TMenuAccelerator;

Description

Accelerator returned can be used to assign accelerator key combination to menu items (see TKOLMainMenu.ItemAccelerator[ ] mirror component property).


Topic what you search not found.

This is a beta version of KOL & MCK help, and some topics are not yet complete.


Release notes on Mirror Classes Kit for Key Objects Library help.

Version of this help file is: 1.0.94, 1-Sep-2001

It is appled to KOL and MCK version 0.94, released 1-Sep-2001.

Copyright © by Vladimir Kladov, 2001

KOL&MCK Library Software License Agreement

BEFORE PROCEEDING WITH THE INSTALLATION

AND/OR USE OF THIS SOFTWARE, CAREFULLY

READ THE FOLLOWING TERMS AND CONDITIONS

OF THIS LICENSE AGREEMENT AND LIMITED

WARRANTY (The "Agreement").

BY INSTALLING OR USING THIS SOFTWARE YOU

INDICATE YOUR ACCEPTANCE OF THIS

AGREEMENT. IF YOU DO NOT ACCEPT OR AGREE

WITH THESE TERMS, YOU MAY NOT INSTALL OR

USE THIS SOFTWARE!

PREAMBLE

The terms and conditions of the KOL&MCK

Library Software License Agreement have

one major goal in mind; to foster a development

community based around the KOL (Key Objects

Library) and MCK (Mirror Classes Kit for KOL)

and associated source code.

KOL&MCK Library does however reserve the

right as the sole distributor of the library

source code. Hence although I encourage

you to change and modify the library to

suit your needs, you may not distribute

derivative works based on the library

source code without express written

permission from KOL&MCK Library author.

Worthwhile changes and modifications to

the libraries may be submitted to KOL&MCK

Library author for integration into a

future release of the product.

LICENSE

This software, including documentation,

source code, object code and/or additional

materials (the "Software") is owned by

KOL&MCK author.

This Agreement does not provide you with

title or ownership of Product, but only a

right of limited use as outlined in this

license agreement. KOL&MCK Library author

hereby grant you a non-exclusive,

royalty free license to use the Software

as set forth below:

 . integrate the Software with your

   Applications or DLLs, subject to the

   redistribution terms below.

 . modify or adapt the Software in whole

   or in part for the development of

   Applications based on the Software.

 . use portions of the KOL&MCK Library

   source code or KOL&MCK Library Demo

   Programs in your own products and

   libraries.

REDISTRIBUTION RIGHTS

You are granted a non-exclusive,

royalty-free right to reproduce and

redistribute executable files created

using the Software (the "Executable Code")

in conjunction with software products that

you develop and/or market (the

"Applications").

RESTRICTIONS

Without the expressed, written consent of

KOL&MCK Library author, you may NOT:

 . distribute modified versions of the

   Software, in whole or in part without

   providing an information about it for

   your customers (such information

   must refer to any Copyright and legal

   notes on portions of Software distributed,

   version information on Software used

   to redistribute, notes on changes

   made, if any, and must include any

   necessary information to provide a chance

   for your customers to find and re-use

   the original Software if they want to

   do so).

 . rent or lease the Software.

 . sell any portion of the Software on

   its own, without integrating it into

   your Applications or DLLs as Executable

   Code.

SELECTION AND USE

You assume full responsibility for the

selection of the Software to achieve your

intended results and for the installation,

use and results obtained from the Software.

LIMITED WARRANTY

THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT

WARRANTY OF ANY KIND EITHER EXPRESSED OR

IMPLIED, INCLUDING BUT NOT LIMITED TO THE

IMPLIED WARRANTIES MERCHANTIBILITY AND

FITNESS FOR A PARTICULAR PURPOSE. THE

ENTIRE RISK AS TO THE QUALITY AND

PERFORMANCE OF THE PRODUCT IS WITH YOU.

SHOULD THE PRODUCT PROVE DEFECTIVE, YOU

ASSUME THE COST OF ALL NECESSARY SERVICING

OR ERROR CORRECTION.

KOL&MCK LIBRARY AUTHOR DO NOT WARRANT THAT

THE FUNCTIONS CONTAINED IN THE SOFTWARE

WILL MEET YOUR REQUIREMENTS OR THAT THE

OPERATION OF THE SOFTWARE WILL BE

UNINTERRUPTED OR ERROR FREE.

No oral or written information given by

KOL&MCK Library shall create a warranty.

LIMITATION OF REMEDIES AND LIABILITY.

IN NO EVENT SHALL KOL&MCK LIBRARY AUTHOR, OR

ANY OTHER PARTY WHO MAY HAVE DISTRIBUTED

THE SOFTWARE AS PERMITTED ABOVE, BE LIABLE

FOR DAMAGES, INCLUDING ANY GENERAL,

SPECIAL, INCIDENTAL, OR CONSEQUENTIAL

DAMAGES ARISING OUT OF THE USE OR

INABILITY TO USE THE SOFTWARE (INCLUDING

BUT NOT LIMITED TO LOSS OF DATA OR DATA

BEING RENDERED INACCURATE OR LOSSES

SUSTAINED BY YOU OR THIRD PARTIES OR

FAILURE OF THE SOFTWARE TO OPERATE WITH

ANY OTHER PRODUCTS), EVEN IF SUCH HOLDER

OR OTHER PARTY HAS BEEN ADVISED OF THE

POSSIBILITY OF SUCH DAMAGES.

If you have any questions regarding this

agreement, please contact KOL&MCK Library

author at his e-mail addresses:

bonanzas@xcl.cjb.net

bonanzas@online.sinor.ru

KOL&MCK Library Web Site:

http://xcl.cjb.net


Introduction to MCK

Mirror Classes Kit for Delphi is a set of components to represent at design time KOL objects (see KOL – Key Objects Library). After compile and run MCK project, MCK components are replaced with KOL objects, and executable becomes extremely small.

Essence of idea of "mirror classes" is concluded in following. For each visually isolated object of KOL library Delphi VCL component is created, which is registered by usual way for Delphi components and placed on the Component Palette. A  term "visually isolated object" used here because the same (from formal standpoints) object type in KOL can implement of different visual elements. For instance, TControl can be either form, or button, or label, or any other visual element.

Designing of project in "mirror" classes consists in following two steps:

1.	Placing two components TKOLProject and TKOLForm on the form, and running project first time to convert it into KOL-compliant.

1.	When working with it at the design time as with usual VCL project, and when the project is compiled, KOL objects are substituting correspondent mirror VCL objects, and application becomes very small.

The main difference of designing project for KOL using MCK from VCL are follows:

-	You should not change properties of the form itself, excluding changing its size and position at design time. Change properties of TKOLForm component on it instead. Also, do not create events for a form itself, create events for TKOLForm component on it instead.

-	You should not drop any non-MCK components or controls onto the form. Use only special MCK components designed for working with KOL project. (Though non-visual components are supported, using it increases size of the executable a lot, so these are not recommended in KOL/MCK projects)

-	Some of properties of MCK components are for design time only and such properties are not available at run-time. The most of such properties are named with small letters.

-	To resolve a conflict between "Self" in VCL and "@Self" in KOL (which means the same), special word "Form" is introduced. It is implemented as a property, which returns at run-time pointer to a form (of type PControl), and is understand at design time by Delphi compiler as a synonym of Self.

   Always use this word in event handlers, created at design time, as a substitute of pointer to a form. Do not write

Caption := 'Hello!';

Write instead:

Form.Caption := 'Hello!';

Therefore, controls and objects, placed onto form at design time, are available by the same way like in VCL. If You write

Button1.Click;

this will be interpreted as usual.

-	painting of "mirror" controls at design-time now implemented schematic, but later it is possible to work out painting in detail, overriding Paint method of TKOLControl descendants. (Moreover, it could be possible to switch between two painting methods, e.g. by checking special property of TKOLProject component and to get other advantages - now not implemented yet).

All other notes are the same as for programming with KOL non-visually.

MCK supports now Delphi2, Delphi3, Delphi4, Delphi5 and Delphi6.

You may contact author by sending e-mail to: bonanzas@xcl.cjb.net.

On internet, KOL Web Page is located at: http://xcl.cjb.net


Creating new MCK Project

1. Start Delphi and choose File|New Application.

2. DO NOT place any components on the form at this stage. Choose File|Save All and select the destination folder for your project. Note that ALL FILES of your project ALWAYS HAVE TO BE PLACED IN THE SAME DIRECTORY!

You may change the name of the .PAS file, but you MUST NOT change the name of the .DPR file.

3. Place the [image] TKOLProject component onto the form.

4. The name of the output MCK file can be set by changing the ProjectDest property (path and extension MUST NOT be included). If you type MySuperKOLProj, for instance, then the output MCK project will be named MySuperKOLProj.DPR. The EXE file's name will be (as you might have guessed already) MySuperKOLProj.EXE.

5. Drop [image] TKOLForm component onto the form.

6. In DELPHI5 only: Project | Options | Directories/Conditionals | Search path, add:

   $(Delphi)\Source\ToolsApi

   (this only seems to be necessary when working with Delphi 5 - the compiler needs to know the path to toolintf.pas, dsgnintf.pas, editintf.pas and exptintf)

7. If the TKOLForm component was dropped (5.) AFTER changing ProjectDest property of TKOLProject component (4.), this step is not necessary, and destination project is ready. Otherwise:

   change any property of the TKOLForm (or change the form's size or position). Even though no exe-file is created, you can open the resulting project immediately. This way allows you to convert a dll-project to a mck-compatible one as well.

8. Open the resulting project (it should be found in the same directory). Now it is high time you removed Project1.* - these files are no longer necessary.

9. Play with your new KOL/MCK Project (adjust parameters, drop TKOL... components, compile, run, debug, etc.) Enjoy!


Adding a form to MCK project

1. File|New form

2. Save it IN THE SAME directory where project is located.

3. Drop TKOLForm object onto it.

4. Be sure that You have TKOLApplet component dropped on the main form.
(Note: it is possible not to use TKOLApplet only in case when You have a single form, may be with several not auto-created modal forms).

5. If the AutoBuild property of the TKOLProject component is turned off: select TKOLProject component on the main form and double click its property BUILD. (Otherwise, all should be done already, isn't it?)

Answer OK to all questions about reload changed files into IDE (if any).

6. Do not forget change project options, if new form should not be auto-created. And now, You can build project.


Main form – is the form, which is created first in KOL project. When KOL project is created visually using MCK, the main form must contain component TKOLProject, placed on it.


Removing a form from the MCK project

1. Project | Remove from project... as usual.

2. Select TKOLProject, double click BUILD property. (Than answer OK, to reload changed files into IDE - if any).


WRITING MIRROR CODE

Do not use names from VCL, especially from SysUtils, Classes, Forms, etc. All what needed, can be found in KOL.pas, Windows.pas, Messages.pas, ShellAPI.pas, and also in some additional packages, provided with KOL. Or, it is possible to write needed code manually or grab it (partially) from other VCL sources

When write code in mirror project - usually place it in event handlers.

It is possible to add a code where you wish but avoid changing first section of your mirror VCL form class declaration. And do not change auto-generated inc-files.

Always remember, that code, written in mirror project, must be accepted both by VCL and KOL. By VCL - at the stage of designing mirror project (and this is necessary, because otherwise the project will not be compiled). And by KOL - at the stage of compiling of written code in KOL namespace.

  THIS IS IMPORTANT:

  To resolve conflict between VCL's variable Self and its KOL appropriate @Self, which are interpreted differently in KOL and VCL, special field is introduced, named Form. In VCL, Form property of TKOLForm component "returns" Self, i.e. form object itself. And in KOL, Form:PControl is a field of object, containing resulting form object. Since this, it is correctly to access form's properties and methods in the following way:

Form.Caption := 'Hello!';

  (The old-style operator Caption := 'Hello!'; will not be compiled correctly in MCK environment).

  But discussed above word Form is only to access form's properties - not its child controls. You access child controls and form event handlers by usual way. e.g.:

Button1.Caption := 'OK';

Button1Click( Form );

  It is possible to create several instances of the same form at run-time. And at least, it is possible to make form not auto-created, and create it programmatically when needed. Use global procedure New<Form1> (replacing <Form1> with your form name), for instance:

NewForm1( TempForm1, Applet );


Legend

Design-time property. At run-time, such property is not available. It is available only while designing KOL/MCK project, e.g., in Object Inspector.

Read-only property. Such property is intended to show information, not to change it.

Has no effect on write (though can be assigned for other objects).

Run-time only property. Such property is available only at run-time.

Protected method or property.

Virtual method.


KOL – Key Objects Library for Delphi. Contains a set of objects to create small but power GUI applications for Windows 9x/ME/NT/2K.


Using VCL non-visual components

Starting from MCK v0.71, it is possible to drop usual VCL-based components onto MCK form, and a code will be generated for proper creation and destructing these components. Please note, that therefore, using VCL-based components in KOL-MCK projects is not a good practice, because a lot of code which is not actually needed will be added to the executable.

However, using of visual VCL components in MCK projects is not possible at all. Moreover, TKOLProject and TKOLForm components are immediately locked, when any such VCL control is found on form. This prevents its from functioning, but avoids any damage due erroneous dropping MCK components onto forms of normal VCL project.

If VCL component is used in your MCK project, please note:

- automatic code generation is not occur even if Autobuild is set to True in TKOLProject. Double click TKOLProject component (e.g.) to force code generation after You change some properties / assign events to the component.

- when You drop the component onto MCK form at design time, Delphi adds a reference to its unit in uses clause of the form unit, but it is placed (usually) between {$IFNDEF KOL_MCK}...{$ENDIF} brackets, so the project can not be compiled. To correct this, go to the beginning of the unit, and move the reference to newly added unit as follows:

..., SomeUnit {$ENDIF};      ->    ... {$ENDIF} , SomeUnit;


Name property
TComponent.Name

TComponent

Name of the component.

property Name: String;

Description

In MCK, property Name is design-time only and is not available at run-time as a property of KOL objects. Instead, it is used only to name objects, while generating code for MCK project. When You write your code, You can refer to objects, correspondent to mirror components, using the same identifier, which is used to name the mirror component.


unit Mirror.pas

This unit contains definitions for following MCK components:

	TKOLProject
	TKOLApplet
	TKOLForm
	TKOLDataModule
	TKOLFrame
	TKOLControl
	TKOLObj


unit MckCtrls.pas

This unit contains definitions for following MCK mirror components:

	TKOLButton
	TKOLBitBtn
	TKOLLabel
	TKOLLabelEffect
	TKOLPanel
	TKOLGradientPanel
	TKOLSplitter
	TKOLGroupBox
	TKOLCheckBox
	TKOLRadioBox
	TKOLEditBox
	TKOLMemo
	TKOLRichEdit
	TKOLListBox
	TKOLComboBox
	TKOLPaintBox
	TKOLImageShow
	TKOLProgressBar
	TKOLListView
	TKOLTreeView
	TKOLToolBar
	TKOLTabControl
See also: units mckObjs, mirror, KOL.


unit MckObjs.pas

This unit contains definitions for following MCK components, mirror tonon-visual KOL objects:

	TKOLTimer
	TKOLThread
	TKOLMainMenu
	TKOLPopupMenu
	TKOLOpenSaveDialog
	TKOLOpenDirDialog
	TKOLColorDialog
	TKOLImageList
	TKOLTrayIcon
See also: units mirror, mckCtrls, KOL.


TKOLProject component
	TKOLProject
Hierarchy	Properties

TKOLProject is a component, which controls code generation for MCK project.

Unit

mirror

Description

A single component of such type must appear in MCK project. It must be placed on the main form of the project. Starting MCK project is always should include dropping TKOLProject component on the form at design time and defining at least its property projectDest.

Actually, mirror components are not present in resulting executable. These only provide code generation for correspondent KOL objects, which actually are not components, but poor Pascal objects.


Hierarchy

TComponent


TKOLProject properties

TKOLProject	Legend

In TKOLProject

autoBuild

autoBuildDelay

BUILD

consoleOut

dprResource

 	isKOLProject

Locked

outdcuPath

projectDest

 	projectName

protectFiles

showReport

sourcePath

in TComponent

Name


TKOLProject.autoBuild

TKOLProject

Controls a way, how code will be generated at design time.

property autoBuild: Boolean;

Description

Default value is TRUE. This means, that any changes in properties, made at design time are tracking to initiate automatic code generation to apply changes.

See also: autoBuildDelay, BUILD


TKOLProject.autoBuildDelay

TKOLProject

Controls a way, how code will be generated at design time.

property autoBuildDelay: Integer;

Description

Delay time in milliseconds between checks whether any property was changed. If yes, code is generated.

Default value is 500 (0,5 seconds). Usually, You should not change this value.

See also: autoBuild, BUILD


TKOLProject.BUILD

TKOLProject

Allows forcing code generation at design time by double clicking this property in Object Inspector. Anoter way is double clicking TKOLProject component on designing form.

This is necessary in some cases, when automatic code generation is not working (e.g., turned off, see property autoBuild), or You have VCL's TComponent descendant object on your MCK form. Also, forcing of code generation can be necessary in earlier versions of Delphi (Delphi2, Delphi3), when inc-files were loaded into IDE and coud not be accessed by MCK, when You change some project parameters (see topics about adding and removing forms).


TKOLProject.consoleOut

TKOLProject

Controls if to show debug console.

property consoleOut: Boolean;

Description

Set to TRUE to show debug console. This console can be used for debug MCK itself. In most cases, You never need turn console on.

CAUTION! Never close opened console window using x button on a caption. Instead, change property consoleOut of TKOLProject component.


TKOLProject.dprResource

TKOLProject

Controls resource generation for MCK project.

property dprResource: Boolean;

Description

By default, this property is False, which means that res-file will not be created for project dpr-file, and a code, which refers to dpr resources will be commented:

//{$R *.res}

Set this property to True when creating MCK project first time, if You wish to assign an icon to the application. After the project is created, changing this property does not matter. Just open dpr-file of the project and remove slushes to uncomment a reference to resource including statement.


TKOLProject.isKOLProject

TKOLProject

Shows if the project is detected as correct MCK project.

property isKOLProject: Boolean;
 (read-only)

Description

For MCK projects, correctly created as it is said in instructions (see Creating MCK project), this property always should be True. If this property becomes False, something is wrong. For example, this can be so in result of removing signature comments from project source.


TKOLProject.Locked

TKOLProject

Shows, if the TKOLProject component is locked due erroneous usage, and allows to unlock it after making necessary corrections.

property Locked: Boolean;

Description

When due error VCL visual component is dropped onto MCK form, or otherwise, TKOLProject component is erroneously dropped onto normal VCL form, it becomes locked, and its Locked property becomes True. In this state, TKOLProject component is not functioning. This prevents possible corruptions of normal VCL projects, and other unpredictable consequences of such incorrect TKOLProject component usage.

If the error is a result of incorrect dropping VCL visual component onto MCK form, just remove such component, and then unlock TKOLProject component and TKOLForm component (or its substitution) by double clicking its Locked property in the Object Inspector.

If otherwise TKOLProject component is dropped due an error onto VCL form, just remove it with keyboard key Delete.

See also: TKOLForm.Locked


TKOLProject.outdcuPath

TKOLProject

For now, this property is not used. It is visible in Object Inspector for compatibility with earlier created MCK projects.


TKOLProject.projectDest

TKOLProject

Name of project dpr file, without extension.

property projectDest: String;

Description

Filling with property value with a name of your project dpr file is the necessary, when You first time drop TKOLProject component onto main form. This step must be done when creating MCK project.

TKOLProject component must know the name of a dpr-file to generate it.


TKOLProject.projectName

TKOLProject

Shows current project dpr-file name.

property projectName: String;
 (read-only)

Description

This property shows only current project name. Actually, code is generated for a dpr-file, which name is given by property projectDest.


TKOLProject.protectFiles

TKOLProject

For now, this property is not used. It is visible in Object Inspector for compatibility with earlier created MCK projects.


TKOLProject.showReport

TKOLProject

Controls reports output for debugging purposes.

property showReport: Boolean;

Description

This property controls whether detailed report will be shown while generating code. It is used only for debug purposes for MCK itself.


TKOLProject.sourcePath

TKOLProject

Shows a path to project units sources

property sourcePath: String;

Description

This property shows a path to project units sources. This path always is detected automatically, so do not try to change it in the Object Inspector. Take in attention, that all unit sources together with dpr's source should be located at the same directory.


	TKOLApplet component
Hierarchy	Properties	Events	Methods

TKOLApplet is a mirror of applet control, representing at run time taskbar button of the application.

Unit

mirror

Description

A single component of such type can (but not must) appear in MCK project. If present, it must be placed on the main form of the project. In any KOL project (and since this, in any MCK project, which at run time becomes KOL project), special variable named Applet plays special role. Like the Application variable in any VCL project, it corresponds taskbar button window, which is intended for visual representation of the application on desktop.

But in MCK/KOL project, creating special window for such purpose is optional, and in case, when TKOLApplet is not used, the main form variable is assigned to the Applet variable at run-time, and functioning like Applet. At least, in case when the project contains of a single form, may be with several not auto-created additional modal forms, and there are no needs to hide application taskbar button or to do some other special works, using of TKOLApplet can be omitted.

In the Key Objects Library, any windowed control, and Applet too, is of type TControl. Since this, all properties, methods and events, declared for KOL's TControl object type, are available for Applet too. But, the most of them are not appropriate for taskbar button window. So, only such of those are represented here, which are useful for Applet.


TKOLApplet properties

TKOLApplet	Legend

In TKOLApplet

Caption

Icon

Visible

Tag

in TComponent

Name


TKOLApplet.Caption

TKOLApplet

Taskbar button window caption.

property Caption: String;

Description

Taskbar button window caption string.

Example

Applet.Caption := 'MyApp';

See also: TKOLControl.Caption


TKOLApplet.Icon

TKOLApplet

The name of icon resource for taskbar button window, and for default icon, used in all application forms.

property Icon: String;

Description

Icon property is available at run time too, but as a value of type THandle, not a String.

If a value is not assigned to the Icon property (at design time), default application icon (if any present) is used. By default, this is a resource, named 'MAINICON'. But in MCK project, it can be omitted in the executable, if dprResource property of TKOLProject component was FALSE when MCK project was created first time.

Another possible value is string '-1' (without quotas). This value means, that the application will not even try to load icon resource. This garantees, that some debugging tools (such as MemProof) will not alert about attempts to load unexisting resource.


TKOLApplet.Visible

TKOLApplet

Visibility of the application taskbar button.

property Visible: Boolean;

Description

This property is TRUE, if the application taskbar button is visible, and FALSE otherwise. Default value is TRUE. Set this property to FALSE at design time to make taskbar button hidden when the application is starting (at run time).

Note: it is possible to make application taskbar button invisible only in case if TKOLApplet component is used in a project.


TKOLApplet events

TKOLApplet

In TKOLApplet

OnClose

OnDestroy

OnMessage


TKOLApplet.OnClose

TKOLApplet

Occurs when the application is closing.

type

  TOnEventAccept = procedure( Sender: PObj; var Accept: Boolean ) of object;

property OnClose: TOnEventAccept;

Description

Use OnClose to perform special processing when an application is closing. For example, it is possible to disable closing the application if some data could not be correctly saved.

See also: TKOLForm.OnClose


KOL Applet object specific methods

TKOLApplet

Applet window has no very specific methods. Some specific methods are the same as methods of KOL form object. All other methods are the same as for any other TControl object in KOL (see TKOLControl's methods). Just remember, that not all of those are useful with application taskbar button object, correspondent to TKOLApplet component.


	TKOLForm component
Hierarchy	Properties	Events	Methods

TKOLForm is a mirror of form control, representing at run form window.

Unit

mirror

Description

Every MCK form should have TKOLForm component (or its descendant) on it.

In the Key Objects Library, any windowed control, and form too, is of type TControl. Since this, all properties, methods and events, declared for KOL's TControl object type, are available for form too. But, some of them are not appropriate for form window. So, only such of those are represented here, which are useful for form control.

At run time, form control is represented by field Form of the object, named exactly as design-time form object. Since this, to access form's properties, methods, events at run-time, qualify form using its variable name Form. This means, that to change Caption of the form, You should write in form's event handler, e.g.:
Form.Caption := Form.Caption + '!';

And, in other object method or regular procedure, this should look like:
Form1.Form.Caption := Form1.Form.Caption + '!';


TKOLForm properties

TKOLForm	Legend

In TKOLForm

AlphaBlend

Border

bounds

CanResize

Caption

CenterOnScreen

closeIcon

Color

Ctl3D

Cursor

defaultPosition

defaultSize

DoubleBuffered

Enabled

EraseBackground

Font

formMain

formName

 	formUnit

HasBorder

HasCaption

Icon

Locked

MarginBottom

MarginLeft

MarginRight

MarginTop

ModalResult

maximizeIcon

minimizeIcon

MinimizeNormalAnimated

PreventResizeFlicks

SimpleStatusText

StatusText

StatusPanelRightX

StayOnTop

Tabulate

TabulateEx

Tag

Transparent

Visible

WindowState

zOrderChildren

in TComponent

Name


TKOLForm.Caption

TKOLForm

Form caption.

property Caption: String;

Description

Form window caption string.

Example

Form1.Form.Caption := 'MyApp';

See also: TKOLControl.Caption


TKOLForm.Icon

TKOLForm

The name of icon resource for a form.

property Icon: String;

Description

Icon property is available at run time too, but as a value of type THandle, not a String.

If a value is not assigned to the Icon property (at design time), default application icon (if any present) is used. By default, this is a resource, named 'MAINICON'. But in MCK project, it can be omitted in the executable, if dprResource property of TKOLProject component was FALSE when MCK project was created first time.

Another possible value is string '-1' (without quotas). This value means, that the application will not even try to load icon resource. This garantees, that some debugging tools (such as MemProof) will not alert about attempts to load unexisting resource.


TKOLForm.Locked

TKOLForm

Shows, if the TKOLForm component is locked due erroneous usage, and allows to unlock it after making necessary corrections.

property Locked: Boolean;

Description

When due error VCL visual component is dropped onto MCK form, or otherwise, TKOLForm component is erroneously dropped onto usual VCL form, it becomes locked, and its Locked property becomes True. At this state, TKOLForm component is not functioning. This prevents possible corruptions of usual VCL projects, and other unpredictable consequences of such incorrect TKOLForm and TKOLProject components usage.

If the error is a result of incorrect dropping VCL visual component onto MCK form, just remove such component, and then unlock TKOLForm and TKOLProject components (or its substitution) by double clicking its Locked property in the Object Inspector.

If otherwise TKOLForm component is dropped due an error onto VCL form, just remove it with keyboard key Delete.

See also: TKOLProject.Locked


TKOLForm.Tabulate

TKOLForm

Determines, if TAB / SHIFT+TAB keys are available in a form to switch between controls.

property Tabulate: Boolean;

function Tabulate: PControl;

Description

At run-time, this property is not exists, but so-called method is available, which returns form itself.

See also: TabulateEx


TKOLForm.TabulateEx

TKOLForm

Determines, if TAB / SHIFT+TAB keys are available in a form to switch between controls.

property TabulateEx: Boolean;

function TabulateEx: PControl;

Description

At run-time, this property is not exists, but so-called method is available, which returns form itself. This property when set to TRUE, provides more intelligent tabulating between controls with keyboard arrow keys (LEFT, RIGHT, TOP, BOTTOM, etc.)

See also: Tabulate


TKOLForm.Visible

TKOLForm

Visibility of the form window.

property Visible: Boolean;

Description

This property is TRUE, if the form is visible, and FALSE otherwise. Default value is TRUE. Set this property to FALSE at design time to make form hidden when the application is starting (at run time).


TKOLForm events

TKOLForm	Legend

In TKOLForm

OnChar

OnClick

OnClose

OnDestroy

OnEnter

OnEraseBkgnd

OnFormCreate

OnHide

OnKeyDown

OnKeyUp

OnLeave

OnMessage

OnMouseDblClk

OnMouseDown

OnMouseEnter

OnMouseLeave

OnMouseMove

OnMouseUp

OnMouseWheel

OnMove

OnPaint

OnResize

OnShow


TKOLForm.OnClose

TKOLForm

Occurs when the form is closing.

type

  TOnEventAccept = procedure( Sender: PObj; var Accept: Boolean ) of object;

property OnClose: TOnEventAccept;

Description

Use OnClose to perform special processing when an application is closing. For example, it is possible to disable closing the application if some data could not be correctly saved.

See also: TKOLApplet.OnClose


TKOLForm.OnFormCreate

TKOLForm

Occurs immediately after creating the control, its children and assigning all properties and events for the control and all its children.

type
  TOnEvent = procedure( Sender: PObj ) of object;

property OnFormCreate: TOnEvent;

Description

This property is design-time only and exists only for MCK projects. At run time, it is emulated by direct call to the "event handler", if it is specified.


KOL Form object specific methods

TKOLForm

Close

GotoControl

Hide

IconLoad

IconLoadCursor

IsMainWindow

MinimizeNormalAnimated

RemoveStatus

Show

ShowModal

StatusPanelCount

StatusWindow


TKOLControl component

Hierarchy	Properties	Events	Methods

Base class for mirrors of visual KOL controls.

Unit

mirror

Description

TKOLControl is a base class for the most of mirror components, which are corresponding to different KOL visual controls, represented in KOL itself as a single object type, TControl. TKOLControl is introduced just to make mirror components code smaller, though actually there are no exact correspondance between mirror components and KOL controls. Moreover, some mirror components could not be created as descendant from TKOLControl, though actually these also are corresponding to the same KOL object type TControl. Such are, for instance, TKOLForm, TKOLApplet, which should be designed for some reasons as VCL's TComponent descendants, not TControl, to leave out some Delphi VCL restrictions.


TKOLControl properties

TKOLControl	Legend

In TKOLControl

Align

Border

Brush

Caption

CenterOnParent

ClientHeight

ClientWidth

ClsStyle

Color

Ctl3D

Cursor_

DoubleBuffered

Enabled

EraseBackground

ExStyle

Font

Handle

MarginBottom

MarginLeft

MarginRight

MarginTop

Parent

parentColor

parentFont

popupMenu

PlaceDown

PlaceRight

PlaceUnder

Style

TabOrder

TabStop

Tag

TextAlign

Transparent

VerticalAlign

Visible

in TComponent

Left

Top

Width

Height

Name


TKOLControl.Align

TKOLControl

Control aligning.

type
  TControlAlign = ( caNone, caLeft, caTop, caRight, caBottom, caClient );

property Align: TControlAlign;

Description

Control aligning is implemented in KOL very similar to VCL. The main difference is that if there are no controls aligned using such property in the application, the most of code, responding for aligning, is not linked to the executable.

Another difference is that aligning constants are named another. This could be a problem for MCK projects, because compiler is annoying when this property is assigned directly in run-time code. Fortunately, this problem can be solved easy: it is sufficiently to call SetAlign method to avoid such problem.

One more difference is that a distance between aligned controls, and between those and client edge of the parent can be adjusted with property Border of the parent control.

In KOL/MCK, any control has such property. It is possible easy align any control (remember, that in VCL some controls have no such property, that can be confusing a bit).


TKOLControl.Border

TKOLControl

Inner border of the control.

property Border: Integer;

Description

This property is intended mainly for those controls, which could be a parent for another. It means a distance in pixels between control edge and its aligned (using property Align) children, and a distance between aligned children too.

Default value is 2. But, at run-time child control when created is iheriting Border property value from its parent.

Note: in KOL, any control can be a parent for another. For convenience, this capability is hidden for some control types at design time. For example, dropping a control over TKOLButton does not lead to become for the button to be a partent of a dropped control. Such behavior is similar to VCL. Therefore, at run-time it is possible to make a button a parent for other control, if You wish.

In older versions of KOL/MCK, this property was named Margin. Now, there are some other properties, named similar (MarginLeft, MarginRight, MarginTop, MarginBottom). For compatibility with earlier created MCK projects, property Margin is still available as a synonim for Border property.


KOL TControl.Brush
TKOLControl.Brush

TKOLControl

Determines brush to fill out background of the control.

property Brush: PGraphicTool;

Description

<not finished>


TKOLControl.Caption

TKOLControl

Window caption or control text.

property Caption: String;

Description

See also: Applet.Caption, Form.Caption


TKOLControl.CenterOnParent

TKOLControl

Determines if the control is created centered on ite parent, or the form is created centered on screen.

function CenterOnParent: PControl;

Description

Thouht at design-time CenterOnParent is available as a property of type Boolean, actually in KOL it is implemented as a method, which centeres control on its parent (or form on the screen). At design time, assigning TRUE to this property, You just determine, if such method is called when the control is created.

Calling this method occurs only after calculating a size of the control (or form).


KOL TControl.ClientHeight

TKOLControl

Height of the client area of the control.

property ClientHeight: Integer;

Description

This is run-time only property. It allows to access or change height of control's client area.

See also: ClientWidth, Height properties.


KOL TControl.ClientWidth

TKOLControl

Width of the client area of the control.

property ClientWidth: Integer;

Description

This is run-time only property. It allows to access or change width of control's client area.

See also: ClientHeight, Width properties.


TKOLControl.ClsStyle

TKOLControl

Class style of the control window.

property ClsStyle: DWORD;

Description

Run-time only property. Useful only when a control is created dynamically, to access or change window class style.

See also: Style, ExStyle.


TKOLControl.Color

TKOLControl

Background color of the control.

property Color: TColor;

Description

If a property Brush is not changed, property Color is used to determine background color for the control.

Default color is clBtnFace for the most of controls, and clWindow for others. At run-time, Color is inherited from parent control.


KOL TControl.Ctl3D
TKOLControl.Ctl3D

TKOLControl

Determines, if the control has modern 3D-look view.

property Ctl3D: Boolean;

Description

Default value is TRUE for most of controls (excluding labels and some other similar controls). At run-time, this property is inherited from a parent.


KOL TControl.Cursor
TKOLControl.Cursor

TKOLControl

Mouse cursor shape for a control.

property Cursor_: String;

property Cursor: HCursor;

Description

At design-time, Cursor_ property is available as a string, and can be assigned to a name of cursor resource, or an identifier of standard cursor. Following standard cursors are available:

IDC_ARROW
IDC_IBEAM
IDC_WAIT
IDC_CROSS
IDC_UPARROW
IDC_SIZE
IDC_SIZENWSE
IDC_SIZENESW
IDC_SIZENS
IDC_SIZEALL
IDC_NO
IDC_HAND
IDC_APPSTARTING
IDC_HELP

If there are no value assigned to this property at design time, default cursor is used (usually IDC_ARROW).

At run-time, property Cursor is available as a value of type HCursor.


TKOLControl.DoubleBuffered

TKOLControl

TRUE, if the control is painting though memory bitmap to avoid some flicks during often repainting operations.

property DoubleBuffered: Boolean;

Description

<not finished>


KOL TControl.Enabled
TKOLControl.Enabled

TKOLControl

Determines if the control is enabled.

property Enabled: Boolean;

Description

Default value is TRUE. Set it to FALSE to make the control initially disabled.


TKOLControl.EraseBackground

TKOLControl

Determines, if a background of the control should be erased in responce to WM_ERASEBKGND window message.

property EraseBackground: Boolean;

Description

Default value is TRUE, and this means, that there are no code will be added, and control background will be erased in responce to WM_ERASEBKGND as usual. Setting this property to FALSE allows speed up repainting of controls, which require a lot of drawing operations, and reduce flickering in some cases.

See also: OnEraseBkgnd event.


KOL TControl.ExStyle
TKOLControl.ExStyle

TKOLControl

Extended style of control window.

property ExStyle: DWORD;

Description

<not finished>


TKOLControl.Font

TKOLControl

Font of the control.

property Font: TKOLFont;
property Font: PGraphicTool;

Description

If there are no controls in a project, which Font property is changed at design time, and Font is not accessed by any other your code, this can economy size of the executable a bit, because there are no code, maintaining Font object is added. But default system font will be used in the application. And, since KOL controls are not auto-sized in correspondance with font size used, some text will not fit to controls.

At run time, Font is inherited from the parent control. At design time, Font property is accessible as special mirror class TKOLFont, which has the same properties as run-time object TGraphicTool, implementing font (this object also can implement brush or pen).


TKOLControl.Handle

TKOLControl

Handle of the control window.

property Handle: THandle;

Description

Handle is not allocated just by getting it by reading this property. Either use GetWindowHandle function, or CreateWindow procedure to ensure, that the Handle is allocated. To examine if the Handle is already allocated without allocating it, it is also possible (and recommended) to use function HandleAllocated.


TKOLControl.Icon

TKOLControl

The name of icon resource for taskbar button window, and for default icon, used in all application forms.

property Icon: String;

Applicable to: TKOLApplet, TKOLForm

Description

Icon property is available at run time too, but as a value of type THandle, not a String.

If a value is not assigned to the Icon property (at design time), default application icon (if any present) is used. For a form, this is an Icon of the Applet (either separate window, representing application taskbar button, or the main form of the application). For Applet itself, by default, this is a resurce, named 'MAINICON'. But in MCK project, it can be omitted in the executable, if dprResource property of TKOLProject component was FALSE when MCK project was created first time.

Another possible value is string '-1' (without quotas). This value means, that the application will not even try to load icon resource. This garantees, that some debugging tools (such as MemProof) will not alert about attempts to load unexisting resource.


TKOLControl.MarginXXX properties
TKOLControl.MarginLeft, MarginRight, MarginTop, MarginBottom properties

TKOLControl

Determine margins from client area edges to logical client area edges.

property MarginLeft: Integer;

property MarginRight: Integer;

property MarginTop: Integer;

property MarginBottom: Integer;

Description

Default value for the most of controls is 0 for all these properties. But some controls, such as TKOLGroupBox, are defining its client rectangle incorrectly when API function GetClientRect is called. So, these additional margins were introduced to correct this problem and to provide good behaviour of Align property for child controls. Later, these properties were made available for all controls to improve aligning feature in KOL. Just change appropriate MarginXXX property, if You want to provide additional space between certain parent's client edge and its aligned (using property Align) child controls at this side.


KOL TControl.Parent property
KOL TControl.Parent

TKOLControl

Parent control.

property Parent: PControl;
 (run-time only)

Description

It is possible at run time to use this property to change Parent for the most of controls. Remember, that some of controls are designed so, that its can not change its parent window "on fly". E.g., such a control is combobox control.


TKOLControl.parentColor

TKOLControl

Determines, if a value of property Color should be inherited from parent control.

property parentColor: Boolean;

Description

This property is design-time only, and it is not exists at run time.

At design-time, this property is automatically changes to FALSE, when property Color becomes different than property Color of the parent control. And otherwise, by changing this property to TRUE, it is possible to restore control's property Color to the same as such property of its parent.


TKOLControl.parentFont

TKOLControl

Determines, if a value of property Font should be inherited from parent control.

property parentFont: Boolean;

Description

This property is design-time only, and it is not exists at run time.

At design-time, this property is automatically changes to FALSE, when property Font becomes different than property Font of the parent control. And otherwise, by changing this property to TRUE, it is possible to restore control's property Font to the same as such property of its parent.


TKOLControl.PlaceXXX
TKOLControl.PlaceRight, PlaceDown, PlaceUnder properties

TKOLControl

Special control placement.

property PlaceRight: Boolean;

property PlaceDown: Boolean;

property PlaceUnder: Boolean;

Description

These properties are design-time only. At run-time, correspondent methods PlaceRight, PlaceDown, PlaceUnder are exist.

PlaceRight moves a control just right to previous one.

PlaceDown moves a control below previous one.

PlaceUnder moves a control below, and to the same Left position.

In sample below, controls arecreated in following order: #1, #2, #3, #4:


TKOLControl.popupMenu

TKOLControl

Automatic pop-up menu for the control and all its child controls, which have no its own automatic popup menu.

property popupMenu: TKOLPopupMenu;

procedure SetAutoPopupMenu( PopupMenu: PObj );

Description

To popup automatic popup menu, message WM_CONTEXTMENU is used.

At run time this property is not available. Use procedure SetAutoPopupMenu to assign automatic popup menu at run-time. (It is possible to pass nil to reset automatic popup menu).


KOL TControl.Style
TKOLControl.Style

TKOLControl

Window style of the control's window.

property Style: DWORD;

Description

<not finished>


TKOLControl.TabOrder

TKOLControl

Tabulating order of the control.

property TabOrder: Integer;

Description

This property determines an order in which the control will be tabulated using keyboard keys TAB and SHIFT+TAB. Also, its value affects an order in which the control is created (this can be important for correct controls aligning usin property Align).

Note: this property has no effect, if both properties Tabulate and TabulateEx of the parent form are turned off.


TKOLControl.TabStop

TKOLcontrol

Determines, if a control can get focus in result of pressing TAB / SHIFT+TAB keyboard keys.

property TabStop: Boolean;

Description

For some controls, this property is not available at design time. TRUE means that a focus can be captured by the control in result of pressing TAB / SHIFT+TAB keyboard key, but only if at least one of properties Tabulate and TabulateEx is TRUE for its parent control.

Aslo, by setting this property to FALSE, it is possible to make a control non-focusable. E.g., for a button this makes it mouse-handled only, like speed button in VCL.


TKOLControl.Tag

TKOLControl

User-defined 32-bit integer number.

property Tag: Integer;

Description

This property can be used to store additional number. Tag has no predefined meaning. The Tag property is provided for the convenience of developers. It can be used for storing an additional integer value or it can be typecast to any 32-bit value such as a component reference or a pointer.

Default value is 0.


TKOLControl.TextAlign

TKOLControl

Text horizontal aligning for buttons, labels, panels, group boxes, etc.

type
  TTextAlign = ( taLeft, taRight, taCenter );

property TextAlign: TTextAlign;

Description

Horizontal aligning of inner text is available for some types of controls only, not for all. For some other controls, horizontal text aligning also is possible, but by another ways, certain for such controls (e.g., for EditBox and Memo – using its property Options, etc.)

See also: VerticalAlign property.


TKOLControl.Transparent

TKOLControl

property Transparent: Boolean;

Description

<not finished>


TKOLControl.VerticalAlign

TKOLControl

Text vertical aligning for buttons, labels, panels.

type
 TVerticalAlign = ( vaCenter, vaTop, vaBottom );

property VerticalAlign: TVerticalAlign;

Description

Vertical aligning of inner text is available for some types of controls only, not for all. And for some controls (based on label control), vaBottom aligning style is not available.

See also: TextAlign property.


TKOLControl.Visible

TKOLControl

Visibility of the control.

property Visible: Boolean;

Description

This property is TRUE, if the control window is visible, and FALSE otherwise. Default value is TRUE. Set this property to FALSE at design time to make a control hidden when its parent is creating (or the application is starting).


TKOLControl_Left
TKOLControl.Left

TKOLControl

Left coordinate of the top-left corner point of the control.

property Left: Integer;

Description

Coordinates are relative to the client of parent control, or for form, to the desctop.

See also: Top, Width, Height properties, SetPosition, Size, SetSize methods.


TKOLControl_Width
TKOLControl.Width

TKOLControl

Width of the control.

property Width: Integer;

Description

This property determines entire width of the control, including its non-client area. To work with client area width, use ClientWidth property.

See also: Left, Top, Height properties, SetPosition, Size, SetSize methods.


TKOLControl_Height
TKOLControl.Height

TKOLControl

Height of the control.

property Height: Integer;

Description

This property determines entire height of the control, including its non-client area. To work with client area height, use ClientHeight property.

See also: Left properties, Top, Width, SetPosition, Size, SetSize methods.


TKOLControl_Top
TKOLControl.Top

TKOLControl

Top coordinate of the top-left corner point of the control.

property Top: Integer;

Description

Coordinates are relative to the client of parent control, or for form, to the desctop.

See also: Left, Width, Height properties, SetPosition, Size, SetSize methods.


TKOLControl events

TKOLControl

In TKOLControl

OnChar

OnClick

OnDestroy

OnDropFiles

OnEnter

OnEraseBkgnd

OnKeyDown

OnKeyUp

OnLeave

OnMessage

OnMouseDblClk

OnMouseDown

OnMouseEnter

OnMouseLeave

OnMouseMove

OnMouseUp

OnMouseWheel

OnMove

OnPaint

OnResize

OnShow

OnHide


TKOLControl.OnChar

TKOLControl

Occurs when keyboard char code is received (corresponds to WM_CHAR, WM_SYSCHAR window message).

type
  TOnChar = procedure( Sender: PControl; var Key: Char; Shift: DWORD ) of object;

property OnChar: TOnChar;

Description

Applied to controls, which can capture keyboard focus (edit controls, buttons, etc.)

See also: OnKeyDown, OnKeyUp events.


TKOLControl.OnClick

TKOLControl

Occurs when the control is clicked (usually by mouse, but for some controls by any other way, including programmatically).

type
  TOnEvent = procedure( Sender: PObj ) of object;

property OnClick: TOnEvent;

Description

<not finished>


TKOLControl.OnDestroy

TKOLControl

Occurs when a control is destroyed.

type
  TOnEvent = procedure( Sender: PObj ) of object;

property OnDestroy: TOnEvent;

Description

In KOL, any object, derived from TObj (i.e. any KOL object) has such event. The event handler, if assigned, is called in the destructor, when the object itself is yet exists.

Note: if You want to show a message on screen, when the object is destroyed, preferred method to do this is ShowMsgModal, which can work correctly even after closing the application and finishing message loop handling.

See also: TKOLObj.OnDestroy


TKOLControl.OnDropFiles

TKOLControl

Occurs when a file (or group of files) is dropped onto the control in result of drag-and-drop operation.

type
  TOnDropFiles = procedure( Sender: PControl; const FileList: String; const Pt: TPoint ) of object;

property OnDropFiles: TOnDropFiles;

Description

When this property is assigned, a control is registered as drag-and-drop target for files dropping automatically.


TKOLControl.OnEnter

TKOLControl

Occurs when the control receives keyboard focus.

type
  TOnEvent = procedure( Sender: PObj ) of object;

property OnEnter: TOnEvent;

Description

<not finished>

See also: OnLeave event.


TKOLControl.OnEraseBkgnd

TKOLControl

Occurs, when a background of the control should be erased.

type
  TOnPaint = procedure( Sender: PControl; DC: HDC ) of object;

property OnEraseBkgnd: TOnPaint;

Description

It is possible to define custom painting in respond to this event. Any control in KOL has this event.

See also: OnPaint event.


TKOLControl.OnKeyDown

TKOLControl

Occurs when kayboard key is pressing in the control, having keyboard focus captured.

type
  TOnKey = procedure( Sender: PControl; var Key: Longint; Shift: DWORD ) of object;

property OnKeyDown: TOnKey;

Description

See also: OnKeyUp, OnChar events.


TKOLControl.OnKeyUp

TKOLControl

Occurs when kayboard key is releasing in the control, having keyboard focus captured.

type
  TOnKey = procedure( Sender: PControl; var Key: Longint; Shift: DWORD ) of object;

property OnKeyUp: TOnKey;

Description

See also: OnKeyDown, OnChar events.


TKOLControl.OnLeave

TKOLControl

Occurs when the control loses keyboard focus.

type
  TOnEvent = procedure( Sender: PObj ) of object;

property OnLeave: TOnEvent;

Description

<not finished>

See also: OnEnter event.


TKOLControl.OnMessage

TKOLControl

Occurs when any message is arrived to the window for handling.

type
  TOnMessage = function( var Msg: TMsg; var Rslt: Integer ): Boolean of object;

property OnMessage: TOnMessage;

Description

This event allows to filter all the messages before its are handled by any other handlers. Take in attention, that for such event handler, there are no Sender defined. Either handler should be defined for a certain control, or it should extract destination control object from Msg.hwnd.

The handler should return TRUE only in case when further message handling should be stopped for given message. Otherwise, it should return FALSE, which means, that a message will be handled also by other handlers (though the message can be modified already by the handler).

Another way to handle any messages is to attach dynamically message handling procedure using method AttachProc.


TKOLControl.OnMouseDblClk

TKOLControl

Occurs when the control is double-clicked with mouse (all mouse buttons are considered).

type
TMouseButton = ( mbNone, mbLeft, mbRight, mbMiddle );

TMouseEventData = packed Record

  {* Record to pass it to mouse handling routines, assigned to OnMouseXXXX events. }

    Button: TMouseButton;

    StopHandling: Boolean; { Set it to True in OnMouseXXXX event handler to stop further processing }

    R1, R2: Byte;	// Not used

    Shift : DWORD;	{ HiWord( Shift ) = zDelta in WM_MOUSEWHEEL }

    X, Y  : SmallInt;

  end;

  TOnMouse = procedure( Sender: PControl; var Mouse: TMouseEventData ) of object;

property OnMouseDblClk: TOnMouse;

Description

<not finished>

See also: OnMouseDown, OnMouseUp, OnMouseMove, OnMouseWheel events.


TKOLControl.OnMouseDown

TKOLControl

Occurs when a mouse button is down in the control.

type
TMouseButton = ( mbNone, mbLeft, mbRight, mbMiddle );

TMouseEventData = packed Record

  {* Record to pass it to mouse handling routines, assigned to OnMouseXXXX events. }

    Button: TMouseButton;

    StopHandling: Boolean; { Set it to True in OnMouseXXXX event handler to stop further processing }

    R1, R2: Byte;	// Not used

    Shift : DWORD;	{ HiWord( Shift ) = zDelta in WM_MOUSEWHEEL }

    X, Y  : SmallInt;

  end;

  TOnMouse = procedure( Sender: PControl; var Mouse: TMouseEventData ) of object;

property OnMouseDown: TOnMouse;

Description

<not finished>

See also: OnMouseDblClk, OnMouseUp, OnMouseMove, OnMouseWheel events.


TKOLControl.OnMouseEnter

TKOLControl

Occurs when mouse cursor is entered to the control.

type
  TOnEvent = procedure( Sender: PObj ) of object;

property OnMouseEnter: TOnEvent;

Description

See also OnMouseLeave event.


TKOLControl.OnMouseLeave

TKOLControl

Occurs when mouse cursor leaves the control.

type
  TOnEvent = procedure( Sender: PObj ) of object;

property OnMouseLeave: TOnEvent;

Description

See also OnMouseEnter event.


TKOLControl.OnMouseMove

TKOLControl

Occurs when a mouse cursor is moving over control.

type
TMouseButton = ( mbNone, mbLeft, mbRight, mbMiddle );

TMouseEventData = packed Record

  {* Record to pass it to mouse handling routines, assigned to OnMouseXXXX events. }

    Button: TMouseButton;

    StopHandling: Boolean; { Set it to True in OnMouseXXXX event handler to stop further processing }

    R1, R2: Byte;	// Not used

    Shift : DWORD;	{ HiWord( Shift ) = zDelta in WM_MOUSEWHEEL }

    X, Y  : SmallInt;

  end;

  TOnMouse = procedure( Sender: PControl; var Mouse: TMouseEventData ) of object;

property OnMouseMove: TOnMouse;

Description

<not finished>

See also: OnMouseDblClk, OnMouseDown, OnMouseUp, OnMouseWheel events.


TKOLControl.OnMouseUp

TKOLControl

Occurs when a mouse button is released in the control.

type
TMouseButton = ( mbNone, mbLeft, mbRight, mbMiddle );

TMouseEventData = packed Record

  {* Record to pass it to mouse handling routines, assigned to OnMouseXXXX events. }

    Button: TMouseButton;

    StopHandling: Boolean; { Set it to True in OnMouseXXXX event handler to stop further processing }

    R1, R2: Byte;	// Not used

    Shift : DWORD;	{ HiWord( Shift ) = zDelta in WM_MOUSEWHEEL }

    X, Y  : SmallInt;

  end;

  TOnMouse = procedure( Sender: PControl; var Mouse: TMouseEventData ) of object;

property OnMouseUp: TOnMouse;

Description

<not finished>

See also: OnMouseDblClk, OnMouseDown, OnMouseMove, OnMouseWheel events.


TKOLControl.OnMouseWheel

TKOLControl

Occurs when a mouse wheel is turned.

type
TMouseButton = ( mbNone, mbLeft, mbRight, mbMiddle );

TMouseEventData = packed Record

  {* Record to pass it to mouse handling routines, assigned to OnMouseXXXX events. }

    Button: TMouseButton;

    StopHandling: Boolean; { Set it to True in OnMouseXXXX event handler to stop further processing }

    R1, R2: Byte;	// Not used

    Shift : DWORD;	{ HiWord( Shift ) = zDelta in WM_MOUSEWHEEL }

    X, Y  : SmallInt;

  end;

  TOnMouse = procedure( Sender: PControl; var Mouse: TMouseEventData ) of object;

property OnMouseWheel: TOnMouse;

Description

<not finished>

See also: OnMouseDblClk, OnMouseDown, OnMouseMove, OnMouseUpl events.


TKOLControl.OnMove

TKOLControl

Occurs when window position is changed.

type
  TOnEvent = procedure( Sender: PObj ) of object;

property OnMove: TOnEvent;

Description

<not finished>


TKOLControl.OnPaint

TKOLControl

Occurs, when the control should be painted.

type
  TOnPaint = procedure( Sender: PControl; DC: HDC ) of object;

property OnPaint: TOnPaint;

Description

It is possible to define custom painting in respond to this event for any control of KOL.

See also: OnEraseBkgnd event.


TKOLControl.OnResize

TKOLControl

Occurs when control's window size is changed.

type
  TOnEvent = procedure( Sender: PObj ) of object;

property OnResize: TOnEvent;

Description

<not finished>


TKOLControl.OnShow

TKOLControl

Occurs when control's window is to become visible.

type
  TOnEvent = procedure( Sender: PObj ) of object;

property OnShow: TOnEvent;

Description

<not finished>

See also: Visible property, OnHide event.


TKOLControl.OnHide

TKOLControl

Occurs when control's window is to become hidden.

type
  TOnEvent = procedure( Sender: PObj ) of object;

property OnHide: TOnEvent;

Description

<not finished>

See also: Visible property, OnShow event.


KOL TControl methods

TKOLControl

AttachProc

BeginUpdate

CreateWindow

EndUpdate

GetWindowHandle

HandleAllocated

Perform

SetAlign

SetAutoPopupMenu

SetPosition

SetSize

Size

<not finished>


TControl.AttachProc method

TKOLControl

Attaches dynamic event handler to the control's window procedure.

type
  TWindowFunc = function( Sender: PControl; var Msg: TMsg; var Rslt: Integer ): Boolean;
procedure AttachProc( Proc: TWindowFunc );

Description

<not finished>


TKOLControl.SetAlign
TKOLControl.SetAlign method

TKOLControl

Sets new Align style.

type
  TControlAlign = ( caNone, caLeft, caTop, caRight, caBottom, caClient );

function SetAlign( AAlign: TControlAlign ): PControl;

Description

Use this method in MCK projects instead assigning a value to property Align to avoid annoying messages from the compiler.

Returns pointer to the control variable itself.

See also: Align property.


TKOLControl.GetWindowHandle
TKOLControl.GetWindowHandle method

TKOLControl

Allocates a Handle for the control (if it is not yet allocated) and returns it.

function GetWindowHandle: HWnd;

Description

In differ to CreateWindow method, this function provides allocating the Handle by the way, which prevents any flicks on screen, because the window is created for the control hidden. Use this method on the initial stage, when the Handle may be yet not allocated (the window is not yet created).

Please note, that just read of the property Handle does not lead to allocating the handle, if it is not allocated yet.


TKOLControl.HandleAllocated
TKOLControl.HandleAllocated method

TKOLControl

Returns TRUE, if control's window is allocated already.

function HandleAllocated: Boolean;

Description

This function is recommended to use to get know, if the control has its window allocated.

See also: Handle property.


TKOLControl.CreateWindow
TKOLControl.CreateWindow method

TKOLControl

Allocates a Handle for the control (if it is not yet allocated), i.e. creates control's window.

function CreateWindow: Boolean; virtual;

Description

See also: GetWindowHandle method, Handle property.


KOL TControl.SetAutoPopupMenu
KOL TControl.SetAutoPopupMenu method

TKOLControl

Sets another popup menu for automatic pop up on WM_CONTEXTMENU message arrival, or resets automatic popup menu.

procedure SetAutoPopupMenu( PopupMenu: PObj );

Description

See also: popupMenu design-time property.


TKOLControl.SetPosition
TKOLControl.SetPosition method

TKOLControl

Changes position of the control.

function SetPosition( X, Y: Integer ): PControl;

Description

Moves the control directly to the specified position.

See also: SetSize method, Left, Top properties.


TKOLControl.SetSize
TKOLControl.SetSize method

TKOLControl

Changes size of the control.

function SetSize( W, H: Integer ): PControl;

Description

Changes size of a control. If W or H less or equal to 0, correspondent size is not changed. Returns a pointer to the control itself.

See also: Size method, Width, Height properties.


TKOLControl. Size
TKOLControl. Size method

TKOLControl

Changes size of the control.

function SetSize( W, H: Integer ): PControl;

Description

Like SetSize method, changes size of a control, but provides automatic resizing of parent control (recursively), when needed. Especially useful for aligned controls.

If W or H less or equal to 0, correspondent size is not changed.

Returns a pointer to the control itself.

See also: SetSize method.


KOL TControl.BeginUpdate method for memo control
KOL TControl.BeginUpdate method

TKOLControl

Call this method to stop visual updates of the control until correspondent EndUpdate called (pairs BeginUpdate - EndUpdate could be nested).

procedure BeginUpdate;


KOL TControl.EndUpdate method for memo control
KOL TControl.EndUpdate method

TKOLControl

Call this method to re-enable visual updates of the control disabled by previous BeginUpdate call (pairs BeginUpdate - EndUpdate could be nested).

procedure EndUpdate;


KOL TControl.Perform method for memo control
KOL TControl.Perform method

TKOLControl

This method sends a message to control's window, using SendMessage API function.

function Perform( msgcode: DWORD; wParam, lParam: Integer): Integer; stdcall;

Description

If Handle is not yet allocated, it is allocated and control window is created (GetWindowHandle method used to obtain window handle).


TKOLObj component

Hierarchy	Properties	Events	Methods

Base class for mirrors of non-visual KOL objects.

Unit

mirror

Description

TKOLObj is a base class for the most of mirror components, which are corresponding to different KOL non-visual objects. In KOL, all the object types, including visual controls type TControl, are derived from TObj.

In KOL, VCL classes are not used at all, and all object are poor Pascal objects, declared using keyword object. Since this, some differences are in use KOL objects in compare to VCL classes.

The first, object type is static by define. But we should work with dynamic objects therefore, like with class instances in VCL. So, there are pointer types defined for every object type: Ptype for every Ttype name. And, though object types are declared like TList, TStrList, etc., instances of such objects should be always declared as PList, PStrList correspondently.

Another consequence is that variable Self for object type is not a pointer to an instance. Since this, the expression @Self should be used everywhere in  instead it to point to an instance of the object, which is actually dynamic data structure.

The second, virtual methods even when overriden, should be declared with keyword virtual, not override.

The third, virtual constructors are not available for poor Pascal objects. To make KOL objects, controls, etc. as much more independant from implementation as possible, suggested method of constructing of KOL objects is using special global "constructors" – global regular functions, which implement creating objects. Since this, never construct objects using embedded function new, but use instead appropriate functions NewList, NewStrList, etc.

Because KOL is introduced to make executables as much small as possible, though even designed with full featured object-oriented language and power RAD visual environment, some objects are integrated "several in one" to avoid ambigous inheritance and decrease needs in virtual methods. For example, all visual controls in KOL, including form and applet objects, actually are implemented as instances of the same object type TControl. This allows for Delphi compiler to use better smart linking for excluding code, which is not actually used in final application.


TKOLObj properties

TKOLObj	Legend

In TKOLObj

<not finished>

in TComponent

Name


TKOLObj events

TKOLObj

In TKOLObj

OnDestroy


TKOLObj.OnDestroy

TKOLObj

Occurs when an object is destroyed.

type
  TOnEvent = procedure( Sender: PObj ) of object;

property OnDestroy: TOnEvent;

Description

In KOL, any object, derived from TObj (i.e. any KOL object) has such event. The event handler, if assigned, is called in the destructor, when the object itself is yet exists.

Note: if You want to show a message on screen, when the object is destroyed, preferred method to do this is ShowMsgModal, which can work correctly even after closing the application and finishing message loop handling.


KOL TObj methods

TKOLObj	Legend

<not finished>


	TKOLButton component
Hierarchy	Properties	Events	Constructor	Methods	Tasks

Mirror for KOL TControl, implementing button control.

Unit

mckctrls

Description

TKOLButton is a mirror component to KOL button, which is implemented in KOL TControl object type, as well as all other visual controls in KOL.

Please note, that a button is implemented using native Windows BUTTON window style, which does not allow to change its Font and Color arbitrary. To do so, You should use TKOLBitBtn instead.

See also: TKOLBitBtn mirror component.


KOL button control constructor

TKOLButton

Following global function can be used to create button control at run-time:

function NewButton( AParent: PControl; const Caption: String ): PControl;


Hierarchy

TComponent

TKOLControl


TKOLButton properties

TKOLButton	Legend

In TKOLButton

LikeSpeedButton

In TKOLControl

Align

Caption

CenterOnParent

ClientHeight

ClientWidth

ClsStyle

Color

Ctl3D

Cursor_

DoubleBuffered

Enabled

EraseBackground

ExStyle

Font

Handle

Parent

parentColor

parentFont

PlaceDown

PlaceRight

PlaceUnder

popupMenu

Style

TabOrder

TabStop

Tag

TextAlign

VerticalAlign

Visible

in TComponent

Left

Top

Width

Height

Name


TKOLButton.LikeSpeedButton

TKOLButton

When set, makes the button non-focusable, like speed button in VCL.

property LikeSpeedButton: Boolean;

function LikeSpeedButton: PControl;

Description

This is design-time only property. At run-time, it is available as a function, returning control itself.

This property not only excludes button control from TAB / SHIFT+TAB sequence, but makes it non-focusable at all, even when it is clicked by mouse.

Note: if the button is single, and there are no other focusable controls on a form, this can be not work.


TKOLButton events

TKOLButton

In TKOLControl

OnChar

OnClick

OnDestroy

OnDropFiles

OnEnter

OnEraseBkgnd

OnHide

OnKeyDown

OnKeyUp

OnLeave

OnMessage

OnMouseDblClk

OnMouseDown

OnMouseEnter

OnMouseLeave

OnMouseMove

OnMouseUp

OnMouseWheel

OnMove

OnPaint

OnResize

OnShow


TKOLButton specific tasks

TKOLButton

1. To click button programmatically, call method Click, e.g.:

  Button1.Click;.

2. To make button default or like cancel-button, i.e. to click it in responce to some key pressed in a form, use OnMessage event of the parent form, and filter desired key combination. Example:

function TForm1.KOLForm1Message(var Msg: tagMSG; var Rslt: Integer): Boolean;

begin

  Result := FALSE;

  if Msg.message = WM_KEYDOWN then

  if Msg.wParam = VK_RETURN then

  begin

    Button1.Click;

    Result := TRUE;

  end;

end;


	TKOLBitBtn component
Hierarchy	Properties	Events	Constructor	Methods

Mirror for KOL TControl, implementing bitbtn (custom drawn button) control.

Unit

mckctrls

Description

TKOLBitBtn is a mirror component to KOL custom drawn button (bitbtn), which is implemented in KOL TControl object type, as well as all other visual controls in KOL.

Please note, that standard button (TKOLButton component) is implemented using native Windows BUTTON window style, which does not allow to change its Font and Color arbitrary. To do so, You should use this TKOLBitBtn instead.

See also: TKOLButton mirror component.


KOL bitbtn control constructor

TKOLBitBtn

Following global function can be used to create BitBtn control at run-time:

type

  TBitBtnOption = ( bboImageList,
bboNoBorder,
bboNoCaption,
bboFixed );

  TBitBtnOptions = set of TBitBtnOption;

 TGlyphLayout = ( glyphLeft, glyphTop, glyphRight, glyphBottom, glyphOver );

function NewBitBtn( AParent: PControl; const Caption: String; Options: TBitBtnOptions; Layout: TGlyphLayout; GlyphBitmap: HBitmap; GlyphCount: Integer ): PControl;


TKOLBitBtn properties

TKOLBitBtn	Legend

In TKOLBitBtn

autoSize

Flat

glyphBitmap

glyphCount

glyphLayout

imageIndex

imageList

LikeSpeedButton

MouseInControl

RepeatInterval

options

In TKOLControl

Align

Caption

CenterOnParent

ClientHeight

ClientWidth

ClsStyle

Color

Ctl3D

Cursor_

DoubleBuffered

Enabled

EraseBackground

ExStyle

Font

Handle

Parent

parentColor

parentFont

PlaceDown

PlaceRight

PlaceUnder

popupMenu

Style

TabOrder

TabStop

Tag

TextAlign

Transparent

VerticalAlign

Visible

in TComponent

Left

Top

Width

Height

Name


TKOLBitBtn.autoSize

TKOLBitBtn

Determines, if bitbtn control is initially auto-sized to fit glyph image and text.

property autoSize: Boolean;

Description

This property is design-time only, and affects a size of bitbtn control, when it is created.


TKOLBitBtn.Flat

TKOLBitBtn

Determines, if the bitbtn control has "flat" style.

property Flat: Boolean;

Description

If by assigning a value TRUE to this property, the bitbtn control is defined "flat", its border is drawn only in following cases:

- mouse is over button;

- button is down;

- button is focused.


TKOLBitBtn.glyphBitmap

TKOLBitBtn

A bitmap to use as a glyph set for bitbtn control.

property glyphBitmap: TBitmap;

Description

This is design-time only property. At run-time, glyph bitmap is passed to a constructor of the bitbtn control, when it is created, in GlyphBitmap parameter.

Glyph alternatively can be stored as a sequence of images in image list, see imageList, imageIndex properties.

See also: glyphCount, glyphLayout properties.


TKOLBitBtn.glyphCount

TKOLBitBtn

Determines, how much images are contained in glyph bitmap or how much cosequent images from imageList are used for glyph.

property glyphCount: Integer;

Description

This property is design-time only. At run time, count of images value is passed to bitbtn control constructor, when it is created, in GlyphCount parameter.

Value should be in range from 1 to 5. Every glyph in glyph image has constant purpose and is showed, when the bitbtn is in certain state:

1 – normal state;

2 – pressed button state;

3 – disabled state;

4 – focused (but not pressed);

5 – hot state (mouse is over button). To enable this last state, one of event handlers (even empty) should be defined, either OnMouseLeave, or OnTestMouseOver event, or set property Flat to TRUE.

If some of glyphs are not defined (glyphCount is less then 5), image 1 (normal state) is used instead (for disabled state, normal state glyph is grayed if possible).

See also: glyphBitmap, imageList properties.


TKOLBitBtn.glyphLayout

TKOLBitBtn

Determines position of glyph image on the button.

type
  TGlyphLayout = ( glyphLeft, glyphTop, glyphRight, glyphBottom, glyphOver );

property glyphLayout: TGlyphLayout;

Description

This property is design-time only. At run-time, glyph layout is passed to bitbtn constructor, when it is created, in GlyphLayout parameter.

The last layout, glyphOver is useful, when text is not used for bitbtn control, and glyph should occupate entire button surface. For such case, take attention to the option bboNoBorder in the options property, which allows to provide custom-drawn border in glyph itself. And, the most cool bitbtn capability is custom event OnTestMouseOver, which allows to make it hot even when mouse cursor is exactly over button glyph region.


TKOLBitBtn.imageIndex

TKOLBitBtn

Index of first image from imageList, used for glyph.

property imageIndex: Integer;

Description

If glyph is stored in image list (imageList property is assigned, and bboImageList option is on), this value is used as an index of first glyph, stored in the image list. All other images of the glyph are following this one.

This property is design-time only. At run-time, this parameter is passed to constructor function, when bitbtn control is created, in low word of GlyphCount parameter (high word is used in such case to pass a count of glyphs).


TKOLBitBtn.imageList

TKOLBitBtn

Index of first image from imageList, used for glyph.

property imageList: TKOLImageList;

Description

If glyph is stored in image list (imageList property is assigned, and bboImageList option is on), this image list is used to store glyphs. In such case, imageIndex property determines an index of the first image in glyph.

This property is design-time only. At run-time, this parameter is passed to constructor function, when bitbtn control is created, in GlyphBitmap parameter, as a handle to image list object


TKOLBitBtn.options

TKOLBitBtn

Options of bitbtn control.

type
  TBitBtnOption = ( bboImageList,

bboNoBorder,

bboNoCaption,

bboFixed );

  TBitBtnOptions = set of TBitBtnOption;

property options: TBitBtnOptions;

Description

This is design-time only property. At run-time, options are passed to a constructor of bitbtn control, when it is created, in Options parameter.

Option bboImageList when set means that imageList is used, not glyphBitmap. At run-time, this option determines, how parameters for a constructor function are interpreted. For bboImageList, a handle to the image list is passed through GlyphBitmap parameter, low word of GlyphCount parameter contains an index to the first image in glyph, and high word of GlyphCount – total number of glyphs.

Option bboNoBorder is useful, when glyphLayout is glyphOver. In such case, 3D-border of the bitmap is not drawn, and it could be prepared in glyph itself, for every state of the button separately.

Option bboNoCaption obvious: Caption is not drawn and does not care in calculating glyph layout.

Option bboFixed affects to a behaviour of the button. When set, it means, that button is two-state, like a check box. When it is clicked, its "down" state is inverted. At run-time, current state of the button can be examined using property Checked.


TKOLBitBtn.RepeatInterval

TKOLBitBtn

Click auto-repeat interval for bitbtn.

property RepeatInterval: Integer;

Description

When this property is set to a value greater than 0, it means an interval, after which, if the button yet pressed by mouse or keyboard key SPACE, it is automatically clicked again. When keyboard is used to click the button, iterval itself is ignored, and auto-repeat keyboard speed is used as the interval therefore.


TKOLBitBtn events

TKOLBitBtn

In TKOLBitBtn

OnBitBtnDraw

OnTestMouseOver

In TKOLControl

OnChar

OnClick

OnDestroy

OnDropFiles

OnEnter

OnEraseBkgnd

OnHide

OnKeyDown

OnKeyUp

OnLeave

OnMessage

OnMouseDblClk

OnMouseDown

OnMouseEnter

OnMouseLeave

OnMouseMove

OnMouseUp

OnMouseWheel

OnMove

OnPaint

OnResize

OnShow


TKOLBitBtn.OnBitBtnDraw event

TKOLBitBtn

Occurs when bitbtn control should be painted.

type
  TOnBitBtnDraw = function( Sender: PControl; BtnState: Integer ): Boolean of object;

property OnBitBtnDraw: TOnBitBtnDraw;

Description

This event is specific for bitbtn control. Using it, it is possible to provide additional effects, such as highlighting button text (by changing its Font and other properties). If the handler returns True, it is supposed that it made all drawing and there are no further drawing occure. Otherwise, it should return False.


TKOLBitBtn.OnTestMouseOver event

TKOLBitBtn

Occurs, when mouse cursor is over client area of a bitbtn control. Allows to calculate bounds of the bitbtn control more exactly.

type
 TOnTestMouseOver = function( Sender: PControl ): Boolean of object;

property OnTestMouseOver: TOnTestMouseOver;

Description

This event allows to determine if to show bitbtn control in "hot" style (corresponds to glyph number 5) or not. E.g., for elliptic button, an event handler could look like following:

function Form1.BitBtn1TestMouseOver(Sender: PControl): Boolean;

var P: TPoint;

begin

  GetCursorPos( P );

  P := Sender.ScreenToClient( P );

  Result := Sqr( (P.x - Sender.Width / 2) / Sender.Width )  +
Sqr( (P.y - Sender.Height / 2) / Sender.Height )
<= 0.25;

end;


	TKOLLabel component
Hierarchy	Properties	Events	Constructor	Methods

Mirror for KOL TControl, implementing label or wordwrap label control.

Unit

mckctrls

Description

TKOLLabel is a mirror component to KOL label, which is implemented in KOL TControl object type, as well as all other visual controls in KOL.

See also: TKOLLabelEffect mirror component.


KOL label control constructor

TKOLLabel

Following global functions can be used to create label control at run-time:

function NewLabel( AParent: PControl; const Caption: String ): PControl;

function NewWordWrapLabel( AParent: PControl; const Caption: String ): PControl;


TKOLLabel properties

TKOLLabel	Legend

In TKOLLabel

wordWrap

In TKOLControl

Align

Caption

CenterOnParent

ClientHeight

ClientWidth

ClsStyle

Color

Ctl3D

Cursor_

DoubleBuffered

Enabled

EraseBackground

ExStyle

Font

Handle

Parent

parentColor

parentFont

PlaceDown

PlaceRight

PlaceUnder

popupMenu

Style

TabOrder

Tag

TextAlign

Transparent

VerticalAlign

Visible

in TComponent

Left

Top

Width

Height

Name


TKOLLabel.wordWrap

TKOLLabel

Determines if the label is multi-line and word wrap.

property wordWrap: Boolean;

Description

This is design-time only property. At run-time, word wrap label is created by another constructor function.


TKOLLabel events

TKOLLabel

In TKOLControl

OnClick

OnDestroy

OnDropFiles

OnEraseBkgnd

OnHide

OnMessage

OnMouseDblClk

OnMouseDown

OnMouseEnter

OnMouseLeave

OnMouseMove

OnMouseUp

OnMouseWheel

OnMove

OnPaint

OnResize

OnShow


	TKOLLabelEffect component
Hierarchy	Properties	Events	Constructor	Methods

Mirror for KOL TControl, implementing label effect control.

Unit

mckctrls

Description

TKOLLabelEffect is a mirror component to KOL label effect control, which is implemented in KOL TControl object type, as well as all other visual controls in KOL.

The most of additional effects, which could be obtained with label effect control in differ to usual label, are in capability to understand extended Font properties, such as FontOrientation.

See also: TKOLLabel mirror component.


KOL label effect control constructor

TKOLLabelEffect

Following global functions can be used to create label control at run-time:

function NewLabelEffect( AParent: PControl; const Caption: String; ShadowDeep: Integer ): PControl;


TKOLLabelEffect properties

TKOLLabelEffect	Legend

In TKOLLabelEffect

Color2

ShadowDeep

In TKOLControl

Align

Caption

CenterOnParent

ClientHeight

ClientWidth

ClsStyle

Color

Ctl3D

Cursor_

DoubleBuffered

Enabled

EraseBackground

ExStyle

Font

Handle

Parent

parentColor

parentFont

PlaceDown

PlaceRight

PlaceUnder

popupMenu

Style

TabOrder

Tag

TextAlign

Transparent

VerticalAlign

Visible

in TComponent

Left

Top

Width

Height

Name


TKOLLabelEffect.Color2

TKOLLabelEffect

Shadow color.

property Color2: TColor;

Description

This property is available also at run-time. It determines a color for shadow in label effect. If this property is set to clNone, then color of a shadow is calculated as a mix between the main text color, and clBlack (using function ColorsMix).

See also: ShadowDeep property.


TKOLLabelEffect.ShadowDeep

TKOLLabelEffect

Shadow deep for 3D-effect.

property ShadowDeep: Boolean;

Description

This property is available also at run-time. When this property is greater then 0, a shadow is drawing with offset +ShadowDeep by X and Y behind the text of the label. See property Color2, which is used to set up shadow color.


	TKOLPanel component
Hierarchy	Properties	Events	Constructor	Methods

Mirror for KOL TControl, implementing panel control.

Unit

mckctrls

Description

TKOLPanel is a mirror component to KOL panel, which is implemented in KOL TControl object type, as well as all other visual controls in KOL.

See also: TKOLGradientPanel mirror component.


KOL panel control constructor

TKOLPanel

Following global function can be used to create panel control at run-time:

function NewPanel( AParent: PControl; EdgeStyle: TEdgeStyle ): PControl;


TKOLPanel properties

TKOLPanel	Legend

In TKOLPanel

edgeStyle

In TKOLControl

Align

Border

Caption

CenterOnParent

ClientHeight

ClientWidth

ClsStyle

Color

Ctl3D

Cursor_

DoubleBuffered

Enabled

EraseBackground

ExStyle

Font

Handle

MarginBottom

MarginLeft

MarginRight

MarginTop

Parent

parentColor

parentFont

PlaceDown

PlaceRight

PlaceUnder

popupMenu

Style

TabOrder

Tag

TextAlign

Transparent

VerticalAlign

Visible

in TComponent

Left

Top

Width

Height

Name


TKOLPanel.edgeStyle

TKOLPanel

Edge style of a panel.

type
 TEdgeStyle = ( esRaised, esLowered, esNone );

property edgeStyle: TEdgeStyle;

Description

This is design-time only property. At run-time, edgeStyle is passed to a constructor, when panel control is created.


TKOLPanel events

TKOLPanel

In TKOLControl

OnClick

OnDestroy

OnDropFiles

OnEraseBkgnd

OnHide

OnMessage

OnMouseDblClk

OnMouseDown

OnMouseEnter

OnMouseLeave

OnMouseMove

OnMouseUp

OnMouseWheel

OnMove

OnPaint

OnResize

OnShow


	TKOL GradientPanel component
Hierarchy	Properties	Events	Constructors	Methods

Mirror for KOL TControl, implementing gradient panel control.

Unit

mckctrls

Description

TKOLGradientPanel is a mirror component to KOL gradient panel, which is implemented in KOL TControl object type, as well as all other visual controls in KOL.

See also: TKOLPanel mirror component.


KOL gradient panel control constructors

TKOLGradientPanel

Following global functions can be used to create panel control at run-time:

type
  TGradientStyle = ( gsHorizontal, gsVertical, gsRectangle, gsElliptic, gsRombic );
  TGradientLayout = ( glTopLeft, glTop, glTopRight,

                      glLeft, glCenter, glRight,

                      glBottomLeft, glBottom, glBottomRight );

function NewGradientPanel( AParent: PControl; Color1, Color2: TColor ): PControl;

function NewGradientPanelEx( AParent: PControl; Color1, Color2: TColor; Style: TGradientStyle; Layout: TGradientLayout ): PControl;


TKOLGradientPanel properties

TKOLGradientPanel	Legend

In TKOLGradientPanel

Color1

Color2

GradientLayout

GradientStyle

In TKOLControl

Align

Border

Caption

CenterOnParent

ClientHeight

ClientWidth

ClsStyle

Color

Ctl3D

Cursor_

DoubleBuffered

Enabled

EraseBackground

ExStyle

Font

Handle

MarginBottom

MarginLeft

MarginRight

MarginTop

Parent

parentColor

parentFont

PlaceDown

PlaceRight

PlaceUnder

popupMenu

Style

TabOrder

Tag

TextAlign

Transparent

VerticalAlign

Visible

in TComponent

Left

Top

Width

Height

Name


TKOLGradientPanel.Color1, Color2 properties
TKOLGradientPanel.Color1, Colol2 properties

TKOLGradientPanel

Gradient fill colors.

property Color1: TColor;

property Color2: TColor;

Description

<not finished>


TKOLGradientPanel.GradientLayout

TKOLGradientPanel

Gradient panel layout.

type
  TGradientLayout = ( glTopLeft, glTop, glTopRight,

                      glLeft, glCenter, glRight,

                      glBottomLeft, glBottom, glBottomRight );

property GradientLayout: TGradientLayout;

Description

Default layout is glTop. If GradientStyle also is set to default value gsVertical, more efficient code is used (gradient panel control, created by NewGradientPanel function).


TKOLGradientPanel.GradientStyle

TKOLGradientPanel

Gradient panel filling style.

type
  TGradientStyle = ( gsHorizontal, gsVertical, gsRectangle, gsElliptic, gsRombic );

property GradientStyle: TGradientStyle;

Description

Default layout is gsVertical. If GradientLayout also is set to default value glTop, more efficient code is used (gradient panel control, created by NewGradientPanel function).


TKOLGradientPanel events

TKOLGradientPanel

In TKOLControl

OnClick

OnDestroy

OnDropFiles

OnEraseBkgnd

OnHide

OnMessage

OnMouseDblClk

OnMouseDown

OnMouseEnter

OnMouseLeave

OnMouseMove

OnMouseUp

OnMouseWheel

OnMove

OnPaint

OnResize

OnShow


	TKOLSplitter component
Hierarchy	Properties	Events	Constructor	Methods

Mirror for KOL TControl, implementing splitter between aligned controls.

Unit

mckctrls

Description

TKOLSplitter is a mirror component to KOL splitter, which is implemented in KOL TControl object type, as well as all other visual controls in KOL.


KOL splitter control constructor

TKOLSplitter

Following global function can be used to create splitter control at run-time:

function NewSplitter( AParent: PControl; MinSizePrev, MinSizeNext: Integer ): PControl;


TKOLSplitter properties

TKOLSplitter	Legend

In TKOLSplitter

 	Dragging

edgeStyle

MinSizeNext

MinSizePrev

SecondControl

In TKOLControl

Align

CenterOnParent

ClientHeight

ClientWidth

ClsStyle

Color

Ctl3D

Cursor_

DoubleBuffered

Enabled

EraseBackground

ExStyle

Font

Handle

Parent

parentColor

parentFont

PlaceDown

PlaceRight

PlaceUnder

popupMenu

Style

TabOrder

Tag

Transparent

Visible

in TComponent

Left

Top

Width

Height

Name


TKOLSplitter.Dragging

TKOLSplitter

TRUE, when splitter control is dragging by mouse.

property Dragging: Boolean;

Description

This is run-time and read-only property. Read it to examine, if the splitter is dragging now.

See also: OnSplit event.


TKOLSplitter.edgeStyle

TKOLSplitter

Edge style of a splitter.

type
 TEdgeStyle = ( esRaised, esLowered, esNone );

property edgeStyLe: TEdgeStyle;

Description

This is design-time only property. At run-time, edgeStyle is passed to a constructor, when splitter control is created.


TKOLSplitter.MinSizeNext

TKOLSplitter

Minimal size of the next control.

property MinSizeNext: Integer;

Description

This is design-time only property. At run-time, MinSizeNext is passed to a constructor, when splitter control is created.

<not finished>


TKOLSplitter.MinSizePrev

TKOLSplitter

Minimal size of the previos control.

property MinSizePrev: Integer;

Description

This is design-time only property. At run-time, MinSizePrev is passed to a constructor, when splitter control is created.

<not finished>


TKOLSplitter.SecondControl

TKOLSplitter

Pointer to the second control, resizing by the splitter.

property SecondControl: PControl;

Description

This is run-time only property. It is possible to change this property to correct second control destination.

<not finished>


TKOLSplitter events

TKOLSplitter

In TKOLSplitter

OnSplit

In TKOLControl

OnClick

OnDestroy

OnDropFiles

OnEraseBkgnd

OnHide

OnMessage

OnMouseDblClk

OnMouseDown

OnMouseEnter

OnMouseLeave

OnMouseMove

OnMouseUp

OnMouseWheel

OnMove

OnPaint

OnResize

OnShow


TKOLSplitter.OnSplit event

TKOLSplitter

Occurs when splitter control is about to change its position.

type
  TOnSplit = function( Sender: PControl; NewSize1, NewSize2: Integer ): Boolean of object;

property OnSplit: TOnSplit;

Description

NewSize1 and NewSize2 are sizes of previous and next controls correspondently. Event handler should return TRUE to agree with new position of the splitter.


	TKOLGroupBox component
Hierarchy	Properties	Events	Constructor	Methods

Mirror for KOL TControl, implementing group box control.

Unit

mckctrls

Description

TKOLGroupBox is a mirror component to KOL group box, which is implemented in KOL TControl object type, as well as all other visual controls in KOL.

Note, that in KOL it is possible to use any control to group radio controls, not only group box.

See also: TKOLPanel mirror component.


KOL group box control constructor

TKOLGroupBox

Following global function can be used to create panel control at run-time:

function NewGroupbox( AParent: PControl; const Caption: String ): PControl;


TKOLGroupBox properties

TKOLGroupBox	Legend

In TKOLControl

Align

Border

Caption

CenterOnParent

ClientHeight

ClientWidth

ClsStyle

Color

Ctl3D

Cursor_

DoubleBuffered

Enabled

EraseBackground

ExStyle

Font

Handle

MarginBottom

MarginLeft

MarginRight

MarginTop

Parent

parentColor

parentFont

PlaceDown

PlaceRight

PlaceUnder

popupMenu

Style

TabOrder

Tag

TextAlign

Transparent

Visible

in TComponent

Left

Top

Width

Height

Name


TKOLGroupBox events

TKOLGroupBox

In TKOLControl

OnClick

OnDestroy

OnDropFiles

OnEraseBkgnd

OnHide

OnMessage

OnMouseDblClk

OnMouseDown

OnMouseEnter

OnMouseLeave

OnMouseMove

OnMouseUp

OnMouseWheel

OnMove

OnPaint

OnResize

OnShow


	TKOLCheckBox component
Hierarchy	Properties	Events	Constructor	Methods

Mirror for KOL TControl, implementing check box control.

Unit

mckctrls

Description

TKOLCheckBox is a mirror component to KOL check box, which is implemented in KOL TControl object type, as well as all other visual controls in KOL.

See also: TKOLRadioBox mirror component.


KOL check box control constructor

TKOLCheckBox

Following global function can be used to create check box control at run-time:

function NewCheckBox( AParent: PControl ): PControl;


TKOLCheckBox properties

TKOLCheckBox	Legend

In TKOLCheckBox

Checked

In TKOLControl

Align

Border

Caption

CenterOnParent

ClientHeight

ClientWidth

ClsStyle

Color

Ctl3D

Cursor_

DoubleBuffered

Enabled

EraseBackground

ExStyle

Font

Handle

Parent

parentColor

parentFont

PlaceDown

PlaceRight

PlaceUnder

popupMenu

Style

TabOrder

TabStop

Tag

TextAlign

Transparent

VerticalAlign

Visible

in TComponent

Left

Top

Width

Height

Name


TKOLCheckBox.Checked

TKOLCheckBox

Checked state of the check box.

property Checked: Boolean;

Description

When Checked value is changed in result of mouse click or keyboard SPACE key press or even programmatically, event OnClick occurs.


TKOLCheckBox events

TKOLCheckBox

In TKOLControl

OnChar

OnClick

OnDestroy

OnDropFiles

OnEnter

OnEraseBkgnd

OnHide

OnKeyDown

OnKeyUp

OnLeave

OnMessage

OnMouseDblClk

OnMouseDown

OnMouseEnter

OnMouseLeave

OnMouseMove

OnMouseUp

OnMouseWheel

OnMove

OnPaint

OnResize

OnShow


	TKOLRadioBox component
Hierarchy	Properties	Events	Constructor	Methods

Mirror for KOL TControl, implementing radio box control.

Unit

mckctrls

Description

TKOLRadioBox is a mirror component to KOL radio box, which is implemented in KOL TControl object type, as well as all other visual controls in KOL.

See also: TKOLCheckBox mirror component.


KOL radio box control constructor

TKOLRadioBox

Following global function can be used to create radio box control at run-time:

function NewRadioBox( AParent: PControl ): PControl;


TKOLRadioBox properties

TKOLRadioBox	Legend

In TKOLRadioBox

Checked

In TKOLControl

Align

Border

Caption

CenterOnParent

ClientHeight

ClientWidth

ClsStyle

Color

Ctl3D

Cursor_

DoubleBuffered

Enabled

EraseBackground

ExStyle

Font

Handle

Parent

parentColor

parentFont

PlaceDown

PlaceRight

PlaceUnder

popupMenu

Style

TabOrder

TabStop

Tag

TextAlign

Transparent

VerticalAlign

Visible

in TComponent

Left

Top

Width

Height

Name


TKOLRadioBox.Checked

TKOLRadioBox

Checked state of the radio box.

property Checked: Boolean;

Description

When Checked value is changed in result of mouse click or keyboard SPACE key press or even programmatically, event OnClick occurs.

To change correct radiobox control Checked state programmatically, use method SetRadioChecked, which provides unchecking for alternative radiobox controls, sibling to given one.


TKOLRadioBox events

TKOLRadioBox

In TKOLControl

OnChar

OnClick

OnDestroy

OnDropFiles

OnEnter

OnEraseBkgnd

OnHide

OnKeyDown

OnKeyUp

OnLeave

OnMessage

OnMouseDblClk

OnMouseDown

OnMouseEnter

OnMouseLeave

OnMouseMove

OnMouseUp

OnMouseWheel

OnMove

OnPaint

OnResize

OnShow


KOL radio box specific methods

TKOLRadioBox

SetRadioChecked

See also all other methods of KOL TControl, which also are applicable to radio box control.


KOL TControl.SetRadioChecked (radio box specific)
KOL TControl.SetRadioChecked

TKOLRadioBox

function SetRadioChecked : PControl;

Use this method to change Checked property programmatically instead of assigning a value to Checked property. This method provides correct unchecking for all alternative radio controls.


	TKOLEditBox component
Hierarchy	Properties	Events	Constructor	Methods

Mirror for KOL TControl, implementing edit box control.

Unit

mckctrls

Description

TKOLEditBox is a mirror component to KOL single-line edit box, which is implemented in KOL TControl object type, as well as all other visual controls in KOL.

See also: TKOLMemo mirror component.


KOL edit box and memo controls constructor

TKOLEditBox	TKOLMemo

Following global function can be used to create edit box control (single-line or multi-line) at run-time:

type
  TEditOption = ( eoNoHScroll, eoNoVScroll, eoLowercase, eoMultiline, eoNoHideSel, eoOemConvert, eoPassword, eoReadonly, eoUpperCase, eoWantReturn, eoWantTab );

  TEditOptions = Set of TEditOption;

function NewEditbox( AParent: PControl; Options: TEditOptions ): PControl;


TKOLEditBox properties

TKOLEditBox	Legend

In TKOLEditBox

 	Count

Options

Selection

SelLength

SelStart

Text

In TKOLControl

Align

CenterOnParent

ClientHeight

ClientWidth

ClsStyle

Color

Ctl3D

Cursor_

DoubleBuffered

Enabled

EraseBackground

ExStyle

Font

Handle

Parent

parentColor

parentFont

PlaceDown

PlaceRight

PlaceUnder

popupMenu

Style

TabOrder

TabStop

Tag

TextAlign

Transparent

VerticalAlign

Visible

in TComponent

Left

Top

Width

Height

Name


TKOLEditBox.Count

TKOLEditBox

Count of characters in single-line edit control.

property Count: Integer;

Description

For edit box and memo controls, this property is read only (changing it has no effect).


TKOLEditBox.Options

TKOLEditBox

Options of the single-line edit box control.

type
  TEditOption = ( eoNoHScroll, eoNoVScroll, eoLowercase, eoMultiline, eoNoHideSel, eoOemConvert, eoPassword, eoReadonly, eoUpperCase, eoWantReturn, eoWantTab );

  TEditOptions = Set of TEditOption;

property Options: TEditOptions;

Description

This is design-time only property. At run time, options are passed to a constructor of the edit box control, when it is created, in Options parameter.


TKOLEditBox.Selection

TKOLEditBox	TKOLMemo	TKOLRichEdit

Selected selected portion of editing text.

property Selection: String;

Description

When read, returns selected portion of the editing text. When write, replaces selection with another text. To control, if the replace operation can be undone, use ReplaceSelection method instead.


TKOLEditBox.SelLength

TKOLEditBox	TKOLMemo	TKOLRichEdit

Length of a selection in edit box.

property SelLength: Integer;

Description

Note: When SelStart property is changed programmatically, SelLength always becomes 0.


TKOLEditBox.SelStart

TKOLEditBox	TKOLMemo	TKOLRichEdit

Start of a selection in edit box.

property SelStart: Integer;

Description

Current selection in edit box control is defined with SelStart and SelLength properties. To change current selection programmatically, first change SelStart, and then set SelLength to the desired length (in characters).


TKOLEditBox.Text

TKOLEditBox	TKOLMemo	TKOLRichEdit

Text of the edit control.

property Text: String;

Description

At run time, this property is a synonim of Caption. It is named also Text for convenience, and available at design time under this name only.


TKOLEditBox events

TKOLEditBox

In TKOLEditBox

OnChange

OnSelChange

In TKOLControl

OnChar

OnClick

OnDestroy

OnDropFiles

OnEnter

OnEraseBkgnd

OnHide

OnKeyDown

OnKeyUp

OnLeave

OnMessage

OnMouseDblClk

OnMouseDown

OnMouseEnter

OnMouseLeave

OnMouseMove

OnMouseUp

OnMouseWheel

OnMove

OnPaint

OnResize

OnShow


TKOLEditBox.OnChange

TKOLEditBox	TKOLMemo	TKOLRichEdit

Occurs, whenever Text of edit control is changed.

type
  TOnEvent = procedure( Sender: PObj ) of object;

property OnChange: TOnEvent;

Description

  This event is called after changing editing text. To control changes before it occur, use OnChar event.

See also: OnSelChange event.


TKOLEditBox.OnSelChange

TKOLEditBox	TKOLMemo	TKOLRichEdit

Occurs, whenever selection is changed in edit control.

type
  TOnEvent = procedure( Sender: PObj ) of object;

property OnSelChange: TOnEvent;

Description

  This event is called after selection is changed in edit box, i.e. when caret position (SelStart) or selection length (SelLength) is changed.

See also: OnChange event, SelStart, SelLength properties..


KOL edit box specific TControl methods

TKOLEditBox

CanUndo

Clear

EmptyUndoBuffer

ReplaceSelection

SelectAll

Undo

See also other (common) TControl methods.


KOL TControl.SelectAll method for edit box control

TKOLEditBox	TKOLMemo	TKOLRichEdit

Selects all the text in the edit control.

procedure SelectAll;


KOL TControl.ReplaceSelection method for edit box control
KOL TControl.ReplaceSelection method for edit control

TKOLEditBox	TKOLMemo	TKOLRichEdit

Replaces selected text with another one.

procedure ReplaceSelection( const Value: String; aCanUndo: Boolean );


KOL TControl.CanUndo method for edit box control

TKOLEditBox	TKOLMemo	TKOLRichEdit

Returns TRUE, if an undo operation is possible for edit control (undo stack is not empty).

function CanUndo: Boolean;


KOL TControl.Clear method for edit box control
KOL TControl.Clear method for edit ontrol

TKOLEditBox	TKOLMemo	TKOLRichEdit

Empties edit control Text.

procedure Clear;

Description

The same as Text := ''; (though, may be call of Clear more efficiently).


KOL TControl.EmptyUndoBuffer method for edit box control
KOL TControl.EmptyUndoBuffer method for edit control

TKOLEditBox	TKOLMemo	TKOLRichEdit

Empties undo buffer, after which undo operation becomes impossible.

procedure EmptyUndoBuffer;


KOL TControl.Undo method for edit box control
KOL TControl.Undo method for edit ontrol

TKOLEditBox	TKOLMemo	TKOLRichEdit

Performs undo operation on the edit box.

function Undo: Boolean;


	TKOLMemo component
Hierarchy	Properties	Events	Constructor	Methods

Mirror for KOL TControl, implementing memo (multi-line edit box) control.

Unit

mckctrls

Description

TKOLMemo is a mirror component to KOL multi-line edit box, which is implemented in KOL TControl object type, as well as all other visual controls in KOL.

See also: TKOLEditBox, TKOLRichEdit mirror components.


TKOLMemo properties

TKOLMemo	Legend

In TKOLMemo

 	Count

Items

 	ItemSelected

Options

Selection

SelLength

SelStart

Text

 	TextSize

In TKOLControl

Align

CenterOnParent

ClientHeight

ClientWidth

ClsStyle

Color

Ctl3D

Cursor_

DoubleBuffered

Enabled

EraseBackground

ExStyle

Font

Handle

Parent

parentColor

parentFont

PlaceDown

PlaceRight

PlaceUnder

popupMenu

Style

TabOrder

TabStop

Tag

TextAlign

Transparent

Visible

in TComponent

Left

Top

Width

Height

Name


TKOLMemo.Count

TKOLMemo

Count of lines in multi-line edit control.

property Count: Integer;

Description

For edit box and memo controls, this property is read only (changing it has no effect).


TKOLMemo.Items[]
TKOLMemo.Items

TKOLMemo

Allows to read and modify lines of the multi-line edit box.

property Items[ Idx: Integer ]: String;

Description

For memo control, this property allows to read and modify lines of the Text. Take in attention, that SelStart, SelLength properties are changed in result of the modifying lines of the text.

See also: Count, Text, Selection properties, ReplaceSelection method.


TKOLMemo.ItemSelected[]
TKOLMemo.ItemSelected

TKOLMemo

Returns TRUE, if at least one character of the line is in Selection.

property ItemSelected[ Idx: Integer ]: Boolean;

Description

For memo control, this property is read-only.

See also: Count, Text, Selection properties, ReplaceSelection method.


TKOLMemo.Options

TKOLMemo

Options of the multi-line edit box control.

type
  TEditOption = ( eoNoHScroll, eoNoVScroll, eoLowercase, eoMultiline, eoNoHideSel, eoOemConvert, eoPassword, eoReadonly, eoUpperCase, eoWantReturn, eoWantTab );

  TEditOptions = Set of TEditOption;

property Options: TEditOptions;

Description

This is design-time only property. At run time, options are passed to a constructor of memo control, when it is created, in Options parameter.


TKOLMemo.Options
TKOLMemo.TextSize

TKOLMemo

Returns size of the Text.

property TextSize: Integer;

Description

Returns text size in characters, including line separators and control characters.


TKOLMemo events

TKOLMemo

In TKOLMemo

OnChange

OnSelChange

In TKOLControl

OnChar

OnClick

OnDestroy

OnDropFiles

OnEnter

OnEraseBkgnd

OnHide

OnKeyDown

OnKeyUp

OnLeave

OnMessage

OnMouseDblClk

OnMouseDown

OnMouseEnter

OnMouseLeave

OnMouseMove

OnMouseUp

OnMouseWheel

OnMove

OnPaint

OnResize

OnShow


KOL memo specific TControl methods

TKOLMemo

CanUndo

Clear

EmptyUndoBuffer

Item2Pos

Pos2Item

ReplaceSelection

SelectAll

Undo

See also other (common) TControl methods.


KOL TControl.Item2Pos method for memo control

 TKOLMemo	TKOLRichEdit

Converts line index to an index of the first character in the line.

function Item2Pos( ItemIdx: Integer ): Integer;


KOL TControl.Pos2Item method for memo control

TKOLMemo	TKOLRichEdit

Converts character index to an index of the line, containing that character.

function Pos2Item( Pos: Integer ): Integer;


	TKOLRichEdit component
Hierarchy	Properties	Events	Constructor	Methods

Mirror for KOL TControl, implementing rich edit control.

Unit

mckctrls

Description

TKOLRichEdit is a mirror component to KOL rich edit control, which is implemented in KOL TControl object type, as well as all other visual controls in the KOL.

See also: TKOLEditBox, TKOLMemo mirror components.


KOL rich edit control constructors

TKOLRichEdit

Following functions can be used to create rich edit control at run time dynamically:

function NewRichEdit( AParent: PControl; Options: TEditOptions ): PControl;

function NewRichEdit1( AParent: PControl; Options: TEditOptions ): PControl;

The first function creates rich edit control of version 2.0 or 3.0 (depending on availability of it) and the second function creates rich edit control of version 1.0.


TKOLRichEdit properties

TKOLRichEdit	Legend

In TKOLRichEdit

 	Count

Items

 	ItemSelected

MaxTextSize

Options

RE_AutoKeybdSet

RE_AutoKeyboard

RE_AutoURLDetect

RE_BorderWidth

RE_BorderSpace

RE_BorderStyle

 	RE_BorderValid

RE_CharFmtArea

RE_CharFormat

RE_DisabelOverwriteChange

 	RE_Error

RE_FmtAutoBackColor

 	RE_FmtAutoBackColorValid

RE_FmtAutoColor

 	RE_FmtAutoColorValid

RE_FmtBold

 	RE_FmtBoldValid

RE_FmtFontCharset

 	RE_FmtFontCharsetValid

RE_FmtFontColor

 	RE_FmtFontColorValid

RE_FmtFontName

 	RE_FmtFontNameValid

RE_FmtFontOffset

 	RE_FmtFontOffsetValid

RE_FmtFontSize

 	RE_FmtFontSizeValid

RE_FmtHidden

 	RE_FmtHiddenValid

RE_FmtLink

 	RE_FmtLinkValid

RE_FmtItalic

 	RE_FmtItalicValid

RE_FmtProtected

 	RE_FmtProtectedValid

RE_FmtStandard

RE_FmtStrikeout

 	RE_FmtStrikeoutValid

RE_FmtUnderline

 	RE_FmtUnderlineValid

RE_FmtUnderlineStyle

RE_Font

RE_Indent

 	RE_IndentValid

 	RE_Level

RE_LineSpacing

 	RE_LineSpacingValid

RE_NoOLEDragDrop

RE_Numbering

 	RE_NumberingValid

RE_NumBrackets

RE_NumStyle

RE_NumStart

RE_NumTab

RE_OverwriteMode

RE_ParaFmt

RE_RightIndent

 	RE_RightIndentValid

RE_SpaceAfter

 	RE_SpaceAfterValid

RE_SpaceBefore

 	RE_SpaceBeforeValid

RE_SpacingRule

RE_StartIndent

 	RE_StartIndentValid

 	RE_TabCount

RE_Table

RE_Tabs

 	RE_TabsValid

RE_Text

RE_TextAlign

 	RE_TextAlignValid

 	RE_TextSize

RE_Transparent

 	RE_URL

Selection

SelLength

SelStart

Text

 	TextSize

In TKOLControl

Align

CenterOnParent

ClientHeight

ClientWidth

ClsStyle

Color

Ctl3D

Cursor_

DoubleBuffered

Enabled

EraseBackground

ExStyle

Font

Handle

Parent

parentColor

parentFont

PlaceDown

PlaceRight

PlaceUnder

popupMenu

Style

TabOrder

TabStop

Tag

Transparent

Visible

in TComponent

Left

Top

Width

Height

Name


TKOLRichEdit.Count

TKOLRichEdit

Count of Text lines in rich edit control.

property Count: Integer;

Description

For rich edit control, this property is read only (changing it has no effect).


TKOLRichEdit.Items[]
TKOLRichEdit.Items

TKOLRichEdit

Allows to read and modify lines of the rich edit control.

property Items[ Idx: Integer ]: String;

Description

This property works with plain text only, i.e. formatting can not be maintained correctly. To work with formatting, use property Re_Text.

See also: Count, Text, Selection properties, ReplaceSelection method.


TKOLRichEdit.ItemSelected[]
TKOLRichEdit.ItemSelected

TKOLRichEdit

Returns TRUE, if at least one character of the line is in the Selection.

property ItemSelected[ Idx: Integer ]: Boolean;

Description

For rich edit control, this property is read-only.

See also: Count, Text, Selection properties, ReplaceSelection method.


TKOLRichEdit.Options

TKOLRichEdit

Options of the rich edit control.

type
  TEditOption = ( eoNoHScroll, eoNoVScroll, eoLowercase, eoMultiline, eoNoHideSel, eoOemConvert, eoPassword, eoReadonly, eoUpperCase, eoWantReturn, eoWantTab );

  TEditOptions = Set of TEditOption;

property Options: TEditOptions;

Description

This is design-time only property. At run time, options are passed to a constructor of the rich editcontrol, when it is created, in Options parameter.


TKOLRichEdit.RE_XXXValid

TKOLRichEdit

Shows, if XXX formatting property is valid for entire area, defined by RE_CharFmtArea property.

property RE_BorderValid: Boolean;

property RE_FmtAutoBackColorValid: Boolean;

property RE_FmtAutoColorValid: Boolean;

property RE_FmtBoldValid: Boolean;

property RE_FmtItalicValid: Boolean;

property RE_FmtStrikeoutValid: Boolean;

property RE_FmtUnderlineValid: Boolean;

property RE_FmtFontColorValid: Boolean;

property RE_FmtFontNameValid: Boolean;

property RE_FmtFontOffsetValid: Boolean;

property RE_FmtFontSizeValid: Boolean;

property RE_FmtHiddenValid: Boolean;

property RE_FmtLinkValid: Boolean;

property RE_FmtProtectedValid: Boolean;

property RE_IndentValid: Boolean;

property RE_LineSpacingValid: Boolean;

property RE_NumberingValid: Boolean;

property RE_RightIndentValid: Boolean;

property RE_SpaceAfterValid: Boolean;

property RE_SpaceBeforeValid: Boolean;

property RE_StartIndentValid: Boolean;

property RE_TabsValid: Boolean;

property RE_TextAlignValid: Boolean;

Description

This set of properties can be used to get know if correspondent formatting property is valid for entire formatting area, defined by RE_CharFmtArea property. (I.e., if such formatting has the same value for entire area).

Here is a table of correspondance between RE_XXXValid properties and RE_XXX properties, which validity can be examined with its:

RE_BorderValid	RE_BorderWidth, RE_BorderSpace, RE_BorderStyle
RE_FmtAutoBackColorValid	RE_FmtAutoBackColor
RE_FmtAutoColorValid	RE_FmtAutoColor
RE_FmtBoldValid	RE_FmtBold
RE_FmtItalicValid	RE_FmtItalic
RE_FmtStrikeoutValid	RE_FmtStrikeout
RE_FmtUnderlineValid	RE_FmtUnderline
RE_FmtFontCharsetValid	RE_FmtFontCharset
RE_FmtFontColorValid	RE_FmtFontColor
RE_FmtFontNameValid	RE_FmtFontName
RE_FmtFontOffsetValid	RE_FmtFontOffset
RE_FmtFontSizeValid	RE_FmtFontSize
RE_FmtHiddenValid	RE_FmtHidden
RE_FmtLinkValid	RE_FmtLink
RE_FmtProtectedValid	RE_FmtProtected
RE_IndentValid	RE_Indent
RE_LineSpacingValid	RE_LineSpacing
RE_NumberingValid	RE_Numbering
RE_RightIndentValid	RE_RightIndent
RE_SpaceAfterValid	RE_SpaceAfter
RE_SpaceBeforeValid	RE_SpaceBefore
RE_StartIndentValid	RE_StartIndent
RE_TabsValid	RE_TabCount, RE_Tabs
RE_TextAlignValid	RE_TextAlign


TKOLRichEdit.RE_FmtFontXXX formatting properties

TKOLRichEdit

This set of properties allows to work with characters formatting.

property RE_FmtFontCharset: Integer;

property RE_FmtFontColor: TColor;

property RE_FmtFontName: String;

property RE_FmtFontOffset: Integer;

property RE_FmtFontSize: Integer;

property Re_FmtBold: Boolean;

property RE_FmtItalic: Boolean;

property RE_FmtStrikeout: Boolean;

property RE_FmtUnderline: Boolean;

property RE_FmtHidden: Boolean;

property RE_FmtLink: Boolean;

property RE_FmtProtected: Boolean;

Description

These properties allows to get and modify separate character formatting settings for a formatting area, defined by RE_CharFmtArea property (by default, this property is raSelect). Here is short description for every of these properties:

RE_FmtFontCharset	charset (value in range 0..255). See description of charset in Font property;

RE_FmtFontColor	font color. When read, always is RGB. When write, converted to RGB using Color2RGB function;

RE_FmtFontName	font name (e.g., 'Arial');

RE_FmtFontOffset	font vertical offset from baseline, positive values correspond to subscript;

RE_FmtFontSize	font size, in twips (1/1440 of an inch, or 1/20 of printer's point)

Re_FmtBold	bold style;

RE_FmtItalic	italic style;

RE_FmtStrikeout	strikeout style;

RE_FmtUnderline	underline style (see also RE_FmtUnderlineStyle property).

RE_FmtHidden	hidden text;

RE_FmtLink	text is a link;

RE_FmtProtected	text is protected from changing it by user.

It is also possible to read/write all character formatting settings at once using property RE_CharFormat.


TKOLRichEdit.MaxTextSize

TKOLRichEdit

Maximum text size for rich edit control.

property MaxTextSize: Integer;

Description

Though rich edit controls can maintain huge (gygabytes) text, default value is 32767. To allow working with huge texts, change this property to desired amount (tip: it is possible to use constant MaxInt, typed so in Object Inspector).


TKOLRichEdit.RE_AutoKeybdSet

TKOLRichEdit

Determines, if to generate code for assigning value to RE_AutoKeyboard property.

property RE_AutoKeybdSet: Boolean;

Description

This is design-time only property and affects a way, how code is generated for rich edit control initialization. In earlier rich edit control versions, rich edit control RE_AutoKeyboard property default value differs from the newest. Setting this property to TRUE, it is possible to provide for property RE_Autokeyboard initial value, what You wish, not system default, independant from Windows and rich edit dll version.


TKOLRichEdit.RE_AutoKeyboard

TKOLRichEdit

Autokeyboard option value for rich edit control.

property RE_AutoKeyboard: Boolean;

Description

Autokeyboard is a lovely "feature" of automatic switching keyboard language when caret is over another language text. For older RichEdit, is 'on' always, for newest - 'off' by default.

See also: RE_AutoKeybdSet property.


TKOLRichEdit.RE_AutoURLDetect

TKOLRichEdit

True, if URL strings should be autodetected in the rich edit text.

property RE_AutoURLDetect: Boolean;

Description

If TRUE, strings, recognized as URLs (like http://xxx.yyy.zzz or aaa@bbb.ccc) are marked out underlined and with special color and font style, and additional events are generated for mouse click and overrun its.

See also: OnRE_OverURL, OnRE_URLClick events.


TKOLRichEdit.RE_BorderXXX

TKOLRichEdit

Border width, space and style paragraph formatting attrubutes.

type
  TBorderEdge = (beLeft, beTop, beRight, beBottom);

property RE_BorderWidth[ Side: TBorderEdge ]: Integer;

property RE_BorderSpace[ Side: TBorderEdge ]: Integer;

property RE_BorderStyle[ Side: TBorderEdge ]: Integer;

Description

These attributes define paragraph border in current selection.

See also: RE_BorderValid, RE_ParaFmt properties.


TKOLRichEdit.RE_CharFmtArea

TKOLRichEdit

Area, which is used to work with character formatting attributes.

type
  TRichFmtArea = ( raSelection, raWord, raAll );

property RE_CharFmtArea: TRichFmtArea;

Description

This area is used when changing (not retrieving!) character formatting attributes using properties RE_CharFormat, and also RE_FmtBold, RE_FmtItalic, RE_FmtStrikeout, RE_FmtUnderline, and other RE_FmtFontXXX, and also when validity of such format settings are examined for the defined area using properties RE_xxxValid.

Note: when working with paragraph formatting attributes, this property has no effect. Instead, current selection is always under consideration for such case.


TKOLRichEdit.RE_CharFormat

TKOLRichEdit

Character formatting attributes for an area, defined by RE_CharFmtArea property.

type
  TCharFormat2A = packed record

    cbSize: UINT;

    dwMask: DWORD;

    dwEffects: DWORD;

    yHeight: Longint;

    yOffset: Longint;	{ Indent }

    crTextColor: TColorRef;

    bCharSet: Byte;

    bPitchAndFamily: Byte;

    szFaceName: array[0..LF_FACESIZE - 1] of AnsiChar;

    wWeight: Word;	{ Font weight (LOGFONT value) }

    sSpacing: Smallint;	{ Amount to space between letters }

    crBackColor: TColorRef;	{ Background color }

    lid: LCID;	{ Locale }

    dwReserved: DWORD;	{ Reserved. Must }

    sStyle: Smallint;	{ Style handle }

    wKerning: Word;	{ Twip size above which to kern char pair }

    bUnderlineType: Byte;	{ Underline }

    bAnimation: Byte;	{ Animated text like marching ants}

    bRevAuthor: Byte;	{ Revision author index }

    bReserved1: Byte;

  end;

  TCharFormat2 = TCharFormat2A;

property RE_CharFormat: TCharformat2;

Description

This formatting attributes can be retrived or changed as a record to work with all possible character format attributes on the low level coding.

Note: even when working with old version of rich edit, this property is used extended record structure. A field cbSize is corrected when needed to make command working, and extended fields are ignored for case of old rich edit control version.

See also: RE_FmtFontXXX properties.


TKOLRichEdit.RE_DisableOverwriteChange

TKOLRichEdit

When TRUE, prevents changing "insert" / "overwrite" switching by INSERT key.

property RE_DisableOverwriteChange: Boolean;

Description

Even if switching between "insert" and "overwrite" modes is disabled, an event handler for the event OnRE_InsOvrMode_Change therefore is called, if assigned.


TKOLRichEdit.RE_Error

TKOLRichEdit

Contains error code after the last access to RE_Text property, or after stream operations with rich edit control, such as RE_SaveToStream, RE_SaveToFile, RE_LoadFromStream, RE_LoadFromFile.

property RE_Error: Integer;


TKOLRichEdit.RE_FmtAutoBackColor

TKOLRichEdit

True, when automatic back color is used.

property RE_FmtAutoBackColor: Boolean;

Description

See also: RE_FmtAutoColor property.


TKOLRichEdit.RE_FmtAutoColor

TKOLRichEdit

True, when automatic text color is used.

property RE_FmtAutoColor: Boolean;

Description

TRUE means, that RE_FmtFontColor has no effect.

See also: RE_FmtAutoBackColor property.


TKOLRichEdit.RE_FmtStandard

TKOLRichEdit

Provides "standard" keyboard keys handling for rich edit control.

property RE_FmtStandard: Boolean;

Description

Actually, when this property is set to TRUE, some keys are handled to extend rich edit control behavior. These are following:

CTRL+I 	- switch "Italic",

CTRL+B 	- switch "Bold",

CTRL+U 	- switch "Underline",

CTRL+SHIFT+U 	- swith underline type and turn underline on (note, that some of underline styles can not be shown properly in RichEdit v2.0 and lower, though RichEdit2.0 stores data successfully).

CTRL+O 	- switch "StrikeOut",

CTRL+'gray+' 	- increase font size,

CTRL+'gray-' 	- decrease font size,

CTRL+SHIFT+'gray+'	- superscript,

CTRL+SHIFT+'gray-' 	- subscript,

CTRL+SHIFT+Z 	- ReDo

following standard formatting keys are provided by RichEdit control itself in Windows2000, some of these are not functioning automatically in earlier Windows versions, even for RichEdit2.0. So, functionality of some of these (marked with (*) ) are added too:

CTRL+L 	- align paragraph left,	(*)

CTRL+R 	- align paragraph right,	(*)

CTRL+E 	- align paragraph center,	(*)

CTRL+A 	- select all,	(*)

double-click on word 	- select word,

CTRL+Right 	- to next word,

CTRL+Left 	- to previous word,

CTRL+Home 	- to the beginning of text,

CTRL+End 	- to the end of text.

CTRL+Z 	- UnDo

Note: this property is design-time. At run time, it is available as a (so-called) method.


TKOLRichEdit.RE_FmtUnderlineStyle

TKOLRichEdit

Determines style of underlying the text.

type
  TRichUnderline = ( ruSingle, ruWord, ruDouble, ruDotted,

//all other - only for RichEditv3.0:

ruDash, ruDashDot, ruDashDotDot, ruWave, ruThick, ruHairLine );

property RE_FmtUnderlineStyle: TRichUnderline;

Description

Rich text exteded underline styles (available only for RichEdit v2.0, and even for RichEdit v2.0 additional styles can not displayed – but ruDotted under Windows2000 is working).

See also: RE_FmtUnderline property.


TKOLRichEdit.RE_Font

TKOLRichEdit

Font for an area, defined by RE_CharFmtArea property.

property RE_Font: PGraphicTool;

Description

When retrieve RE_Font, font attributes for the first character in the selection are returned. When set (or subproperties of RE_Font are set), all font attributes are applied to entire area, defined by RE_CharFmtArea property.

See also: RE_FmtFontXXX properties.


TKOLRichEdit.RE_Indent

TKOLRichEdit

Paragraph indent.

property RE_Indent: Integer;

Description

See also: RE_ParaFmt property.


TKOLRichEdit.RE_Level

TKOLRichEdit

Outline level (for numbering paragraphs?). Read only.

property RE_Level: Integer;

Description

See also: RE_ParaFmt property.


TKOLRichEdit.RE_LineSpacing

TKOLRichEdit

Line spacing.

property RE_LineSpacing: Integer;

Description

This value based on RE_SpacingRule property.

See also: RE_ParaFmt property.


TKOLRichEdit.RE_NoOLEDragDrop

TKOLRichEdit

Disables OLE drag-drop.

property RE_NoOLEDragDrop: Boolean;

Description

This property is design-time. At run-time it is available as a method.

Seems not working for some cases.


TKOLRichEdit.RE_Numbering

TKOLRichEdit

Numbering for a paragraph on.

property RE_Numbering: Boolean;

Description

See also: RE_ParaFmt, RE_NumBrackets, RE_NumStyle, RE_NumStart, RE_NumTab properties.


TKOLRichEdit.RE_NumBrackets

TKOLRichEdit

Numbering brackets type for a paragraph.

type
  TRichNumBrackets = ( rnbRight, rnbBoth, rnbPeriod, rnbPlain, rnbNoNumber );

property RE_NumBrackets: TRichNumBrackets;

Description

See also: RE_ParaFmt, RE_Numbering, RE_NumStyle, RE_NumStart, RE_NumTab properties.


TKOLRichEdit.RE_NumStyle

TKOLRichEdit

Numbering style for a paragraph.

type

  TRichNumbering = ( rnNone, rnBullets, rnArabic, rnLLetter, rnULetter, rnLRoman, rnURoman );

property RE_NumStyle: TRichNumbering;

Description

See also: RE_ParaFmt, RE_Numbering, RE_NumBrackets, RE_NumStart, RE_NumTab properties.


TKOLRichEdit.RE_NumStart

TKOLRichEdit

Start value for paragraph numbering.

property RE_NumStart: Integer;

Description

See also: RE_ParaFmt, RE_Numbering, RE_NumBrackets, RE_NumStyle, RE_NumTab properties.


TKOLRichEdit.RE_NumTab

TKOLRichEdit

Tab between start of number and start of paragraph text

type

  TRichNumbering = ( rnNone, rnBullets, rnArabic, rnLLetter, rnULetter, rnLRoman, rnURoman );

property RE_NumStyle: TRichNumbering;

Description

If this value is too small too view number, number is not displayed. (Default value seems to be sufficient though).

See also: RE_ParaFmt, RE_Numbering, RE_NumBrackets, RE_NumStyle, RE_NumStart properties.


TKOLRichEdit.RE_OverwriteMode

TKOLRichEdit

Allows to get or set overwrite / insert mode programmatically.

property RE_OverwriteMode: Boolean;

Description

This property allows to control insert/overwrite mode.

The first, to examine, if insert or overwrite mode is current (but it is necessary either to access this property, at least once, immediately after creating rich edit control, or to assign event OnRE_InsOvrMode_Change (even empty) to your handler).

The second, to set desired mode programmatically - by assigning value to this property (You also have to initialize monitoring procedure by either reading RE_OverwriteMode property or assigning handler to event OnRE_InsOvrMode_Change immediately following RichEdit control creation).


TKOLRichEdit.RE_ParaFmt

TKOLRichEdit

Paragraph formatting attributes for current selection.

type
TParaFormat2 = packed record

    cbSize: UINT;

    dwMask: DWORD;

    wNumbering: Word;

    wReserved: Word;

    dxStartIndent: Longint;

    dxRightIndent: Longint;

    dxOffset: Longint;

    wAlignment: Word;

    cTabCount: Smallint;

    rgxTabs: array [0..MAX_TAB_STOPS - 1] of Longint;

    dySpaceBefore: Longint;	{ Vertical spacing before }

    dySpaceAfter: Longint;	{ Vertical spacing after para }

    dyLineSpacing: Longint;	{ Line spacing depending on Rule }

    sStyle: Smallint;	{ Style handle }

    bLineSpacingRule: Byte;	{ Rule for line spacing (see tom.doc) }

    bCRC: Byte;	{ Reserved for CRC for rapid searching }

    wShadingWeight: Word;	{ Shading in hundredths of a per cent }

    wShadingStyle: Word;	{ Nibble 0: style, 1: cfpat, 2: cbpat }

    wNumberingStart: Word;	{ Starting value for numbering }

    wNumberingStyle: Word;	{ Alignment, roman/arabic, (), ), ., etc. }

    wNumberingTab: Word;	{ Space bet 1st indent and 1st-line text }

    wBorderSpace: Word;	{ Space between border and text (twips) }

    wBorderWidth: Word;	{ Border pen width (twips) }

    wBorders: Word;	{ Byte 0: bits specify which borders }

{ Nibble 2: border style, 3: color index }

  end;

property RE_ParaFormat: TParaFormat2;

Description

This formatting attributes can be retrived or changed as a record to work with all possible paragraph format attributes on the low level coding.

Note: even when working with old version of rich edit, this property is used extended record structure. A field cbSize is corrected when needed to make command working, and extended fields are ignored for case of old rich edit control version.


TKOLRichEdit.RE_RightIndent

TKOLRichEdit

Paragraph right indent.

property RE_RightIndent: Integer;

Description

See also: RE_ParaFmt property.


TKOLRichEdit.RE_StartIndent

TKOLRichEdit

Paragraph start indent.

property RE_StartIndent: Integer;

Description

See also: RE_ParaFmt property.


TKOLRichEdit.RE_SpaceAfter

TKOLRichEdit

Space after the paragraph.

property RE_SpaceAfter: Integer;

Description

See also: RE_ParaFmt property.


TKOLRichEdit.RE_SpaceBefore

TKOLRichEdit

Space before the paragraph.

property RE_SpaceBefore: Integer;

Description

See also: RE_ParaFmt property.


TKOLRichEdit.RE_SpacingRule

TKOLRichEdit

Spacing rule for the paragraph.

property RE_SpacingRule: Integer;

Description

See also: RE_ParaFmt property.


TKOLRichEdit.RE_TabCount

TKOLRichEdit

Count of tabulation positions.

property RE_TabCount: Integer;

Description

Maximum possible value is 32.

See also: RE_ParaFmt property.


TKOLRichEdit.RE_Tabs

TKOLRichEdit

Tabulation positions.

property RE_Tabs[ Idx: Integer ]: Integer;

Description

See also: RE_ParaFmt property.


TKOLRichEdit.RE_Text

TKOLRichEdit

Text of the rich edit control.

type
  TRETextFormat = ( reRTF, reText, rePlainRTF, reRTFNoObjs, rePlainRTFNoObjs, reTextized );

property RE_Text[ Format: TRETextFormat; SelectionOnly: Boolean ]: String;

Description

See also: Text property.


TKOLRichEdit.RE_TextAlign

TKOLRichEdit

Text align of the paragraph in the rich edit control.

type

  TRichTextAlign = ( raLeft, raRight, raCenter,

// all other are only set but can not be displayed:

// displayed like raLeft (though stored normally)

raJustify, raInterLetter, raScaled, raGlyphs, raSnapGrid );

property RE_TextAlign: TRichTextAlign;

Description

See also: RE_ParaFmt property.


TKOLRichEdit.RE_TextSize

TKOLRichEdit

Size of the text in the rich edit control, in desired units.

type

  TRichTextSizes = ( rtsNoUseCRLF, rtsNoPrecise, rtsClose, rtsBytes );

  TRichTextSize = set of TRichTextSizes;

property RE_TextSize: TRichTextSize;

Description

See also: TextSize property.


TKOLRichEdit.RE_Transparent

TKOLRichEdit

Transparency of the rich edit control.

property RE_Transparent: Boolean;

Description

Use this property for rich edit control, not common Transparent property.

See also: Transparent property.


TKOLRichEdit.RE_URL

TKOLRichEdit

Active URL (in OnRE_URLClick and OnRE_OverURL events).

property RE_URL: String;

Description


TKOLRichEdit events

TKOLRichEdit

In TKOLRichEdit

OnChange

OnProgress

OnRE_InsOvrMode_Change

OnRE_OverURL

OnRE_URLClick

OnSelChange

In TKOLControl

OnChar

OnClick

OnDestroy

OnDropFiles

OnEnter

OnEraseBkgnd

OnHide

OnKeyDown

OnKeyUp

OnLeave

OnMessage

OnMouseDblClk

OnMouseDown

OnMouseEnter

OnMouseLeave

OnMouseMove

OnMouseUp

OnMouseWheel

OnMove

OnPaint

OnResize

OnShow


TKOLRichEdit.OnProgress

TKOLRichEdit

Occurs during long stream operations with rich edit text.

type
 TOnEvent = procedure( Sender: PObj ) of object;

property OnProgress: TOnEvent

Description

This event is called during RE_SaveToStream, RE_LoadFromStream (and also during RE_SaveToFile, RE_LoadFromFile and while accessing or changing RE_Text property). To calculate relative progress, it is possible to examine current position in stream/file with its total size while reading, or with rich edit text size, while writing (property RE_TextSize[ rsBytes ]).


TKOLRichEdit.OnRE_InsOvrMode_Change

TKOLRichEdit

Occurs when Insert/Overwrite mode is changed in result of pressing Insert keyboard key.

type
 TOnEvent = procedure( Sender: PObj ) of object;

property OnRE_InsOvrMode_Change: TOnEvent

Description

This event is called, whenever key INSERT is pressed in control (and for rich edit control, this means, that insert/overwrite mode is changed).

See also: RE_OverwriteMode property.


TKOLRichEdit.OnRE_OverURL

TKOLRichEdit

Occurs when mouse cursor is moving over URL string in the rich edit text.

type
 TOnEvent = procedure( Sender: PObj ) of object;

property OnRE_OverURL: TOnEvent

Description

Is called when mouse is moving over URL. This can be used to set cursor, for example, depending on type of URL (to determine URL type read property RE_URL).

See also: RE_AutoURLDetect property, OnRE_URLClick event.


TKOLRichEdit.OnRE_URLClick

TKOLRichEdit

Occurs when mouse is clicked on URL in rich edit text.

type
 TOnEvent = procedure( Sender: PObj ) of object;

property OnRE_URLClick: TOnEvent

Description

Is called when mouse is clicked on URL.To determine which URL is clicked, read RE_URL property).

See also: RE_AutoURLDetect property, OnRE_OverURL event.


KOL rich edit specific TControl methods

TKOLRichEdit

CanUndo

Clear

EmptyUndoBuffer

Item2Pos

Pos2Item

RE_Append

RE_HideSelection

RE_InsertRTF

RE_LoadFromStream

RE_LoadFromFile

RE_Redo

RE_SearchText

RE_SaveToStream

RE_SaveToFile

ReplaceSelection

SelectAll

Undo

See also other (common) TControl methods.


KOL TControl.RE_Append method

TKOLRichEdit

Appends text to the end of rich edit control, peserving formatting, and allowing to undo this operation later.

procedure RE_Append( const S: String; ACanUndo: Boolean );


KOL TControl.RE_HideSelection method

TKOLRichEdit

Makes selected text "hidden" or otherwise, visible.

procedure RE_HideSelection( aHide: Boolean );

See also: RE_FmtHidden property.


KOL TControl.RE_InsertRTF method

TKOLRichEdit

Allows to insert RTF-formatted text to the rich edit control.

procedure RE_InsertRTF( const S: String );

See also: RE_Text property.


KOL TControl.RE_LoadFromStream method

TKOLRichEdit

Loads rich edit text from stream.

type
  TRETextFormat = ( reRTF, reText, rePlainRTF, reRTFNoObjs, rePlainRTFNoObjs, reTextized );

function RE_LoadFromStream( Stream: PStream; Length: Integer; Format: TRETextFormat; SelectionOnly: Boolean ): Boolean;

Description

<not finished>

See also: RE_SaveToStream method.


KOL TControl.RE_SaveToStream method

TKOLRichEdit

Saves rich edit text to a stream.

type
  TRETextFormat = ( reRTF, reText, rePlainRTF, reRTFNoObjs, rePlainRTFNoObjs, reTextized );

function RE_SaveToStream( Stream: PStream; Format: TRETextFormat; SelectionOnly: Boolean ): Boolean;

Description

<not finished>

See also: RE_LoadFromStream method.


KOL TControl.RE_LoadFromFile method

TKOLRichEdit

Loads rich edit text from file.

type
  TRETextFormat = ( reRTF, reText, rePlainRTF, reRTFNoObjs, rePlainRTFNoObjs, reTextized );

function RE_LoadFromFile( const Filename: String; Format: TRETextFormat; SelectionOnly: Boolean ): Boolean;

Description

<not finished>

See also: RE_SaveToFile method.


KOL TControl.RE_SaveToFile method

TKOLRichEdit

Saves rich edit text to a file.

type
  TRETextFormat = ( reRTF, reText, rePlainRTF, reRTFNoObjs, rePlainRTFNoObjs, reTextized );

function RE_SaveToFile( const Filename: String; Format: TRETextFormat; SelectionOnly: Boolean ): Boolean;

Description

<not finished>

See also: RE_LoadFromFile method.


KOL TControl.RE_SearchText method

TKOLRichEdit

Searches given text in a rich edit control.

function RE_SearchText( const Value: String; MatchCase, WholeWord, ScanForward: Boolean; SearchFrom, SearchTo: Integer ): Integer;

Description

Searches given string starting from SearchFrom position up to SearchTo position (to the end of text, if SearchTo is -1). Returns zero-based character position of the next match, or -1 if there are no more matches.

To search in bacward direction, set ScanForward to False, and pass SearchFrom greater then SearchTo (or even SearchFrom = -1 and SearchTo = 0).

See also: RE_Text property.


KOL TControl.RE_Redo method

TKOLRichEdit

Performs redo operation, when possible.

function RE_Redo: Boolean;

Description

See also: Undo method.


	TKOLListBox component
Hierarchy	Properties	Events	Constructor	Methods

Mirror for KOL TControl, implementing list box control.

Unit

mckctrls

Description

TKOLListBox is a mirror component to KOL list box, which is implemented in KOL TControl object type, as well as all other visual controls in KOL.

See also: TKOLListView, TKOLComboBox mirror components.


KOL list box controls constructor

TKOLListBox

Following global function can be used to create list box control at run-time:

type
  TListOption = ( loNoHideScroll, loNoExtendSel, loMultiColumn, loMultiSelect, loNoIntegralHeight, loNoSel, loSort, loTabstops, loNoStrings, loNoData, loOwnerDrawFixed, loOwnerDrawVariable );

  TListOptions = Set of TListOption;

function NewListbox( AParent: PControl; Options: TListOptions ): PControl;


TKOLListBox properties

TKOLListBox	Legend

In TKOLListBox

Count

CurIndex

ItemData

Items

 	ItemSelected

Options

SelLength

SelStart

In TKOLControl

Align

CenterOnParent

ClientHeight

ClientWidth

ClsStyle

Color

Ctl3D

Cursor_

DoubleBuffered

Enabled

EraseBackground

ExStyle

Font

Handle

Parent

parentColor

parentFont

PlaceDown

PlaceRight

PlaceUnder

popupMenu

Style

TabOrder

TabStop

Tag

Transparent

Visible

in TComponent

Left

Top

Width

Height

Name


TKOLListBox.Count

TKOLListBox

Count of items in list box control.

property Count: Integer;

Description


TKOLListBox.CurIndex

TKOLListBox

Index of current item.

property CurIndex: Integer;

Description

An index of selected item, of for multi-select list box, index of focused item. –1, if there are no current item in the list box.


TKOLListBox.ItemData

TKOLListBox

Allows to read and modify custom data 32 bit value, associated with an item.

property ItemData[ Idx: Integer ]: DWORD;

Description

See also: Count, Items[ ] properties.


TKOLListBox.Items[]
TKOLListBox.Items

TKOLListBox

Allows to read and modify items of the list box.

property Items[ Idx: Integer ]: String;

Description

See also: Count, ItemData[ ] properties.


TKOLListBox.ItemSelected[]
TKOLListBox.ItemSelected

TKOLListBox

Selected state of an item.

property ItemSelected[ Idx: Integer ]: Boolean;

Description

Returns TRUE, if an item is selected. Allows to change "selected" state for an item.

See also: Count, Items[ ] properties, OnSelChange event.


TKOLListBox.Options

TKOLListBox

Options of the list box control.

type
  TListOption = ( loNoHideScroll, loNoExtendSel, loMultiColumn, loMultiSelect, loNoIntegralHeight, loNoSel, loSort, loTabstops, loNoStrings, loNoData, loOwnerDrawFixed, loOwnerDrawVariable );

  TListOptions = Set of TListOption;

property Options: TListOptions;

Description

This is design-time only property. At run time, options are passed to a constructor of list box control, when it is created, in Options parameter.


TKOLListBox.SelLength

TKOLListBox

Count of selected items in list box.

property SelLength: Integer;

Description


TKOLListBox.SelStart

TKOLListBox

Index of first selected item in list box.

property SelStart: Integer;

Description


TKOLListBox events

TKOLListBox

In TKOLListBox

OnChange

OnDrawItem

OnMeasureItem

OnSelChange

In TKOLControl

OnChar

OnClick

OnDestroy

OnDropFiles

OnEnter

OnEraseBkgnd

OnHide

OnKeyDown

OnKeyUp

OnLeave

OnMessage

OnMouseDblClk

OnMouseDown

OnMouseEnter

OnMouseLeave

OnMouseMove

OnMouseUp

OnMouseWheel

OnMove

OnPaint

OnResize

OnShow


TKOLListBox.OnChange

TKOLListBox

Occurs, whenever Items of list box control are changed.

type
  TOnEvent = procedure( Sender: PObj ) of object;

property OnChange: TOnEvent;

Description

See also: OnSelChange event.


TKOLListBox.OnDrawItem

TKOLListBox

Occurs, whenever Items of list box control should be painted.

type
  TDrawActions = ( odaEntire, odaFocus, odaSelect );

  TDrawAction = Set of TDrawActions;

  TDrawStates = ( odsSelected, odsGrayed, odsDisabled, odsChecked, odsFocused, odsDefault, odsHotlist, odsInactive, odsNoAccel, odsNoFocusRect, ods400reserved, ods800reserved, odsComboboxEdit );

  TDrawState = Set of TDrawStates;

  TOnDrawItem = function( Sender: PControl; DC: HDC; const Rect: TRect; ItemIdx: Integer; DrawAction: TDrawAction; ItemState: TDrawState ): Boolean of object;

property OnDrawItem: TOnDrawItem;

Description

See also: OnMeasureItem event.


TKOLListBox.OnMeasureItem

TKOLListBox

Occurs, whenever Items of list box control should be measured.

type
  TOnMeasureItem = function( Sender: PControl; Idx: Integer ): Integer of object;

property OnMeasureItem: TOnMeasureItem;

Description

This event is called for owner-drawn controls, such as list box. For fixed item height controls (list box with loOwnerDrawFixed style) this event is called once. For list box with loOwnerDrawVariable style this event is called for every item.

See also: OnDrawItem event.


TKOLListBox.OnSelChange

TKOLListBox

Occurs, whenever selection is changed in list box control.

type
  TOnEvent = procedure( Sender: PObj ) of object;

property OnSelChange: TOnEvent;

Description

See also: OnChange event.


KOL listbox specific TControl methods

TKOLListBox

Add

AddDirList

Clear

Delete

Insert

See also other (common) TControl methods.


KOL TControl.Add method for list box control

TKOLListBox

Adds an item to the list box.

function Add( const S: String ): Integer;

Description

Adds an item, returns index of added item.

See also: Items[ ] property,  Insert, Delete methods


KOL TControl.AddDirList method for list box control

TKOLListBox

Adds directory listing to the list box.

procedure AddDirList( const Filemask: String; Attrs: DWORD );

Description

<not finished>


KOL TControl.Clear method for list box control

TKOLListBox

Removes all items from the list box.

procedure Clear;

Description

See also: Items[ ] property, Add, Insert, Delete methods


KOL TControl.Delete method for list box control

TKOLListBox

Deletes an item from the list box.

procedure Delete( Idx: Integer );

Description

Deletes an item by index.

See also: Items[ ] property,  Insert, Add methods


KOL TControl.Insert method for list box control

TKOLListBox

Inserts an item to the list box.

function Insert( Idx: Integer; const S: String ): Integer;

Description

Inserts an item to the position, giver by Idx parameter, returns index of added item.

See also: Items[ ] property,  Add, Delete methods


	TKOLComboBox component
Hierarchy	Properties	Events	Constructor	Methods

Mirror for KOL TControl, implementing list box control.

Unit

mckctrls

Description

TKOLComboBox is a mirror component to KOL combo box, which is implemented in KOL TControl object type, as well as all other visual controls in KOL.

See also: TKOLListBox mirror components.


KOL combo box controls constructor

TKOLComboBox

Following global function can be used to create combo box control at run-time:

type
  TComboOption = ( coReadOnly, coNoHScroll, coAlwaysVScroll, coLowerCase, coNoIntegralHeight, coOemConvert, coSort, coUpperCase, coOwnerDrawFixed, coOwnerDrawVariable );

  TComboOptions = Set of TComboOption;

function NewCombobox( AParent: PControl; Options: TComboOptions ): PControl;


TKOLComboBox properties

TKOLComboBox	Legend

In TKOLComboBox

Count

CurIndex

DroppedDown

DroppedWidth

ItemData

Items

 	ItemSelected

Options

SelStart

In TKOLControl

Align

CenterOnParent

ClientHeight

ClientWidth

ClsStyle

Color

Ctl3D

Cursor_

DoubleBuffered

Enabled

EraseBackground

ExStyle

Font

Handle

Parent

parentColor

parentFont

PlaceDown

PlaceRight

PlaceUnder

popupMenu

Style

TabOrder

TabStop

Tag

Transparent

Visible

in TComponent

Left

Top

Width

Height

Name


TKOLComboBox.Count

TKOLComboBox

Count of items in combo box control.

property Count: Integer;

Description


TKOLComboBox.CurIndex

TKOLComboBox

Index of current item.

property CurIndex: Integer;

Description

An index of selected item. –1, if there are no current item in the combo box.


TKOLComboBox.DroppedDown

TKOLComboBox

Dropped down state for combo box.

property DroppedDown: Boolean;

Description

Dropped down state for combo box. Set it to TRUE or FALSE to change dropped down state.


TKOLComboBox.DroppedWidth

TKOLComboBox

Width of dropped down list box in pixels (if 0, default used).

property DroppedWidth: Integer;

Description


TKOLComboBox.ItemData

TKOLComboBox

Allows to read and modify custom 32 bit value data, associated with an item.

property ItemData[ Idx: Integer ]: DWORD;

Description

See also: Count, Items[ ] properties.


TKOLComboBox.Items[]
TKOLComboBox.Items

TKOLComboBox

Allows to read and modify items of the combo box.

property Items[ Idx: Integer ]: String;

Description

See also: Count, ItemData[ ] properties.


TKOLComboBox.ItemSelected[]
TKOLcomboBox.ItemSelected

TKOLComboBox

Selected state of an item.

property ItemSelected[ Idx: Integer ]: Boolean;

Description

Returns TRUE, if an item is selected. Allows to change "selected" state for an item.

See also: Count, Items[ ] properties, OnSelChange event.


TKOLComboBox.Options

TKOLComboBox

Options of the list box control.

type
  TComboOption = ( coReadOnly, coNoHScroll, coAlwaysVScroll, coLowerCase, coNoIntegralHeight, coOemConvert, coSort, coUpperCase, coOwnerDrawFixed, coOwnerDrawVariable );

  TComboOptions = Set of TComboOption;

property Options: TComboOptions;

Description

This is design-time only property. At run time, options are passed to a constructor of combo box control, when it is created, in Options parameter.


TKOLComboBox.SelStart

TKOLComboBox

Index of selected item in combo box.

property SelStart: Integer;

Description

See also: CurIndex property.


TKOLComboBox events

TKOLComboBox

In TKOLComboBox

OnChange

OnCloseUp

OnDrawItem

OnDropDown

OnMeasureItem

OnSelChange

In TKOLControl

OnChar

OnClick

OnDestroy

OnDropFiles

OnEnter

OnEraseBkgnd

OnHide

OnKeyDown

OnKeyUp

OnLeave

OnMessage

OnMouseDblClk

OnMouseDown

OnMouseEnter

OnMouseLeave

OnMouseMove

OnMouseUp

OnMouseWheel

OnMove

OnPaint

OnResize

OnShow


TKOLComboBox.OnChange

TKOLComboBox

Occurs, whenever Items of combo box control are changed.

type
  TOnEvent = procedure( Sender: PObj ) of object;

property OnChange: TOnEvent;

Description

See also: OnSelChange event.


TKOLComboBox.OnDrawItem

TKOLComboBox

Occurs, whenever Items of combo box control should be painted.

type
  TDrawActions = ( odaEntire, odaFocus, odaSelect );

  TDrawAction = Set of TDrawActions;

  TDrawStates = ( odsSelected, odsGrayed, odsDisabled, odsChecked, odsFocused, odsDefault, odsHotlist, odsInactive, odsNoAccel, odsNoFocusRect, ods400reserved, ods800reserved, odsComboboxEdit );

  TDrawState = Set of TDrawStates;

  TOnDrawItem = function( Sender: PControl; DC: HDC; const Rect: TRect; ItemIdx: Integer; DrawAction: TDrawAction; ItemState: TDrawState ): Boolean of object;

property OnDrawItem: TOnDrawItem;

Description

See also: OnMeasureItem event.


TKOLComboBox.OnDropDown

TKOLComboBox

Occurs, when combo box is dropped down.

type
  TOnEvent = procedure( Sender: PObj ) of object;

property OnDropDown: TOnEvent;

Description

See also: OnCloseUp event.


TKOLComboBox.OnCloseUp

TKOLComboBox

Occurs, when combo box is closed up.

type
  TOnEvent = procedure( Sender: PObj ) of object;

property OnCloseUp: TOnEvent;

Description

See also: OnDropDown event.


TKOLComboBox.OnMeasureItem

TKOLComboBox

Occurs, whenever Items of combo box control should be measured.

type
  TOnMeasureItem = function( Sender: PControl; Idx: Integer ): Integer of object;

property OnMeasureItem: TOnMeasureItem;

Description

This event is called for owner-drawn controls, such as combo box. For fixed item height controls (combo box with coOwnerDrawFixed style) this event is called once. For combo box with coOwnerDrawVariable style this event is called for every item.

See also: OnDrawItem event.


TKOLComboBox.OnSelChange
TKOLListBox.OnSelChange

TKOLListBox

Occurs, whenever selection is changed in list box control.

type
  TOnEvent = procedure( Sender: PObj ) of object;

property OnSelChange: TOnEvent;

Description

See also: OnChange event.


KOL combo box specific TControl methods

TKOLComboBox

Add

AddDirList

Clear

Delete

Insert

See also other (common) TControl methods.


KOL TControl.Add method for combo box control

TKOLComboBox

Adds an item to the combo box.

function Add( const S: String ): Integer;

Description

Adds an item, returns index of added item.

See also: Items[ ] property,  Insert, Delete methods


KOL TControl.AddDirList method for combo box control

TKOLComboBox

Adds directory listing to the combo box.

procedure AddDirList( const Filemask: String; Attrs: DWORD );

Description

<not finished>


KOL TControl.Clear method for combo box control

TKOLComboBox

Removes all items from the combo box.

procedure Clear;

Description

See also: Items[ ] property, Add, Insert, Delete methods


KOL TControl.Delete method for combo box control

TKOLComboBox

Deletes an item from the combo box.

procedure Delete( Idx: Integer );

Description

Deletes an item by index.

See also: Items[ ] property,  Insert, Add methods


KOL TControl.Insert method for combo box control

TKOLComboBox

Inserts an item to the combo box.

function Insert( Idx: Integer; const S: String ): Integer;

Description

Inserts an item to the position, giver by Idx parameter, returns index of added item.

See also: Items[ ] property,  Add, Delete methods


	TKOLPaintBox component
Hierarchy	Properties	Events	Constructor	Methods

Mirror for KOL TControl, implementing paint box control.

Unit

mckctrls

Description

TKOLPaintBox is a mirror component to KOL paint box, which is implemented in KOL TControl object type, as well as all other visual controls in KOL.

See also: TKOLImageShow mirror component.


KOL paint box control constructor

TKOLPaintBox

Following global functions can be used to create paint box control at run-time:

function NewPaintbox( AParent: PControl ): PControl;


TKOLPaintBox properties

TKOLPaintBox	Legend

In TKOLControl

Align

Border

CenterOnParent

ClientHeight

ClientWidth

ClsStyle

Color

Ctl3D

Cursor_

DoubleBuffered

Enabled

EraseBackground

ExStyle

Font

Handle

MarginBottom

MarginLeft

MarginRight

MarginTop

Parent

parentColor

parentFont

PlaceDown

PlaceRight

PlaceUnder

popupMenu

Style

TabOrder

Tag

TextAlign

Transparent

VerticalAlign

Visible

in TComponent

Left

Top

Width

Height

Name


TKOLPaintBox events

TKOLPaintBox

In TKOLControl

OnClick

OnDestroy

OnDropFiles

OnEraseBkgnd

OnHide

OnMessage

OnMouseDblClk

OnMouseDown

OnMouseEnter

OnMouseLeave

OnMouseMove

OnMouseUp

OnMouseWheel

OnMove

OnPaint

OnResize

OnShow


	TKOLImageShow component
Hierarchy	Properties	Events	Constructor	Methods

Mirror for KOL TControl, implementing image show control.

Unit

mckctrls

Description

TKOLImageShow is a mirror component to KOL image show control, which is implemented in KOL TControl object type, as well as all other visual controls in KOL.

See also: TKOLPaintBox mirror component.


KOL image show control constructor

TKOLImageShow

Following global functions can be used to create image show control at run-time:

function NewImageShow( AParent: PControl; AImgList: PImageList; ImgIdx: Integer ): PControl;


TKOLImageShow properties

TKOLImageShow	Legend

In TKOLimageShow

CurIndex

ImageListNormal

In TKOLControl

Align

CenterOnParent

ClientHeight

ClientWidth

ClsStyle

Color

Ctl3D

Cursor_

DoubleBuffered

Enabled

EraseBackground

ExStyle

Font

Handle

Parent

parentColor

parentFont

PlaceDown

PlaceRight

PlaceUnder

popupMenu

Style

TabOrder

Tag

TextAlign

Transparent

VerticalAlign

Visible

in TComponent

Left

Top

Width

Height

Name


TKOLImageShow.CurIndex

TKOLimageShow

Index of an image in ImageListNormal, shown in a control.

property CurIndex: Integer;

Description


TKOLImageShow.ImageListNormal

TKOLimageShow

Image list, used to store image to show.

property ImageListNormal: TKOLImageList;

property ImageListNormal: PImageList;

Description


TKOLImageShow events

TKOLImageShow

In TKOLControl

OnClick

OnDestroy

OnDropFiles

OnEraseBkgnd

OnHide

OnMessage

OnMouseDblClk

OnMouseDown

OnMouseEnter

OnMouseLeave

OnMouseMove

OnMouseUp

OnMouseWheel

OnMove

OnPaint

OnResize

OnShow


	TKOLProgressBar component
Hierarchy	Properties	Events	Constructor	Methods

Mirror for KOL TControl, implementing progress bar control.

Unit

mckctrls

Description

TKOLProgressBar is a mirror component to KOL progress bar, which is implemented in KOL TControl object type, as well as all other visual controls in KOL.


KOL progress bar control constructors

TKOLProgressBar

Following global functions can be used to create progress bar control at run-time:

function NewProgressbar( AParent: PControl ): PControl;

type

  TProgressbarOption = ( pboVertical, pboSmooth );

  TProgressbarOptions = set of TProgressbarOption;

function NewProgressbarEx( AParent: PControl; Options: TProgressbarOptions ): PControl;


TKOLProgressBar properties

TKOLProgressBar	Legend

In TKOLProgressBar

MaxProgress

Progress

ProgressBkColor

ProgressColor

Smooth

Vertical

In TKOLControl

Align

CenterOnParent

ClientHeight

ClientWidth

ClsStyle

Color

Ctl3D

Cursor_

DoubleBuffered

Enabled

EraseBackground

ExStyle

Font

Handle

Parent

parentColor

parentFont

PlaceDown

PlaceRight

PlaceUnder

popupMenu

Style

TabOrder

Tag

Transparent

Visible

in TComponent

Left

Top

Width

Height

Name


TKOLProgressBar.MaxProgress

TKOLProgressBar

Maximum Progress value.

property MaxProgress: Integer;

Description

Default value is 100.


TKOLProgressBar.Progress

TKOLProgressBar

Current progress value.

property Progress: Integer;

Description

See also: MaxProgress property.


TKOLProgressBar.ProgressBkColor

TKOLProgressBar

Background color.

property ProgressBkColor: TColor;

Description

See also: ProgressColor property.


TKOLProgressBar.ProgressColor

TKOLProgressBar

Foreground color.

property ProgressColor: TColor;

Description

See also: ProgressBkColor property.


TKOLProgressBar.Smooth

TKOLProgressBar

Smooth style for progress.

property Smooth: Boolean;

Description

This is design-time only property. At run time, it is passed in Options parameter of the constructing function, when the control is created.

By default, false. This means that prgress is drawn as bricks.


TKOLProgressBar.Vertical

TKOLProgressBar

Vertical layout for progress bar.

property Vertical: Boolean;

Description

This is design-time only property. At run time, it is passed in Options parameter of the constructing function, when the control is created.

By default, false. This means that prgress is horizontal.


TKOLProgressBar events

TKOLProgressBar

In TKOLControl

OnClick

OnDestroy

OnDropFiles

OnEraseBkgnd

OnHide

OnMessage

OnMouseDblClk

OnMouseDown

OnMouseEnter

OnMouseLeave

OnMouseMove

OnMouseUp

OnMouseWheel

OnMove

OnPaint

OnResize

OnShow


	TKOLListView component
Hierarchy	Properties	Events	Constructor	Methods

Mirror for KOL TControl, implementing list view control.

Unit

mckctrls

Description

TKOLListView is a mirror component to KOL list view, which is implemented in KOL TControl object type, as well as all other visual controls in KOL.

See also: TKOLListBox, TKOLTreeView mirror components.


KOL list view control constructor

TKOLListView

Following global function can be used to create list view control at run-time:

type
  TListViewStyle = ( lvsIcon, lvsSmallIcon, lvsList, lvsDetail, lvsDetailNoHeader );

  TListViewOption = (

lvoIconLeft,	{ in lvsIcon, lvsSmallIcon place icon left from text (rather then top) }

lvoAutoArrange,	{ keep icons auto arranged in lvsIcon and lvsSmallIcon view }

lvoButton,	{ icons look like buttons in lvsIcon view }

lvoEditLabel,	{ allows edit labels inplace (first column #0 text) }

lvoNoLabelWrap,	{ item text on a single line in lvsIcon view (by default, item text may wrap in lvsIcon view) }

lvoNoScroll,	{ obvious }

lvoNoSortHeader,	{ click on header button does not lead to sort items }

lvoHideSel,	{ hide selection when not in focus }

lvoMultiselect,	{ allow to select multiple items }

lvoSortAscending,

lvoSortDescending,

{ extended styles (not documented in Win32.hlp :( , got from VCL source: }

lvoGridLines,

lvoSubItemImages,

lvoCheckBoxes,	{ items with checkboxes, see LVItemStateImgIdx property }

lvoTrackSelect,

lvoHeaderDragDrop,

lvoRowSelect,

lvoOneClickActivate,

lvoTwoClickActivate,

lvoFlatsb,

lvoRegional,

lvoInfoTip,

lvoUnderlineHot,

lvoMultiWorkares,

lvoOwnerData,	{ virtual list view style }

lvoOwnerDrawFixed	{ custom draw style }

  );

  TListViewOptions = Set of TListViewOption;

function NewListView( AParent: PControl; Style: TListViewStyle; Options: TListViewOptions; ImageListSmall, ImageListNormal, ImageListState: PImageList ): PControl;


TKOLListView properties

TKOLListView	Legend

In TKOLListView

Count

ImageListNormal

ImageListSmall

ImageListState

LVBkColor

 	LVColCount

LVColWidth

LVCount

LVCurItem

LVItemData

LVItemImgIdx

LVItemOverlayImgIdx

LVItemPos

LVItems

LVItemState

LVItemStateImgIdx

LVOptions

 	LVPerPage

LVStyle

LVTextColor

LVTextBkColor

 	LVTopItem

Options

Style

In TKOLControl

Align

CenterOnParent

ClientHeight

ClientWidth

ClsStyle

Color

Ctl3D

Cursor_

DoubleBuffered

Enabled

EraseBackground

ExStyle

Font

Handle

Parent

parentColor

parentFont

PlaceDown

PlaceRight

PlaceUnder

popupMenu

Style

TabOrder

TabStop

Tag

Transparent

Visible

in TComponent

Left

Top

Width

Height

Name


TKOLListView.Count

TKOLListView

Count of items in list view control.

property Count: Integer;

Description

The same as LVCount. It is possible to set this value for virtual list view.


TKOLListView.ImageListNormal

TKOLListView

Image list, used when list view is in lvsIcons view style.

property ImageListNormal: TKOLImageList;

property ImageListNormal: PImageList;

Description

See also: ImageListSmall, ImageListState properties.


TKOLListView.ImageListSmall

TKOLListView

Image list, used when list view is in lvsSmallIcons, lvsDetail, lvsDetailNoHeader view style.

property ImageListSmall: TKOLImageList;

property ImageListSmall: PImageList;

Description

See also: ImageListNormal, ImageListState properties.


TKOLListView.ImageListState

TKOLListView

State images list.

property ImageListState: TKOLImageList;

property ImageListState: PImageList;

Description

See also: ImageListNormal, ImageListSmall, LVItemStateImgIdx[ ] properties.


TKOLListView.LVBkColor

TKOLListView

Background color.

property LVBkColor: TColor;

Description

If set to clNone at design time, default color used.

See also: LVTextBkColor, LVTextColor properties.


TKOLListView.LVColCount

TKOLListView

Columns count.

property LVColCount: Integer;

Description

Read only.

See also: LVColAdd, LVColInsert, LVColDelete methods.


TKOLListView.LVColWidth[ ]

TKOLListView

Column widths.

property LVColWidth[ Idx: Integer ]: Integer;

Description

Widths of columns. When set to special value LVSCW_AUTOSIZE or LVSCW_AUTOSIZE_USEHEADER, column is auto-sized. But this has effect once, when called only.

To set coumn width in lvsList view mode, column index must be –1 (and width to set must be in range 0..32767 always).

See also: LVColCount property.


TKOLListView.LVCount

TKOLListView

Items count.

property LVCount: Integer;

Description

The same as Count property. It is possible to change this value only for virtual list view at run time.


TKOLListView.LVCurItem

TKOLListView

Index of the current (focused) item.

property LVCurItem: Integer;

Description

An index of the focused item. For single-select list view, usually the same as selected item, though it is recommended to use LVNextSelected method to get know which item is selected.

–1, if there are no current item in the list view.


TKOLListView.LVItemData[ ]

TKOLListView

Allows to read and modify custom data 32 bit value, associated with an item of list view.

property LVItemData[ Idx: Integer ]: DWORD;

Description

See also: Count, LVItems[ ] properties.


TKOLListView.LVItemImgIdx[ ]

TKOLListView

Image index for list view item or subitem.

property LVItemImgIdx[ Idx, Col: Integer ]: Integer;

Description

Col = 0 means item image itself. This property allows also to set image index for all subitems (Col > 0).

See also: Count, LVItems[ ] properties.


TKOLListView.LVItemOverlayImgIdx[ ]

TKOLListView

Overlay image index for list view item.

property LVItemOverlayImgIdx[ Idx: Integer ]: Integer;

Description

The same image list used as for property LVItemImgIdx. Only 15 images from the image list can be used as overlay images. See Overlay[ ] property for KOL TImageList object, which allows to define which images to use as overlay or state images.

See also: LVItemImgIdx, LVItemStateImgIdx[ ] properties.


TKOLListView.LVItemPos[ ]

TKOLListView

Position of item for lvsIcons or lvsSmallIcons view styles.

property LVItemPos[ Idx: Integer ]: TPoint;

Description

See also: LVItemAtPos method.


TKOLListView.LVItems[]
TKOLListView.LVItems

TKOLListView

Allows to read and modify item or subitem text of the list view.

property LVItems[ Idx, Col: Integer ]: String;

Description

See also: Count, LVItemData[ ] properties.


TKOLListView.LVItemState[ ]

TKOLListView

Item states.

type

  TListViewItemStates = ( lvisFocus, lvisSelect, lvisBlend, lvisHighlight );

  TListViewItemState = Set of TListViewItemStates;

property LVItemState[ Idx: Integer ]: TListViewItemState;

Description

To change item states for all the items of the list view, use Idx = -1.

See also: Count, LVItems[ ] properties.


TKOLListView.LVItemStateImgIdx[ ]

TKOLListView

Item state image index.

property LVItemStateImgIdx[ Idx: Integer ]: Integer;

Description

ImageListState is used. No more than 15 images could be used as state images. See property Overlay of the image list object, which allows to determine which images to use as state images.

To change item state image index for all the items of the list view, use Idx = -1.

See also: Count, LVItems[ ] properties.

Note: lvoCheckBoxes option in Options just means, that list view control itself creates special inner image list for two state images. Later it is possible to examine checked state for items or set checked state programmatically by changing LVItemStateImgIdx[ ] property. Value 1 corresponds to unchecked state, 2 to checked and value 0 allows to remove

checkbox at all. So, to check all added items by default (e.g.), do following:

ListView1.LVItemStateImgIdx[ -1 ] := 2;


TKOLListView.Options, KOL TControl.LVOptions

TKOLListView

Options of the list view control.

type
TListViewOption = (

lvoIconLeft,	{ in lvsIcon, lvsSmallIcon place icon left from text (rather then top) }

lvoAutoArrange,	{ keep icons auto arranged in lvsIcon and lvsSmallIcon view }

lvoButton,	{ icons look like buttons in lvsIcon view }

lvoEditLabel,	{ allows edit labels inplace (first column #0 text) }

lvoNoLabelWrap,	{ item text on a single line in lvsIcon view (by default, item text may wrap in lvsIcon view) }

lvoNoScroll,	{ obvious }

lvoNoSortHeader,	{ click on header button does not lead to sort items }

lvoHideSel,	{ hide selection when not in focus }

lvoMultiselect,	{ allow to select multiple items }

lvoSortAscending,

lvoSortDescending,

{ extended styles (not documented in Win32.hlp :( , got from VCL source: }

lvoGridLines,

lvoSubItemImages,

lvoCheckBoxes,	{ items with checkboxes, see LVItemStateImgIdx property }

lvoTrackSelect,

lvoHeaderDragDrop,

lvoRowSelect,

lvoOneClickActivate,

lvoTwoClickActivate,

lvoFlatsb,

lvoRegional,

lvoInfoTip,

lvoUnderlineHot,

lvoMultiWorkares,

lvoOwnerData,	{ virtual list view style }

lvoOwnerDrawFixed	{ custom draw style }

  );

  TListViewOptions = Set of TListViewOption;

property Options: TListViewOptions;

property LVOptions: TListViewOptions;

Description

This is design-time only property. At run time, use property LVOptions to read / modify list view options.

See also: LVStyle (at design-time: Style) property.


TKOLListView.LVPerPage

TKOLListView

Count of visible items in list view.

property LVPerPage: Integer;

Description

This property allows to determine how much items are fit to a page.

See also: LVTopItem property.


TKOLListView.LVTextColor

TKOLListView

Text color.

property LVTextColor: TColor;

Description

To adjust this property at design time, use Font.Color property.

See also: LVTextBkColor, LVBkColor properties.


TKOLListView.LVTextBkColor

TKOLListView

Text color.

property LVTextColor: TColor;

Description

If set to clNone at design time, default color used. This property when set determines background color for items text only, not for entire background of the list view.

See also: LVTextColor, LVBkColor properties.


TKOLListView.LVTopItem

TKOLListView

Index of the item, visible first in list view control.

property LVPTopItem: Integer;

Description

See also: LVPerPage property.


TKOLListView.Style
TKOLListView.Style, KOL TControl.LVStyle

TKOLListView

List view style.

TListViewStyle = ( lvsIcon, lvsSmallIcon, lvsList, lvsDetail, lvsDetailNoHeader );

property Style: TListViewStyle;

property LVStyle: TListViewStyle;

Description

This property at design time available as Style property in Object Inspector, but at run time it is named LVStyle. It determines view style of the list view control. Take in attention, that in lvsDetail and lvsDetailNoHeader styles, at least one column must be defined to provide showing of items.

See also: LVOptions property.


TKOLListView.SelStart
TKOLListBox.SelStart

TKOLListBox

Index of first selected item in list box.

property SelStart: Integer;

Description


TKOLListView events

TKOLListView

In TKOLListView

OnChange

OnColumnClick

OnCompareLVItems

OnDeleteAllLVItems

OnDeleteLVItem

OnDrawItem

OnEndEditLVItem

OnLVData

OnLVStateChange

OnMeasureItem

In TKOLControl

OnChar

OnClick

OnDestroy

OnDropFiles

OnEnter

OnEraseBkgnd

OnHide

OnKeyDown

OnKeyUp

OnLeave

OnMessage

OnMouseDblClk

OnMouseDown

OnMouseEnter

OnMouseLeave

OnMouseMove

OnMouseUp

OnMouseWheel

OnMove

OnPaint

OnResize

OnShow


TKOLListView.OnChange

TKOLListView

Occurs, whenever items of list view control are changed.

type
  TOnEvent = procedure( Sender: PObj ) of object;

property OnChange: TOnEvent;

Description

See also: OnLVStateChange event.


TKOLListView.OnColumnClick

TKOLListView

Occurs, when column header tab of the list view control is clicked.

type
  TOnLVColumnClick = procedure( Sender: PControl; Idx: Integer ) of object;

property OnColumnClick: TOnLVColumnClick;

Description

See also: OnClick event.


TKOLListView.OnCompareLVItems

TKOLListView

Occurs, when list view items should be comared during sorting.

type
  TOnCompareLVItems = function( Sender: PControl; Idx1, Idx2: Integer ): Integer of object;

property OnCompareLVItems: TOnCompareLVItems;

Description

See also: LVSort method.


TKOLListView.OnDeleteAllLVItems

TKOLListView

Occurs, when all the items of the list view are to be deleted.

type
  TOnEvent = procedure( Sender: PObj ) of object;

property OnDeleteAllLVItems: TOnEvent;

Description

Called when all the items of the list view control are to be deleted. If after returning from this event handler event OnDeleteLVItem is yet assigned, an event OnDeleteLVItem will be called for every deleted item


TKOLListView.OnDeleteLVItem

TKOLListView

Occurs, when an item of the list view is to be deleted.

type
  TOnDeleteLVItem = procedure( Sender: PControl; Idx: Integer ) of object;

property OnDeleteLVItem: TOnDeleteLVItem;

Description

Use this event to free resources, associated with list view item.

See also: LVDelete method.


TKOLListView.OnDrawItem

TKOLListView

Occurs, whenever list view item should be painted.

type
  TDrawActions = ( odaEntire, odaFocus, odaSelect );

  TDrawAction = Set of TDrawActions;

  TDrawStates = ( odsSelected, odsGrayed, odsDisabled, odsChecked, odsFocused, odsDefault, odsHotlist, odsInactive, odsNoAccel, odsNoFocusRect, ods400reserved, ods800reserved, odsComboboxEdit );

  TDrawState = Set of TDrawStates;

  TOnDrawItem = function( Sender: PControl; DC: HDC; const Rect: TRect; ItemIdx: Integer; DrawAction: TDrawAction; ItemState: TDrawState ): Boolean of object;

property OnDrawItem: TOnDrawItem;

Description

For a list view, custom drawing is possible only in lvsDetail and lvsDetailNoHeader styles, and OnDrawItem is called to draw entire row at once.

See also: OnMeasureItem event.


TKOLListView.OnEndEditLVItem

TKOLListView

Occurs, when a label of the list view item is edited.

type
  TOnEditLVItem = function( Sender: PControl; Idx, Col: Integer; NewText: PChar ): Boolean of object;

property OnEndEditLVItem: TOnEditLVItem;

Description

See also: LVEditItemLabel method.


TKOLListView.OnLVData

TKOLListView

Occurs, when information about list view item or subitem is retrieved for virtual list view.

type
  TOnLVData = procedure( Sender: PControl; Idx, SubItem: Integer; var Txt: String; var ImgIdx: Integer; var State: DWORD; var Store: Boolean ) of object;

property OnLVData: TOnLVData;

Description

Information for every item and for every subitem (in lvsDetail or lvsDetailNoHeader view style) is retrieved in a separate call, when it (item or subitem) is to be painted on screen.

If Store parameter was set by the event handler to TRUE, information about certain item/subitem never retrieved again, it is stored by the list view control itself.


Virtual list view

By setting option lvoOwnerData and assigning event handler OnLVData, it is possible to create virtual list view, i.e. list view, items data for which are stored not by the list view control, but in the application. For virtual list view, an application sets property LVCount to desired value, and then gives all information about list view items and subitems in OnLVData event handler.

Such virtual list view can maintain millions of items so fast, as it could be provided by the application itself. So, always think about using virtual list view rather then usual one, when amount of data to maintain is greater then several thousands of items.


TKOLListView.OnMeasureItem

TKOLListView

Occurs, whenever list view item height should be measured.

type
  TOnMeasureItem = function( Sender: PControl; Idx: Integer ): Integer of object;

property OnMeasureItem: TOnMeasureItem;

Description

See also: OnDrawItem event.


TKOLListView.OnLVStateChange

TKOLListView

Occurs, when a state of an image list item or a state of a range of list view items is changed.

type
  TOnLVStateChange = procedure( Sender: PControl; IdxFrom, IdxTo: Integer; OldState, NewState: DWORD ) of object;

property OnLVStateChange: TOnLVStateChange;

Description

See also: OnChange event.


KOL list view specific TControl methods

TKOLListView

Clear

LVAdd

LVColAdd

LVColDelete

LVColInsert

LVDelete

LVEditItemLabel

LVItemAdd

LVItemAtPos

LVItemInsert

LVItemRect

LVInsert

LVNextItem

LVNextSelected

LVSelectAll

LVSetItem

LVSort

LVSortColumn

LVSortData

See also other (common) TControl methods.


KOL TControl.Clear method for list view control

TKOLListView

Deletes all the items of the list view control.

function Add( const S: String ): Integer;

Description

Adds an item, returns index of added item.

See also: LVItems[ ] property, LVDelete methods


KOL TControl.LVAdd method for list view control

TKOLListView

Adds an item to the list view.

type

  TListViewItemStates = ( lvisFocus, lvisSelect, lvisBlend, lvisHighlight );

  TListViewItemState = Set of TListViewItemStates;

function LVAdd( const aText: String; ImgIdx: Integer; State: TListViewItemState; StateImgIdx, OverlayImgIdx: Integer; Data: DWORD ): Integer;

Description

<not finished>

See also: LVItemAdd method.


KOL TControl.LVColAdd method for list view control

TKOLListView

Adds a column to the list view.

type

  TTextAlign = ( taLeft, taRight, taCenter );

procedure LVColAdd( const aText: String; aalign: TTextAlign; aWidth: Integer );

Description

<not finished>

See also: LVColInsert, LVColDelete methods.


KOL TControl.LVColInsert method for list view control

TKOLListView

Inserts a column to the list view to a given position.

type

  TTextAlign = ( taLeft, taRight, taCenter );

procedure LVColInsert( ColIdx: Integer; const aText: String; aAlign: TTextAlign; aWidth: Integer );

Description

<not finished>

See also: LVColAdd, LVColDelete methods.


KOL TControl.LVColDelete method for list view control

TKOLListView

Deletes a column from the list view.

procedure LVColDelete( ColIdx: Integer );

Description

<not finished>

See also: LVColInsert, LVColAdd methods.


KOL TControl.LVDelete method for list view control

TKOLListView

Deletes an item from the list view.

procedure LVDelete( Idx: Integer );

Description

<not finished>

See also: OnDeleteLVItem event.


KOL TControl.LVEditItemLabel method for list view control

TKOLListView

Initiates item label editing.

procedure LVEditItemLabel( ColIdx: Integer );

Description

<not finished>

See also: OnEndEditLVItem event.


KOL TControl.LVItemAdd method for list view control

TKOLListView

Adds an item to the list view.

function LVItemAdd( const aText: String ): Integer;

Description

<not finished>

See also: LVAdd, LVItemInsert methods, LVItems[ ] property.


KOL TControl.LVItemAtPos method for list view control

TKOLListView

Return index of item at the given position.

function LVItemAtPos( X, Y: Integer ): Integer;

Description

<not finished>

See also: LVItemPos[ ] property, LVItemRect method.


KOL TControl.LVItemInsert method for list view control

TKOLListView

Inserts an item to the list view.

function LVItemInsert( Idx: Integer; const aText: String ): Integer;

Description

<not finished>

See also: LVInsert, LVItemAdd methods, LVItems[ ] property.


KOL TControl.LVItemRect method for list view control

TKOLListView

Returns rectangle occupied by list view item (or its part) in window.

type

  TGetLVItemPart = ( lvipBounds, lvipIcon, lvipLabel, lvupIconAndLabel );

function LVItemRect( Idx: Integer; Part: TGetLVItemPart ): TRect;

Description

<not finished>

See also: LVItemPos[ ] property, LVItemAtPos method.


KOL TControl.LVInsert method for list view control

TKOLListView

Inserts an item to the list view.

type

  TListViewItemStates = ( lvisFocus, lvisSelect, lvisBlend, lvisHighlight );

  TListViewItemState = Set of TListViewItemStates;

function LVInsert( Idx: Integer; const aText: String; ImgIdx: Integer; State: TListViewItemState; StateImgIdx, OverlayImgIdx: Integer; Data: DWORD ): Integer;

Description

<not finished>

See also: LVItemInsert method.


KOL TControl.LVNextItem method for list view control

TKOLListView

Returns for list view next item with given state.

function LVNextItem( IdxPrev: Integer; Attrs: DWORD ): Integer;

Description

Attrs property can ba a combination of following flags:

LVIS_CUT

LVIS_DROPHILITED

LVIS_FOCUSED

LVIS_SELECTED

To obtain the first item with given states, pass IdxPrev = -1.

See also: LVNextSelected method.


KOL TControl.LVNextSelected method for list view control

TKOLListView

Returns for list view next selected item.

function LVNextSelected( IdxPrev: Integer ): Integer;

Description

To obtain the first selected item, pass IdxPrev = -1.

See also: LVNextItem method.


KOL TControl.LVSelectAll method for list view control

TKOLListView

Selects all the items of the list view.

procedure LVSelectAll;

Description


KOL TControl.LVSetItem method for list view control

TKOLListView

Changes attributes of the list view item or subitem.

type

  TListViewItemStates = ( lvisFocus, lvisSelect, lvisBlend, lvisHighlight );

  TListViewItemState = Set of TListViewItemStates;

procedure LVSetItem( Idx, Col: Integer; const aText: String; ImgIdx: Integer; State: TListViewItemState; StateImgIdx, OverlayImgIdx: Integer; Data: DWORD );

Description

<not finished>


KOL TControl.LVSort method for list view control

TKOLListView

Sorts items in list view.

procedure LVSort;

Description

Initiates sorting of list view items. This sorting procedure is available only for Win2K, WinNT4 with IE5, Win98 or Win95 with IE5.

See also: LVSortData method.


KOL TControl.LVSortColumn method for list view control

TKOLListView

Simplifies sorting by column click.

procedure LVSortColumn( Idx: Integer );

Description

This is a method to simplify sort by column. Just call it in your OnColumnClick event passing column index and enjoy with your list view sorted automatically when column header is clicked.

See also: LVSortData method.


KOL TControl.LVSortData method for list view control

TKOLListView

Sorts items in list view – by data.

procedure LVSortData;

Description

Initiates sorting of list view items. This sorting procedure is always available in Windows95/98, NT/2000. But OnCompareLVItems procedure receives not indexes of items compared but its LVItemData  fields associated instead.

See also: LVSort method.


	TKOLTreeView component
Hierarchy	Properties	Events	Constructor	Methods

Mirror for KOL TControl, implementing tree view control.

Unit

mckctrls

Description

TKOLTreeView is a mirror component to KOL tree view control, which is implemented in KOL TControl object type, as well as all other visual controls in KOL.

See also: TKOLListView mirror component.


KOL tree view control constructor

TKOLTreeView

Following global function can be used to create tree view control at run-time:

type

  TTreeViewOption = ( tvoNoLines, tvoLinesRoot, tvoNoButtons, tvoEditLabels, tvoHideSel, tvoDragDrop, tvoNoTooltips, tvoCheckBoxes, tvoTrackSelect, tvoSingleExpand, tvoInfoTip, tvoFullRowSelect, tvoNoScroll, tvoNonEvenHeight );

  TTreeViewOptions = set of TTreeViewOption;

function NewTreeView( AParent: PControl; Options: TTreeViewOptions; ImgListNormal, ImgListState: PImageList ): PControl;


TKOLTreeView properties

TKOLTreeView	Legend

In TKOLTreeView

ImageListNormal

ImageListState

Options

TVDropHilighted

 	TVEditing

TVFirstVisible

TVIndent

TVItemBold

 	TVItemChild

TVItemCut

TVItemData

TVItemDropHighlighted

TVItemExpanded

TVItemExpandedOnce

TVItemImage

TVItemOverlay

 	TVItemNext

 	TVItemNextVisible

 	TVItemParent

 	TVItemPrevious

 	TVItemPreviousVisible

 	TVItemRect

TVItemSelected

TVItemSelImg

TVItemStateImg

TVItemText

TVItemVisible

TVRightClickSelect

 	TVRoot

TVSelected

TVVisibleCount

In TKOLControl

Align

CenterOnParent

ClientHeight

ClientWidth

ClsStyle

Color

Ctl3D

Cursor_

DoubleBuffered

Enabled

EraseBackground

ExStyle

Font

Handle

Parent

parentColor

parentFont

PlaceDown

PlaceRight

PlaceUnder

popupMenu

Style

TabOrder

TabStop

Tag

Transparent

Visible

in TComponent

Left

Top

Width

Height

Name


TKOLTreeView.ImageListNormal

TKOLTreeView

Image list, used with tree view.

property ImageListNormal: TKOLImageList;

property ImageListNormal: PImageList;

Description

See also: ImageListState property.


TKOLTreeView.ImageListState

TKOLTreeView

State images list.

property ImageListState: TKOLImageList;

property ImageListState: PImageList;

Description

See also: ImageListNormal, TVItemStateImg [ ] properties.


TKOLTreeView.Options

TKOLTreeView

Options of the tree view control.

type
  TTreeViewOption = ( tvoNoLines, tvoLinesRoot, tvoNoButtons, tvoEditLabels, tvoHideSel, tvoDragDrop, tvoNoTooltips, tvoCheckBoxes, tvoTrackSelect, tvoSingleExpand, tvoInfoTip, tvoFullRowSelect, tvoNoScroll, tvoNonEvenHeight );

  TTreeViewOptions = set of TTreeViewOption;

property Options: TTreeViewOptions;

Description

This is design-time only property.


TKOLTreeView.TVDropHilighted
TKOLTreeView.TVDropHilighted[ ]

TKOLTreeView

Item, which is currently highlighted as a drop target.

property TVDropHilighted: THandle;

Description

See also: TVItemDropHilighted[ ], TVSelected properties.


TKOLTreeView.TVEditing

TKOLTreeView

TRUE, if item label is currently editing.

property TVEditing: Boolean;

Description

See also: TVEditItem method, OnTVBeginEdit, OnTVEndEdit events.


TKOLTreeView.TVFirstVisible

TKOLTreeView

First visible item in tree view.

property TVFirstVisible: THandle;

Description

When set, ensures that the item become visible (but not first visible therefore).

See also: TVVisibleCount property.


TKOLTreeView.TVIndent

TKOLTreeView

Level indent in pixels.

property TVIndent: Integer;

Description


TKOLTreeView.TVItemBold[ ]

TKOLTreeView

TRUE, when item text is shown with bold font.

property TVItemBold[ Item: THandle ]: Boolean;

Description


TKOLTreeView.TVItemChild[ ]

TKOLTreeView

Returns first child item for given tree view item.

property TVItemChild[ Item: THandle ]: THandle;

Description

If the item has no children, 0 is returned.


TKOLTreeView.TVItemCut[ ]

TKOLTreeView

"Cut" visual state for an item.

property TVItemCut[ Item: THandle ]: Boolean;

Description


TKOLTreeView.TVItemData[ ]

TKOLTreeView

Custom-defined 32-bit value, associated with tree view item.

property TVItemData[ Item: THandle ]: Pointer;

Description

See also: OnTVDelete event.


TKOLTreeView.TVItemDropHighlighted[ ]

TKOLTreeView

"Drop-highlighted" visual state for an item.

property TVItemDropHighlighted[ Item: THandle ]: Boolean;

Description


TKOLTreeView.TVItemExpanded[ ]

TKOLTreeView

"Expanded" state for an item.

property TVItemExpanded[ Item: THandle ]: Boolean;

Description

See also: OnTVExpanding, OnTVExpanded events, TVExpand method.


TKOLTreeView.TVItemExpandedOnce[ ]

TKOLTreeView

"Expanded once" state for an item.

property TVItemExpandedOnce[ Item: THandle ]: Boolean;

Description

See also: OnTVExpanding, OnTVExpanded events, TVExpand method.


TKOLTreeView.TVItemImage[ ]

TKOLTreeView

Index of image from image list for an item.

property TVItemImage[ Item: THandle ]: Integer;

Description

-1, if an image is not defined for the item.

See also: TVItemSelImg, TVItemOverlay properties.


TKOLTreeView.TVItemOverlay[ ]

TKOLTreeView

Overlay image index from image list for an item.

property TVItemOverlay[ Item: THandle ]: Integer;

Description

0, if the item has no overlay image defined for it.

Only 15 images from the image list can be used as overlay images. See Overlay property for TKOLImageList mirror component.

See also: TVItemImage, TVItemSelImg properties.


TKOLTreeView.TVItemNext[ ]

TKOLTreeView

Returns next sibling item.

property TVItemNext[ Item: THandle ]: THandle;

Description

Returns 0, if the item is the last child of its parent.

See also: TVItemPrevious, TVItemNextVisible properties.


TKOLTreeView.TVItemNextVisible[ ]

TKOLTreeView

Returns next available item (next "visible", if all expanded items are visible).

property TVItemNextVisible[ Item: THandle ]: THandle;

Description

Returns 0, if the item is the last available item in tree view (occupies the last achievable row in the control, not the last actually visible).

See also: TVItemNext, TVItemPreviousVisible properties.


TKOLTreeView.TVItemParent[ ]

TKOLTreeView

Returns parent item for given one.

property TVItemParent[ Item: THandle ]: THandle;

Description

Returns 0, if the item has no parent (thus is, item is root).

See also: TVItemNext, TVItemPrevious, TVItemChild properties.


TKOLTreeView.TVItemPrevious[ ]

TKOLTreeView

Returns previous sibling item.

property TVItemPrevious[ Item: THandle ]: THandle;

Description

Returns 0, if the item is the first child item of its parent.

See also: TVItemNext, TVItemPreviousVisible properties.


TKOLTreeView.TVItemPreviousVisible[ ]

TKOLTreeView

Returns previous "visible" item, if all the expanded items would be visible.

property TVItemPreviousVisible[ Item: THandle ]: THandle;

Description

Returns 0, if the item is the first available item in tree view.

See also: TVItemPrevious, TVItemNextVisible properties.


TKOLTreeView.TVItemRect[ ]

TKOLTreeView

Returns rectangle, occupied by tree view item.

property TVItemRect[ Item: THandle; TextOnly: Boolean ]: TRect;

Description


TKOLTreeView.TVItemSelected

TKOLTreeView

Selected item in tree view.

property TVItemSelected: THandle;

Description


TKOLTreeView.TVItemSelImg[ ]

TKOLTreeView

Image index for an item, when it is selected.

property TVItemSelImg[ Item: THandle ]: Integer;

Description

-1, if selected image is not defined for the item.

See also: TVItemImage, TVItemOverlay properties.


TKOLTreeView.TVItemStateImg[ ]

TKOLTreeView

State image index for tree view item.

property TVItemStateImg[ Item: THandle ]: Integer;

Description

-1, if state image is not defined for the item.

State images can be stored in separate image list, defined by ImageListState property.

See also: TVItemImage, TVItemSelImg, TVItemOverlay properties.


TKOLTreeView.TVItemText[ ]

TKOLTreeView

Tree view item text.

property TVItemText[ Item: THandle ]: String;

Description


TKOLTreeView.TVItemVisible[ ]

TKOLTreeView

Tree view item visibility.

property TVItemVisible[ Item: THandle ]: Boolean;

Description

Item is visible, if all its parent items are expanded. Setting this property to TRUE, it is possible to ensure that all parent items are expanded, and the item is moved to a visible area of the tree view control. Setting this property to FALSE has no effect.


TKOLTreeView.TVRightClickSelect

TKOLTreeView

Provides selecting of tree view item, when it is clicked by right mouse button.

property TVRightClickSelect: Boolean;

Description


TKOLTreeView.TVRoot

TKOLTreeView

Root item of tree view.

property TVRoot: THandle;

Description


TKOLTreeView.TVSelected

TKOLTreeView

Selected item of tree view control.

property TVSelected: THandle;

Description


TKOLTreeView.TVVisibleCount

TKOLTreeView

Count of items visible in tree view window (vertically).

property TVVisibleCount: Integer;

Description

See also: TVFirstVisible property.


TKOLTreeView events

TKOLTreeView

In TKOLTreeView

OnChange

OnSelChange

OnTVBeginDrag

OnTVBeginEdit

OnTVDelete

OnTVEndEdit

OnTVExpanded

OnTVExpanding

OnTVSelChanging

In TKOLControl

OnChar

OnClick

OnDestroy

OnDropFiles

OnEnter

OnEraseBkgnd

OnHide

OnKeyDown

OnKeyUp

OnLeave

OnMessage

OnMouseDblClk

OnMouseDown

OnMouseEnter

OnMouseLeave

OnMouseMove

OnMouseUp

OnMouseWheel

OnMove

OnPaint

OnResize

OnShow


TKOLTreeView.OnChange

TKOLTreeView

Occurs, whenever tree view control items are changed.

type
  TOnEvent = procedure( Sender: PObj ) of object;

property OnChange: TOnEvent;

Description

See also: OnSelChange event.


TKOLTreeView.OnSelChange

TKOLTreeView

Occurs, when selection was changed in tree view control.

type
  TOnEvent = procedure( Sender: PObj ) of object;

property OnSelChange: TOnEvent;

Description

See also: OnChange, OnTVSelChanging events.


TKOLTreeView.OnTVBeginDrag

TKOLTreeView

Occurs, when tree view item dragging is detected.

type
  TOnTVBeginDrag = procedure( Sender: PControl; Item: THandle ) of object;

property OnTVBeginDrag: TOnTVBeginDrag;

Description


TKOLTreeView.OnTVBeginEdit

TKOLTreeView

Occurs, when tree view item label is to be editing.

type
  TOnTVBeginEdit = function( Sender: PControl; Item: THandle ): Boolean of object;

property OnTVBeginEdit: TOnTVBeginEdit;

Description

An event handler can return FALSE to prevent editing item label.

See also: OnTVEndEdit event.


TKOLListView.OnTVDelete
TKOLTreeView.OnTVDelete

TKOLTreeView

Occurs, when a node of the tree view is to be deleted.

type
  TOnTVDelete = procedure( Sender: PControl; Item: THandle ) of object;

property OnTVDelete: TOnTVDelete;

Description

Use this event to free resources, associated with tree view item.

See also: TVDelete method.


TKOLTreeView.OnTVEndEdit

TKOLTreeView

Occurs, when tree view item label finished editing.

type
  TOnTVEndEdit = function( Sender: PControl; Item: THandle; const NewTxt: String ): Boolean of object;

property OnTVEndEdit: TOnTVEndEdit;

Description

An event handler can return FALSE to cancel assigning new value to item label.

See also: OnTVBeginEdit event.


TKOLTreeView.OnTVExpanded

TKOLTreeView

Occurs, when tree view item is expanded or collapsed.

type
  TOnTVExpanded = procedure( Sender: PControl; Item: THandle; Expand: Boolean ) of object;

property OnTVExpanded: TOnTVExpanded;

Description

Parameter Expand = TRUE means that item is expanded, FALSE means that item is collapsed.

See also: OnTVExpanding event.


TKOLTreeView.OnTVExpanding

TKOLTreeView

Occurs, when tree view item is to be expanded or collapsed.

type
  TOnTVExpanding = function( Sender: PControl; Item: THandle; Expand: Boolean ): Boolean of object;

property OnTVExpanding: TOnTVExpanding;

Description

Parameter Expand = TRUE means that item is expanded, FALSE means that item is collapsed. The event handler can return FALSE to prevent operation. Otherwise, it should return TRUE.

See also: OnTVExpanded event.


TKOLTreeView.OnTVSelChanging

TKOLTreeView

Occurs, when selection in tree view control is to be changed.

type
  TOnTVSelChanging = function(Sender: PControl; oldItem, newItem: THandle): Boolean of object;

property OnTVSelChanging: TOnTVSelChanging;

Description

The event handler can return FALSE to prevent operation. Otherwise, it should return TRUE.

See also: OnSelChange event.


KOL tree view specific TControl methods

TKOLTreeView

Clear

TVDelete

TVInsert

TVItemAtPos

TVEditItem

TVExpand

TVStopEdit

See also other (common) TControl methods.


KOL TControl.Clear method for tree view control

TKOLTreeView

Deletes all the items of the tree view control.

procedure Clear;

Description

See also: OnTVDelete event.


KOL TControl.TVDelete method for tree view control

TKOLTreeView

Deletes item from the tree view control.

procedure TVDelete( Item: THandle );

Description

See also: OnTVDelete event, Clear method.


KOL TControl.TVInsert method for tree view control

TKOLTreeView

Adds new item to the tree view control.

function TVInsert( nParent, nAfter: THandle; const Txt: String ): THandle;

Description

See also: TVDelete method.


KOL TControl.TVItemAtPos method for tree view control

TKOLTreeView

Searches tree view item at the specified position (relative to clien coordinates of the tree view).

function TVItemAtPos( x, y: Integer; var Where: DWORD ): THandle;

Description

Returns handle of item found at specified position (relative to upper left corner of client area of the tree view). If no item found, 0 is returned. Variable Where receives additional flags combination, describing more detailed, on which part of item or tree view given point is located, such as:

TVHT_ABOVE	Above the client area

TVHT_BELOW	Below the client area

TVHT_NOWHERE	In the client area, but below the last item

TVHT_ONITEM	On the bitmap or label associated with an item

TVHT_ONITEMBUTTON	On the button associated with an item

TVHT_ONITEMICON	On the bitmap associated with an item

TVHT_ONITEMINDENT	In the indentation associated with an item

TVHT_ONITEMLABEL	On the label (string) associated with an item

TVHT_ONITEMRIGHT	In the area to the right of an item

TVHT_ONITEMSTATEICON	On the state icon for a tree-view item that is in a user-defined state

TVHT_TOLEFT	To the right of the client area

TVHT_TORIGHT	To the left of the client area


KOL TControl.TVEditItem method for tree view control

TKOLTreeView

Starts editing item label.

procedure TVEditItem( Item: THandle );

Description

See also: OnTVBeginEdit, OnTVEndEdit events.


KOL TControl.TVExpand method for tree view control

TKOLTreeView

Expands or collapses tree view item.

procedure TVExpand( Item: THandle; Flags: DWORD );

Description

Flags available:

TVE_COLLAPSE	Collapses the list.

TVE_COLLAPSERESET	Collapses the list and removes the child items. Note that TVE_COLLAPSE must also be specified.

TVE_EXPAND	Expands the list.

TVE_TOGGLE	Collapses the list if it is currently expanded or expands it if it is currently collapsed.

See also: OnTVExpanded, OnTVExpanding events.


KOL TControl.TVStopEdit method for tree view control

TKOLTreeView

Stops editing item label.

procedure TVStopEdit( Cancel: Boolean );

Description

If Cancel = TRUE, edit operation is cancelled.

See also: OnTVBeginEdit, OnTVEndEdit events.


	TKOLToolBar component
Hierarchy	Properties	Events	Constructor	Methods

Mirror for KOL TControl, implementing tool bar control.

Unit

mckctrls

Description

TKOLToolBar is a mirror component to KOL tool bar, which is implemented in KOL TControl object type, as well as all other visual controls in KOL.


KOL tool bar control constructors

TKOLToolBar

Following global function can be used to create tool bar control at run-time:

type

  TControlAlign = ( caNone, caLeft, caTop, caRight, caBottom, caClient );

  TToolbarOption = ( tboTextRight, tboTextBottom, tboFlat, tboTransparent, tboWrapable, tboNoDivider );

  TToolbarOptions = Set of TToolbarOption;

function NewToolbar( AParent: PControl; Align: TControlAlign; Options: TToolbarOptions; Bitmap: HBitmap; Buttons: array of PChar; BtnImgIdxArray: array of Integer ) : PControl;


TKOLToolBar properties

TKOLToolBar	Legend

In TKOLToolBar

bitmap

buttons

 	Count

 	CurIndex

 	CurItem

mapBitmapColors

noTextLabels

Options

showTooltips

tooltips

 	RightClick

 	TBButtonCount

TBButtonChecked

TBButtonEnabled

TBButtonImage

TBButtonMarked

TBButtonPressed

 	TBButtonRect

TBButtonText

TBButtonVisible

TBButtonWidth

TBRows

In TKOLControl

Align

Border

CenterOnParent

ClientHeight

ClientWidth

ClsStyle

Color

Ctl3D

Cursor_

DoubleBuffered

Enabled

EraseBackground

ExStyle

Font

Handle

MarginBottom

MarginLeft

MarginRight

MarginTop

Parent

parentColor

parentFont

PlaceDown

PlaceRight

PlaceUnder

popupMenu

Style

TabOrder

Tag

Transparent

Visible

in TComponent

Left

Top

Width

Height

Name


TKOLToolBar.bitmap

TKOLToolBar

Bitmap to load it and use in tool bar control.

property bitmap: TBitmap;

Description

This is design-time only property. If bitmap is defined here, code is generated to load it into toolbar using its method TBAddBitmap.

See also: mapBitmapColors property.


TKOLToolBar.buttons

TKOLToolBar

Buttons of toolbar.

property buttons: String;

Description

This is design-time only property. When clicked on drop down arrow button in Object Inspector, toolbar component editor dialog is called, which allows to adjust buttons of toolbar.

See also: bitmap property.


TKOLToolBar.Count

TKOLToolBar

Count of buttons.

property Count: Integer;

Description

This property is for read only (assigning it has no effect for tool bar control). Property TBBuittonCount is the synonim of this property.

Count of all buttons is returned, including separators.


TKOLToolBar.CurIndex

TKOLToolBar

Clicked button index.

property CurIndex: Integer;

Description

This value is set when toolbar button (or toolbar itself) is clicked. It is assigned to the index of toolbar button, or to –1, if there were no buttons clicked (toolbar itself was clicked).

See also: CurItem property, OnClick event.


KOL toolbar.button index

Index of tool bar button is an integer value. Buttons are enumerated starting from 0, and even separator buttons have its own index. Also button ID can be used to define toolbar buttons. But when working with TBButtonXXX properties, it is possible to use either button index or button ID (but toolbar control should not contain more than 99 buttons for such case).

When toolbar is clicked, in event handlers for events OnClick and OnDropDown it is possible to examine properties CurIndex or CurItem to detect what button was clicked (-1 means that toolbar itself was clicked).


TKOLToolBar.CurItem

TKOLToolBar

Clicked button ID.

property CurItem: Integer;

Description

This value is set when toolbar button (or toolbar itself) is clicked. It is assigned to the ID of toolbar button clicked, or to –1, if there were no buttons clicked (toolbar itself was clicked).

See also: CurIndex property, OnClick event.


TKOLToolBar.mapBitmapColors

TKOLToolBar

If to map bitmap colors to system 16-colors palette when load it.

property mapBitmapColor: Boolean;

Description

This is design-time only property. If it is set to TRUE (default), bitmap is loaded using special function, which maps its colors to system 16-color palette. But this only possible, when original bitmap is created with graphic tool, which saves bitmap with correct 16-color standard palette. E.g., Borland Image Editor can do this. Just load 16-color bitmap to Image Editor, and save it from this graphic editor, and then re-load bitmap from new version of the file. In such case toolbar control will look the most natural with colors, matching standard colors, defined in desktop colors scheme.


TKOLToolBar.noTextLabels

TKOLToolBar

If TRUE, text, assigned to buttons while designing toolbar, is not shown on toolbar buttons.

property noTextLabels: Boolean;

Description

This is design-time only property. When it is TRUE, text labels is not loaded at all. But therefore, it can be used in tooltips, if property showTooltips is TRUE too, and tooltips property is not assigned (if it is assigned, those tooltips are used therefore).


TKOLToolBar.Options

TKOLToolBar

Options of the toolbar control.

type

  TToolbarOption = ( tboTextRight, tboTextBottom, tboFlat, tboTransparent, tboWrapable, tboNoDivider );

  TToolbarOptions = Set of TToolbarOption;

property Options: TToolbarOptions;

Description

This is design-time only property. At run time, options are passed to a constructing function of the toolbar, when it is created.


TKOLToolBar.showTooltips

TKOLToolBar

Determines if to show tooltips for toolbar buttons.

property showTooltips: Boolean;

Description

If tooltip property is not assigned, button labels itselves are used as tooltips.

See also: tooltips, noTextLabels properties.


TKOLToolBar.tooltips

TKOLToolBar

Tooltips for toolbar buttons.

property tooltips: TStrings;

Description

Design-time only property. Contains tooltips for toolbar buttons (for every button – in its own line). If not assigned, button labels itselves are used as tooltips.

See also: showTooltips, noTextLabels properties.


TKOLToolBar.RightClick

TKOLToolBar

This property is TRUE in OnClick event, if click was made by right mouse button.

property RightClick: Boolean;

Description

See also: OnClick event.


TKOLToolBar.TBButtonCount

TKOLToolBar

Count of buttons.

property TBButtonCount: Integer;

Description

This property is read only. Property Count can be used instead (it is the synonim of this property).

Count of all buttons is returned, including separators.


TKOLToolBar.TBButtonChecked
TKOLToolBar.TBButtonChecked[ ]

TKOLToolBar

Determines if toolbar button is checked.

property TBButtonChecked[ BtnID: Integer ]: Boolean;

Description


TKOLToolBar.TBButtonEnabled
TKOLToolBar.TBButtonEnabled[ ]

TKOLToolBar

Determines if toolbar button is enabled.

property TBButtonEnabled[ BtnID: Integer ]: Boolean;

Description


TKOLToolBar.TBButtonImage
TKOLToolBar.TBButtonImage[ ]

TKOLToolBar

Toolbar button image index.

property TBButtonImage[ BtnID: Integer ]: Integer;

Description

Button images are stored in the same bitmap. It is possible (at run-time) assign another image to the button, or set this property to –1 for a button to define no image for a button.


TKOLToolBar.TBButtonMarked
TKOLToolBar.TBButtonMarked [ ]

TKOLToolBar

Toolbar button "marked" state (highlighting).

property TBButtonMarked[ BtnID: Integer ]: Boolean;

Description


TKOLToolBar.TBButtonRect
TKOLToolBar.TBButtonPressed [ ]

TKOLToolBar

Toolbar button "pressed" state.

property TBButtonPressed[ BtnID: Integer ]: Boolean;

Description


TKOLToolBar.TBButtonPressed
TKOLToolBar.TBButtonRect[ ]

TKOLToolBar

Toolbar button rectangle.

property TBButtonRect[ BtnID: Integer ]: TRect;

Description

See also: TBButtonWidth property.


TKOLToolBar.TBButtonText
TKOLToolBar.TBButtonText[ ]

TKOLToolBar

Toolbar button text.

property TBButtonText[ BtnID: Integer ]: String;

Description


TKOLToolBar.TBButtonVisible
TKOLToolBar.TBButtonVisible[ ]

TKOLToolBar

Toolbar button visibility.

property TBButtonVisible[ BtnID: Integer ]: Boolean;

Description


TKOLToolBar.TBButtonWidth
TKOLToolBar.TBButtonWidth[ ]

TKOLToolBar

Toolbar button width.

property TBButtonWidth[ BtnID: Integer ]: Integer;

Description

See also: TBButtonRect property.


TKOLToolBar.TBRows

TKOLToolBar

Toolbar rows count.

property TBRows: Integer;

Description


TKOLToolBar events

TKOLToolBar

In TKOLToolbar

OnClick

OnDropDown

OnTBClick

OnTBDropDown

In TKOLControl

OnDestroy

OnDropFiles

OnEraseBkgnd

OnHide

OnMessage

OnMouseDblClk

OnMouseDown

OnMouseEnter

OnMouseLeave

OnMouseMove

OnMouseUp

OnMouseWheel

OnMove

OnPaint

OnResize

OnShow


TKOLToolBar.OnClick

TKOLToolBar

Occurs when toolbar button or toolbar itself is clicked by mouse.

type
  TOnEvent = procedure( Sender: PObj ) of object;

property OnClick: TOnEvent;

Description

In the event handler, examine property CurIndex or CurItem to get know, what toolbar button is clicked, and RightClick property to check if click was made by right mouse button.

This event has a synonim OnTBClick (but it is available at design time name OnClick).


TKOLToolBar.OnDropDown

TKOLToolBar

Occurs when toolbar button having drop-down style is clicked on drop-arrow.

type
  TOnEvent = procedure( Sender: PObj ) of object;

property OnDropDown: TOnEvent;

Description

In the event handler, examine property CurIndex or CurItem to get know, what toolbar button is clicked, and RightClick property to check if click was made by right mouse button.

This event has a synonim OnTBDropDown (though it is available at design time only as OnTBDropDown only).


TKOLToolBar.OnTBClick

TKOLToolBar

Occurs when toolbar button or toolbar itself is clicked by mouse.

type
  TOnEvent = procedure( Sender: PObj ) of object;

property OnTBClick: TOnEvent;

Description

In the event handler, examine property CurIndex or CurItem to get know, what toolbar button is clicked, and RightClick property to check if click was made by right mouse button.

This event has a synonim OnClick (though it is available at design time only as OnClick).


TKOLToolBar.OnTBDropDown

TKOLToolBar

Occurs when toolbar button having drop-down style is clicked on drop-arrow.

type
  TOnEvent = procedure( Sender: PObj ) of object;

property OnTBDropDown: TOnEvent;

Description

In the event handler, examine property CurIndex or CurItem to get know, what toolbar button is clicked, and RightClick property to check if click was made by right mouse button.

This event has a synonim OnDropDown (though it is available at design time only as OnTBDropDown only).


TKOLToolBar methods

TKOLToolBar

In TKOLToolbar

TBAddBitmap

TBAddButtons

TBButtonAtPos

TBBtnIdxAtPos

TBDeleteButton

TBDeleteBtnByIdx

TBInsertButtons

TBIndex2Item

TBItem2Index

TBSetTooltips

See also other (common) TControl methods.


KOL TControl.TBAddBitmap method

TKOLToolBar

Adds a bitmap to the toolbar, so it can be used to show toolbar buttons.

procedure TBAddBitmap( Bitmap: HBitmap );

Description

Bitmap usually is defined at design time. This method allows to define bitmap for toolbar at run time.

See also: bitmap property, TBAddButtons methods.


KOL TControl.TBAddButtons method

TKOLToolBar

Adds buttons to the toolbar.

function TBAddButtons( const Buttons: array of PChar; const BtnImgIdxArray: array of Integer ): Integer;

Description

Buttons are usually defined at design time. This method allows to add buttons to the toolbar at run time.

See also: TBAddBitmap, TBInsertButtons methods.


KOL TControl.TBButtonAtPos method

TKOLToolBar

Returns ID of toolbar button at the given position.

function TBButtonAtPos( X, Y: Integer ): Integer;

Description

If there are no buttons at the given position, -1 is returned.

See also: TBBtnIdxAtPos method.


KOL TControl.TBBtnIdxAtPos method

TKOLToolBar

Returns index of toolbar button at the given position.

function TBBtnIdxAtPos( X, Y: Integer ): Integer;

Description

If there are no buttons at the given position, -1 is returned.

See also: TBButtonAtPos method.


KOL TControl.TBDeleteButton method

TKOLToolBar

Deletes toolbar button.

procedure TBDeleteButton( BtnID: Integer );

Description

Deletes toolbar button It is possible to pass either toolbar button ID or button index as BtnID. It is possible to pass either index of the button or its ID – result will be the same.

See also: TBAddButtons, TBDeleteBtnByIdx method.


KOL TControl.TBDeleteBtnByIdx method

TKOLToolBar

Deletes toolbar button.

procedure TBDeleteBtnByIdx( BtnID: Integer );

Description

Deletes toolbar button It is possible to pass either toolbar button ID or button index as BtnID.

See also: TBDeleteButtons method.


KOL TControl.TBInsertButtons method

TKOLToolBar

Adds buttons to the toolbar.

function TBInsertButtons( BeforeIdx: Integer; Buttons: array of PChar; BtnImgIdxArray: array of Integer ): Integer;

Description

Buttons are usually defined at design time. This method allows to add buttons to the toolbar at run time.

See also: TBAddButtons method.


KOL TControl.TBIndex2Item method

TKOLToolBar

Converts button index to button ID.

function TBIndex2Item( Idx: Integer ): Integer;

Description

See also: TBItem2Index method.


KOL TControl.TBItem2Index method

TKOLToolBar

Converts button ID to button index.

function TBItem2Index( Idx: Integer ): Integer;

Description

See also: TBIndex2Item method.


KOL TControl.TBSetTooltips method

TKOLToolBar

Assigns tooltips to toolbar buttons.

procedure TBSetTooltips( BtnID1st: Integer; Tooltips: array of PChar );

Description

Usually it is sufficient to use properties tooltips, buttons at design time to adjust tooltips. This method allows to adjust tooltips at run time.

See also: TBAddButtons, TBInsertButtons methods.


	TKOLTabControl component
Hierarchy	Properties	Events	Constructor	Methods

Mirror for KOL TControl, implementing tab control control, i.e. control with pages, only one of which is visible at the same time, and with tabs, controlling which page is active.

Unit

mckctrls

Description

TKOLTabControl is a mirror component to KOL tab control, which is implemented in KOL TControl object type, as well as all other visual controls in KOL.

Fig.1 Design-time view	Fig.2 Run time view
At design time, it is possible to switch between tabs in tab control just by double clicking small square with tab number on top edge of the designer image of the tab control. (Or, by changing property CurIndex in Object Inspector). To set up count of pages, select tab control itself and change property Count in Object Inspaector. It is possible at design time to remove page by selecting current page panel in designer form and pressing keyboard key Delete.

Usual panel controls are used as pages. So, all properties, methods and events of TKOLPanel are applicable to it at design and at run time.


KOL tab control control constructors

TKOLTabControl

Following global function can be used to create tab control at run-time:

type

  TTabControlOption = ( tcoButtons, tcoFixedWidth, tcoFocusTabs, tcoIconLeft, tcoLabelLeft, tcoMultiline, tcoMultiselect, tcoFitRows, tcoScrollOpposite, tcoBottom, tcoVertical, tcoFlat, tcoHotTrack, tcoBorder );

  TTabControlOptions = set of TTabControlOption;

function NewTabControl( AParent: PControl; Tabs: array of String; Options: TTabControlOptions; ImgList: PImageList; ImgList1stIdx: Integer ): PControl;


TKOLToolBar properties

TKOLTabControl	Legend

In TKOLTabControl

Count

CurIndex

edgeType

ImageList

ImageList1stIdx

Options

 	Pages

 	TC_ItemRect

TC_Items

TC_Images

In TKOLControl

Align

Border

CenterOnParent

ClientHeight

ClientWidth

ClsStyle

Color

Ctl3D

Cursor_

DoubleBuffered

Enabled

EraseBackground

ExStyle

Font

Handle

MarginBottom

MarginLeft

MarginRight

MarginTop

Parent

parentColor

parentFont

PlaceDown

PlaceRight

PlaceUnder

popupMenu

Style

TabOrder

Tag

Transparent

Visible

in TComponent

Left

Top

Width

Height

Name


TKOLTabControl.Count

TKOLTabControl

Count of tabs.

property Count: Integer;

Description

Set this property to value, other then 0, at design time, to provide needed count of pages.

See also: CurIndex property.


TKOLTabControl.CurIndex

TKOLTabControl

Index of active page of the tab control.

property CurIndex: Integer;

Description

To set this value at design time, it is possible also to double click small square with tab index on top edge of the tab control.

At run time initial value is the same, that was set last at run time.

See also: Count property.


TKOLTabControl.edgeType

TKOLTabControl

Edge style for tab control.

type

  TEdgeStyle = ( esRaised, esLowered, esNone );

property edgeType: TEdgeStyle;

Description

Default value is esNone.


TKOLTabControl.ImageList

TKOLTabControl

Image list, used to store images, which can be used on tabs of tab control.

property ImageList: TKOLImageList;

Description

This is design-time only property. Though, at run time, it can be accessed as ImageListNormal.

See also: TC_Images property.


TKOLTabControl.ImageList1stIdx

TKOLTabControl

Index of the first image from ImageList, which is used in tabs of tab control.

property ImageList1stIdx: Integer;

Description

This is design-time only property. At run time it is passed to constructing function as ImgList1stIdx parameter.


TKOLTabControl.Options

TKOLTabControl

Options of tab control.

type

  TTabControlOption = ( tcoButtons, tcoFixedWidth, tcoFocusTabs, tcoIconLeft, tcoLabelLeft, tcoMultiline, tcoMultiselect, tcoFitRows, tcoScrollOpposite, tcoBottom, tcoVertical, tcoFlat, tcoHotTrack, tcoBorder );

  TTabControlOptions = set of TTabControlOption;

property Options: TTabControlOptions;

Description

This is design-time only property. At run time, options are passed to a constructing function NewTabControl, as Options parameter.


TKOLTabControl.Pages[ ]
TKOLTabControl.Pages

TKOLTabControl

Access to pages of tab control, which actually are usual panel controls.

property Pages[ Idx: Integer ]: PControl;

Description


TKOLTabControl.TC_ItemRect[ ]
TKOLTabControl.TC_ItemRect

TKOLTabControl

Item rectangle for a tab in tab control.

property TC_ItemRect[ Idx: Integer ]: TRect;

Description


TKOLTabControl.TC_Items[ ]
TKOLTabControl.TC_Items

TKOLTabControl

Text, displayed on tab control tabs.

property TC_Items[ Idx: Integer ]: String;

Description


TKOLTabControl.TC_Images[ ]
TKOLTabControl.TC_Images

TKOLTabControl

Image index for tabs in tab control.

property TC_Images[ Idx: Integer ]: Integer;

Description

See also: ImageList, ImageList1stIdx properties.


TKOLTabControl events

TKOLTabControl

In TKOLTabControl

OnClick

OnSelChange

In TKOLControl

OnChar

OnDestroy

OnDropFiles

OnEnter

OnEraseBkgnd

OnHide

OnKeyDown

OnKeyUp

OnLeave

OnMessage

OnMouseDblClk

OnMouseDown

OnMouseEnter

OnMouseLeave

OnMouseMove

OnMouseUp

OnMouseWheel

OnMove

OnPaint

OnResize

OnShow


TKOLTabControl.OnClick

TKOLTabControl

Occurs when tab control is clicked by mouse.

type
  TOnEvent = procedure( Sender: PObj ) of object;

property OnClick: TOnEvent;

Description

To detect changing tab, use OnSelChange event, it is more appropriate for such purpose.


TKOLTabControl.OnSelChange

TKOLTabControl

Occurs when tab is changed in tab control.

type
  TOnEvent = procedure( Sender: PObj ) of object;

property OnSelChange: TOnEvent;

Description


TKOLTabControl methods

TKOLTabControl

TKOLTabControl specific:

TC_Insert

TC_Delete

TC_DisplayRect

TC_SetPadding

TC_TabAtPos

See also other (common) TControl methods.


KOL TControl.TC_Insert method

TKOLTabControl

Inserts new tab into tab control.

function TC_Insert( Idx: Integer; const TabText: String; TabImgIdx: Integer ): PControl;

Description


KOL TControl.TC_Delete method

TKOLTabControl

Deletes tab from tab control.

procedure TC_Delete( Idx: Integer );

Description


KOL TControl.TC_DisplayRect method

TKOLTabControl

Returns rectangle, occupied by page in tab control.

function TC_DisplayRect: TRect;

Description

To obtaint rectangle, occupied by tab rather then page, use property TC_ItemRect.


KOL TControl.TC_SetPadding method

TKOLTabControl

Sets space padding around tab text in a tab of tab control.

procedure TC_SetPadding( cx, cy: Integer );

Description


KOL TControl.TC_TabAtPos method

TKOLTabControl

Returns index of tab at the given position.

function TC_TabAtPos( x, y: Integer ): Integer;

Description


TObj object type
	KOL TObj object type
Hierarchy	Events	Methods

Implements one of three graphic tools: font, brush or pen.

Unit

KOL.pas

Description

KOL TObj object type is a base type for all other KOL objects. It defines method Free, which allows safely destroy object or skip destroying of the object, if it is not assigned. Also it contains several other basic methods and properties. It is recommended to use TObj as descendant object even when very simple object type is created, because TObj provides correct initialization and releasing of allocated memory when destroying by the way, which is independant from Delphi version.

Since objects, used in KOL, unlike classes, used in VCL, are not automatically referenced by pointers, but should therefore be referenced by pointers, because created dynamically, every TXXXX object type has correspondent PXXXX pointer type to refer to instances of such object type. And TObj object type, also has correspondent PObj pointer type, which should be used as a type for variables, i.e. instances of object types, inherited from TObj. Identifier TObj is used only to define object type itself, and to refer to it as a name of type in this help file.


_TObj object


TObj properties

TObj	Legend

In KOL TObj

no properties


TObj events

TObj

In TObj

OnDestroy


TObj.OnDestroy

TObj

Occurs when object is destroying.

type

  TOnEvent = procedure( Sender: PObj ) of object;

property OnDestroy: TOnEvent;

Description


TObj methods

TObj

TObj specific:

Add2AutoFree

Add2AutoFreeEx

Create

 	Destroy

Free

 	Init

InstanceSize

RefDec

RefInc

VmtAddr


KOL TObj.Add2AutoFree method

TObj

Adds an object to auto-free list.

procedure Add2AutoFree( Obj: PObj );

Description

Object Obj will be destroyed automatically when this object will be destroying. This is similar to VCL's owning of one object by another (owner destroyes its owning objects).

This method is used in MCK projects to free owned non-visual objects together with form (for example).


KOL TObj.Add2AutoFreeEx method

TObj

Adds an object to auto-free list.

type

  TObjectMethod = procedure of object;

procedure Add2AutoFreeEx( Proc: TObjectMethod );

Description

Procedure Proc will be called automatically when this object will be destroying. This method is used in MCK projects to free owned non-visual VCL components owned by KOL form together with the form.


KOL TObj.Create constructor

TObj

Constructor.

constructor Create;

Description

Constructors of poor Pascal objects can not be virtual. Since this, constructor of TObj object type calls Init virtual method. Inherit it and write your own code here to override initialization, calling base constructor Create therefore.

When you create your own object, based on TObj, always define global constructing function like it is done for the most of KOL objects, and create there an instance of your object, like in example below:

type

  PMyObj = ^TMyObj;

  TMyObj = object( TObj )

..protected

    procedure Init; virtual;

    …

  end;

  …

function NewMyObj: PMyObj;

begin

  new( Result, Create );

  …

end;


KOL TObj.Destroy destructor

TObj

Destructor.

destructor Destroy; virtual;

Description

In destructor, all allocated resources should be released. Please note, that unlike fo VCL classes, poor Pascal objects are not freeing automatically ansi strings, dynamic arrays, etc. Since this all such fields should be freeing in overriden destructor. E.g., to free memory resource, associated with an ansi string, assign an empty string to it.

In all other code, never call Destroy directly. Use Free method instead.

If reference count, set by RefInc, is not 0, the object is not destroyed immediately. Its destruction delayed until RefDec will be called necessary times, i.e. until actual needs in this object disappear.


KOL TObj.Free method

TObj

If the object is assigned, calls destructor Destroy for it.

procedure Free;

Description

Always use this method, instead calling destructor Destroy directly.


KOL TObj.Init method

TObj

Initializes object.

procedure Init; virtual;

Description

When deriving new object type from TObj, override this procedure and place your initialization code here.

See also: constructor Create.


KOL TObj.InstanceSize method

TObj

Returns instance size for object.

function InstanceSize: Integer;

Description

The same as Sizeof( SomeObj^ ), but allows to obtain instance size of object without knowing its type exactly.


KOL TObj.RefDec method

TObj

Decreases inner reference counter.

procedure RefDec;

Description

See also: RefInc, Destroy.


KOL TObj.RefInc method

TObj

Increases inner reference counter.

procedure RefInc;

Description

See also: RefDec, Destroy.


KOL TObj.VmtAddr method

TObj

Returns address of vmt.

function VmtAddr: Pointer;

Description


TGraphicTool object type
	KOL TGraphicTool object type
Hierarchy	Properties	Events	Constructor	Methods

Implements one of three graphic tools: font, brush or pen.

Unit

KOL.pas

Description

KOL TGraphicTool object type can implement one of three graphic tools: font, brush or pen. This made so to economy code and constant area of the executable (because separate virtual methods table is allocated for every object type, defined in program).

At design time, this object is usually accessed as a Font property of TKOLControl. At run time, TGraphicTool objects are available as Font and Brush properties of TControl object type, and Font, Brush and Pen properties of TCanvas KOL object type.

Since objects, used in KOL, unlike classes, used in VCL are not automatically referenced by pointers, but should therefore be referenced by pointers, because created dynamically, every TXXXX object type has correspondent PXXXX pointer type to refer to instances of such object type. And TGraphicTool object type, also has correspondent PGraphicTool pointer type, which should be used as a type for variables, i.e. instances of such object type. Identifier TGraphicType is used only to define object type itself, and to refer to it as a name of type in this help file.


KOL TGraphicTool object constructors

TGraphicTool

Following global function can be used to create TGraphictool objects at run time:

function NewFont: PGraphicTool;	creates font object

function NewBrush: PGraphicTool;	creates brush object

function NewPen: PGraphicTool;	creates pen object


TObj


TGraphicTool properties

TGraphicTool	Legend

In KOL TGraphicTool

BrushBitmap

BrushStyle

Color

GeometricPen

FontCharset

FontHeight

FontName

FontOrientation

FontPitch

FontStyle

FontWeight

FontWidth

Handle

PenBrushBitmap

PenBrushStyle

PenEndCap

PenJoin

PenMode

PenStyle

PenWidth

In KOL TObj


TGraphicTool.BrushBitmap

TGraphicTool

Bitmap, used in brush.

property BrushBitmap: HBitmap;

Description

Only for graphic tool, incapsulating brush Windows GUI object

See also: BrushStyle method.


TGraphicTool.BrushStyle

TGraphicTool

Brush style.

type

  TBrushStyle = (bsSolid, bsClear, bsHorizontal, bsVertical, bsFDiagonal, bsBDiagonal, bsCross, bsDiagCross);

property BrushStyle: TBrushStyle;

Description

Only for graphic tool, incapsulating brush Windows GUI object When BrushBitmap is assigned, it is used instead.

See also: BrushBitmap method.


TGraphicTool.Color

TGraphicTool

Color of graphic tool object.

property Color: TColor;

Description

Used in all three types of graphic tool object (brush, font and pen).


TGraphicTool.GeometricPen

TGraphicTool

For pen, determines, if it is geometric.

property GeometricPen: Boolean;

Description

Only for pen. When TRUE, another initialization procedure is used, and properties PenBrushBitmap, PenBrushStyle, PenJoin and PenEndCap are available.


TGraphicTool.FontCharset

TGraphicTool

For font, determines charset used.

type

  TFontCharset = 0..255;

property FontCharset: TFontCharset;

Description


TGraphicTool.FontHeight

TGraphicTool

For font, height of font.

property FontHeight: Integer;

Description

Value 0 means default font size. Value greater then 0 determines font height in pixels. If value is less then 0, negative value is font height in logical points.

See also: FontWidth property.


TGraphicTool.FontName

TGraphicTool

For font, name of font.

property FontName: String;

Description

Empty value means default font name. Please note, that to use some scaling and rotating features, font must be True Type.

See also: IsFontTrueType method.


TGraphicTool.FontHeight
TGraphicTool.FontOrientation

TGraphicTool

For font, orientation of font, in grades (i.e. in 1/10 of degree. For example, 900 means 90 degree).

property FontOrientation: Integer;

Description

This property has effect only for true type fonts (e.g., Arial, or Times are true type fonts, but MS Sans Serif - not). Though it is possible to set this value for any Font property, including Font property of TControl object, to draw text correctly it is necessary to recalculate correct text draw origin, because it is still the same, and text will be drawn incorrectly. There is a special type of control in KOL, which takes FontOrientation of Font into consideration and recalculates text draw origin as needed. This is label effect control. Use it, if you want get rotated text easy. Otherwise, it is possible to use this capability when your code is drawing directly to a canvas.

See also: IsFontTrueType method.


TGraphicTool.FontPitch

TGraphicTool

For font, pitch of font.

property FontPitch: Integer;

Description


TGraphicTool.FontStyle

TGraphicTool

For font, style of font.

type

  TFontStyles = (fsBold, fsItalic, fsUnderline, fsStrikeOut);

  TFontStyle = set of TFontStyles;

property FontStyle: TFontStyle;

Description


TGraphicTool.FontWeight

TGraphicTool

For font, weight of font.

property FontWeight: Integer;

Description

Weight of font is its (additional) boldness. Must be 0…1000. Value 700 corresponds to usual fsBold, 400 to normal (not fsBold).

See also: FontStyle property.


TGraphicTool.FontWidth

TGraphicTool

For font, average width of font.

property FontWidth: Integer;

Description

Font width in logical units. If FontWidth is 0, then as it is said in Win32.hlp, "the aspect ratio of the device is matched against the digitization aspect ratio of the available fonts to find the closest match, determined by the absolute value of the difference."

See also: FontHeight property.


TGraphicTool.Handle

TGraphicTool

Handle of font, brush or handle, depending on which type of graphic tool object is implemented by the object.

property Handle: THandle;

Description

See also: HandleAllocated method.


TGraphicTool.PenBrushBitmap

TGraphicTool

For pen, brush bitmap handle.

property PenBrushBitmap: HBitmap;

Description

Bitmap must be DDB, and pen must be geometric.

See also: BrushBitmap property.


TGraphicTool.PenBrushStyle

TGraphicTool

For pen, brush style.

type

  TBrushStyle = (bsSolid, bsClear, bsHorizontal, bsVertical, bsFDiagonal, bsBDiagonal, bsCross, bsDiagCross);

property PenBrushStyle: TBrushStyle;

Description

Brush style for hatched geometric pen.

See also: PenBrushBitmap property.


TGraphicTool.PenEndCap

TGraphicTool

For geometric pen, end cap style.

type

  TPenEndCap = (pecRound, pecSquare, pecFlat);

property PenEndCap: TPenEbdCap;

Description


TGraphicTool.PenJoin

TGraphicTool

For geometric pen, join style.

type

  TPenJoin = (pjRound, pjBevel, pjMiter);

property PenJoin: TPenJoin;

Description


TGraphicTool.PenMode

TGraphicTool

For pen, pen mode.

type

  TPenMode = (pmBlack, pmWhite, pmNop, pmNot, pmCopy, pmNotCopy, pmMergePenNot, pmMaskPenNot, pmMergeNotPen, pmMaskNotPen, pmMerge, pmNotMerge, pmMask, pmNotMask, pmXor, pmNotXor);

property PenMode: TPenMode;

Description


TGraphicTool.PenStyle

TGraphicTool

For pen, pen style.

type

  TPenStyle = (psSolid, psDash, psDot, psDashDot, psDashDotDot, psClear, psInsideFrame);;

property PenStyle: TPenStyle;

Description


TGraphicTool.PenWidth

TGraphicTool

For pen, pen width.

property PenWidth: Integer;

Description


TGraphicTool events

TGraphicTool

In TGraphicTool

OnChange

In TObj

OnDestroy


TGraphicTool.OnChange

TGraphicTool

Occurs when graphic tool object is changed.

property OnChange: TOnEvent;

Description

This event is mainly for internal purposes. Use it only in case, when TGraphicTool object is created by your code, and used by another way, than as property of TControl or TCanvas object.


TGraphicTool methods

TGraphicTool

TGraphicTool specific:

Assign

AssignHandle

HandleAllocated

IsFontTrueType

ReleaseHandle

See also other (common) TObj methods.


KOL TControl.Assign method
KOL TGraphicTool.Assign method

TGraphicTool

Assigns one graphic tool object to another.

function Assign( Value: PGraphicTool ): PGraphicTool;

Description

Graphic tool object must be of the same kind (font, brush or pen).

This method should be used in form

Destination := Destination.Assign( Source );

(because in result of this operation a value can be assigned to a variable, which was not assigned yet, i.e. contained nil).

Handle is not copied during assignment. If assigning is really leading to change graphic tool object, event OnChange is called.


KOL TControl.AssignHandle method
KOL TGraphicTool.AssignHandle method

TGraphicTool

Assigns Handle graphic tool object to a value.

procedure AssignHandle( NewHandle: Integer );

Description

NewHandle should be a handle of font, brush or pen Windows GUI object, which is not allocated as a handle for any other KOL TGraphicTool object (e.g., it can be allocated in your code).

It would be possible to make Handle property writable rather then make this method available, but this is done so to underline, that it is not possible to assign any value to Handle property so freely.

See also: Assign method.


KOL TControl.HandleAllocated method
KOL TGraphicTool.HandleAllocated method

TGraphicTool

Returns True, if Handle is already created for graphic tool object.

function HandleAllocated: Boolean;

Description

When Handle property is accessed (for read), it is allocated automatically, so it is not possible to examine if it is allocated without allocating it. Since this, use this method to make the examination without allocated Handle if this is not necessary.


KOL TControl.IsFontTrueType method
KOL TGraphicTool.IsFontTrueType method

TGraphicTool

For font, returns True, if font is true type.

function IsFontTrueType: Boolean;

Description


KOL TControl.ReleaseHandle method
KOL TGraphicTool.ReleaseHandle method

TGraphicTool

Releases Handle from graphic tool object.

function ReleaseHandle: Integer;

Description

Returns Handle value (if allocated), releasing it from the object (so, it is no more knows about this handle and its HandleAllocated function returns False.


	TKOLTimer component
Hierarchy	Properties	Events	Constructor	Methods

TKOLTimer is a mirror of timer object.

Unit

mckobjs

Description


TComponent

TKOLObj


KOL TTimer constructor
KOL TTimer constructor function

TKOLTimer

Following function can be used to create KOL TTimer object at run time:

function NewTimer( Interval: Integer ): PTimer;


TKOLTimer properties

TKOLTimer	Legend

In TKOLTimer

Enabled

Interval

in TComponent

Name


TKOLTimer.Enabled

TKOLTimer

TRUE, if timer is on.

property Enabled: Boolean;

Description


TKOLTimer.Interval

TKOLTimer

Timer interval.

property Interval: Integer;

Description


TKOLTimer events

TKOLTimer

In TKOLTimer

OnTimer

In TKOLTObj

OnDestroy


TKOLTimer.OnTimer

TKOLTimer

Occurs when timer interval is over.

type

  TOnEvent = procedure( Sender: PObj ) of object;

property OnTimer: TOnEvent;

Description


	TKOLThread component
Hierarchy	Properties	Events	Constructor	Methods

TKOLThread is a mirror of KOL thread object.

Unit

mckobjs

Description


KOL TThread constructors
KOL TThread constructor functions

TKOLThread

Following functions can be used to create KOL TThread object at run time:

function NewThread: PThread;

type

 TOnThreadExecute = function(Sender:PThread): Integer of object;

function NewThreadEx( const Proc: TOnThreadExecute ): PThread;


TKOLThread properties

TKOLThread	Legend

In TKOLThread

Data

 	Handle

PriorityClass

startSuspended

 	Suspended

 	Terminated

 	ThreadID

ThreadPriority

in TComponent

Name


TKOLThread.Data

TKOLThread

Custom data pointer.

property Data: Pointer;

Description


TKOLThread.Handle

TKOLThread

Thread object handle.

property Handle: THandle;

Description


TKOLThread.PriorityClass

TKOLThread

Priority class.

property PriorityClass: Integer;

Description

Possible values are:

HIGH_PRIORITY_CLASS, IDLE_PRIORITY_CLASS, NORMAL_PRIORITY_CLASS, REALTIME_PRIORITY_CLASS

See also: ThreadPriority property.


TKOLThread.startSuspended

TKOLThread

Determines if to create thread suspended.

property startSuspended: Boolean;

Description

This is design-time only property. Depending on its value, code is generate to create thread using NewTread or NewThreadEx constructing function.


TKOLThread.Suspended

TKOLThread

True if thread is suspended.

property Suspended: Boolean;

Description


TKOLThread.Terminated

TKOLThread

True if thread is terminated.

property Terminated: Boolean;

Description


TKOLThread.ThreadID

TKOLThread

Thread ID.

property ThreadID: DWORD;

Description


TKOLThread.ThreadPriority

TKOLThread

Priority.

property ThreadPriority: Integer;

Description

Possible values are:

THREAD_PRIORITY_ABOVE_NORMAL, THREAD_PRIORITY_BELOW_NORMAL, THREAD_PRIORITY_HIGHEST, THREAD_PRIORITY_IDLE, THREAD_PRIORITY_LOWEST, THREAD_PRIORITY_NORMAL, THREAD_PRIORITY_TIME_CRITICAL

See also: PriorityClass property.


TKOLThread events

TKOLThread

In TKOLThread

OnExecute

OnResume

OnSuspend

In TKOLTObj

OnDestroy


TKOLTimer.OnExecute
TKOLThread.OnExecute

TKOLThread

Occurs when thread is started and should perform its work.

type

  TOnThreadExecute = function(Sender:PThread): Integer of object;

property OnExecute: TOnThreadExecute;

Description

Use this event to place there code, which should be executed in a separate thread. This way is preferred rather then creating special object on base of TThread, and overriding virtual method Execute.


TKOLTimer.OnResume
TKOLThread.OnResume

TKOLThread

Occurs (in thread) when thread is resumed.

type

  TOnEvent = procedure( Sender: PObj ) of object;

property OnResume: TOnEvent;

Description


TKOLTimer.OnSuspend
TKOLThread.OnSuspend

TKOLThread

Occurs when thread is suspended.

type

  TOnEvent = procedure( Sender: PObj ) of object;

property OnSuspend: TOnEvent;

Description


KOL TThread methods

TKOLThread

In KOL TThread

Execute

Resume

Suspend

Synchronize

Terminate

WaitFor

In KOL TObj

Add2AutoFree

Add2AutoFreeEx

Create

 	Destroy

Free

 	Init

InstanceSize

RefDec

RefInc

VmtAddr


TKOLTimer. Execute
TKOLThread.Execute

TKOLThread

Execution of thread main code in a separate thread.

function Execute: integer; virtual;

Description

See also: OnExecute event.


TKOLTimer.Resume
TKOLThread.Resume

TKOLThread

Resumes executing thread.

procedure Resume;

Description

Should be called from another thread.

See also: OnResume event, Suspend method.


TKOLTimer.Suspend
TKOLThread.Suspend

TKOLThread

Suspends executing thread.

procedure Suspend;

Description

Can be called from thread itself.

See also: OnSuspend event, Resume method.


TKOLTimer.Synchronize
TKOLThread.Synchronize

TKOLThread

Allows to call some code in main thread, and wait while it is executed.

type

  TThreadMethod = procedure of object;

procedure Synchronize( Method: TThreadMethod );

Description

Introduced to be called from thread itself to execute some code in main thread, and to wait its execution. When threaded code should work with main thread objects (e.g. with controls), such code always must be called through this method.


TKOLTimer.Terminate
TKOLThread.Terminate

TKOLThread

Terminates thread.

procedure Resume;

Description

Unlike VCL's thread object Terminate method, terminates thread immediately. This may be unsafe. Avoid using this method whenever possible. Normal finishing of thread should be done by checking some conditions in thread itself, and by exiting from Execute overriden method (for objects derived from TThread) or from OnExecute event handler (if an instance of TThread object is used).


TKOLTimer.WaitFor
TKOLThread.WaitFor

TKOLThread

Waits for finishing thread.

function WaitFor: Integer;

Description


	TKOLMainMenu component
Hierarchy	Properties	Events	Constructor	Methods

TKOLMainMenu is a mirror of menu object, implementing main menu.

Unit

mckobjs

Description

In KOL, the same object type TMenu can implement main menu and popup menu. At design time, two different mirror classes are made for your convenience.

See also: TKOLPopupMenu mirror component.


KOL TMenu constructor
KOL TMenu constructor function

TKOLMainMenu	TKOLPopupMenu

Following functions can be used to create KOL TMenu object at run time:

type

  TOnMenuItem = procedure( Sender : PMenu; Item : Integer ) of object;

function NewMenu( AParent : PControl; FirstCmd : Integer; const Template : array of PChar; aOnMenuItem: TOnMenuItem ): PMenu;

function NewMenuEx( AParent : PControl; FirstCmd : Integer; const Template : array of PChar; aOnMenuItems: array of TOnMenuItem ): PMenu;


TKOLMainMenu properties

TKOLMainMenu	Legend

In TKOLMainMenu

 	ByAccel

 	Count

 	FirstCommand

 	Handle

ItemAccelerator

ItemBitmap

ItemChecked

ItemEnabled

 	ItemHandle

ItemText

ItemVisible

 	Owner

showShortcuts

in TComponent

Name


TKOLMainMenu.ByAccel

TKOLMainMenu

TRUE, if menu item was clicked by accelerator key combination.

property ByAccel: Boolean;

Description

Use this property in OnMenuItem, Item.OnMenu events to determine if menu item was clicked using keyboard key accelerator assigned.


TKOLMainMenu.Count

TKOLMainMenu

Total count of items in menu.

property Count: Integer;

Description


TKOLMainMenu.FirstCommand

TKOLMainMenu

First menu item ID.

property FirstCommand: Integer;

Description


TKOLMainMenu.Handle

TKOLMainMenu

Handle of menu.

property Handle: HMenu;

Description


TKOLMainMenu.ItemAccelerator
TKOLMainMenu.ItemAccelerator[ ]

TKOLMainMenu

Menu item keyboard key accelerator.

type

  TMenuAccelerator = packed Record

    fVirt: Byte;	{ or-combination of FSHIFT, FCONTROL, FALT, FVIRTKEY, FNOINVERT }

    Key: Word;	{ character or virtual key code (FVIRTKEY flag is present above) }

    Hidden: Byte;	{ used to save visibility of menu item flag (1 - Hidden, 0 - Visible) }

  end;

property ItemAccelerator[ Idx: Integer ]: TMenuAccelerator;

Description

At design time accelerators can be easy assigned to menu items in menu designer dialog. When an accelerator ir assigned at run time, visual indicating of such accelerator by adding text to menu item is not provided – do it by yourself, if this is necessary.

See also: MakeAccelerator global function.


TKOLMainMenu.ItemBitmap
TKOLMainMenu.ItemBitmap[ ]

TKOLMainMenu

Menu item bitmap.

property ItemBitmap[ Idx: Integer ]: HBitmap;

Description


TKOLMainMenu.ItemChecked
TKOLMainMenu.ItemChecked[ ]

TKOLMainMenu

Determines if menu item is checked.

property ItemChecked[ Idx: Integer ]: Boolean;

Description


TKOLMainMenu.ItemEnabled
TKOLMainMenu.ItemEnabled[ ]

TKOLMainMenu

Determines if menu item is enabled.

property ItemEnabled[ Idx: Integer ]: Boolean;

Description


TKOLMainMenu.ItemHandle
TKOLMainMenu.ItemHandle[ ]

TKOLMainMenu

Handle of menu item.

property ItemHandle[ Idx: Integer ]: HMenu;

Description


TKOLMainMenu.ItemText
TKOLMainMenu.ItemText[ ]

TKOLMainMenu

Text of menu item.

property ItemText[ Idx: Integer ]: String;

Description


TKOLMainMenu.ItemVisible
TKOLMainMenu.ItemVisible[ ]

TKOLMainMenu

Visibility of menu item.

property ItemVisible[ Idx: Integer ]: Boolean;

Description

Actually, menu item is removed from menu to make it invisible. And it is inserted again, when it is necessary to make it visible again.


TKOLMainMenu.Owner

TKOLMainMenu

Owner control (usually form object).

property Owner: PControl;

Description


TKOLMainMenu.showShortcuts

TKOLMainMenu

TRUE, if to show shortcuts.

property showShortcuts: Boolean;

Description

This is design-time only property. It affects only code generated to create menu object (be more exact, it determines if shortcut names will be added to string constants, passed to menu object constructor as menu item text). When menu items are added at run time, you should provide your own code, which adds such text, representing shortcuts in menu items text.

Shortcuts can be assigned at design time when you develop your menu object in designer. Or, at run time, it is possible to use <not finished>


TKOLMainMenu events

TKOLMainMenu

In TKOLMainMenu

OnMenuItem

Item.OnMenu

OnUncheckRadioItem

In TKOLTObj

OnDestroy


TKOLMainMenu.OnMenuItem

TKOLMainMenu

Occurs when (any) menu item is clicked (including clicking it by keyboard or shortcut).

type

  TOnMenuItem = procedure( Sender : PMenu; Item : Integer ) of object;

property OnMenuItem: TOnMenuItem;

Description

It is possible to assign separate event handler for every menu item at design time. See Item.OnMenu event definition.


TKOLMainMenu.Item.OnMenu

TKOLMainMenu

Occurs when certain menu item is clicked.

type

  TOnMenuItem = procedure( Sender : PMenu; Item : Integer ) of object;

property OnMenu: TOnMenuItem;

Description

It is possible to assign separate event handler for certain menu item at design time. Such event handlers are assigned when menu object is created in menu constructing function generated at design time. Even if such separate event handlers are assigned for some menu items, common OnMenuItem event is called therefore for items, which have no its own event hadlers assigned.


TKOLMainMenu.OnUncheckRadioItem

TKOLMainMenu

Occurs when radio item of the menu is unchecked (in result of checking another one).

type

  TOnMenuItem = procedure( Sender : PMenu; Item: Integer ) of object;

property OnMenuItem: TOnMenuItem;

Description


TKOLMainMenu methods

TKOLMainMenu

In KOL TMenu

AddItem

AssignBitmaps

AssignEvents

InsertItem

ParentItem

RadioCheck

In KOL TObj

Add2AutoFree

Add2AutoFreeEx

Create

 	Destroy

Free

 	Init

InstanceSize

RefDec

RefInc

VmtAddr


KOL TMenu.AddItem method
TKOL TMenu.AddItem method

TKOLMainMenu

Adds an item to the menu dynamically.

type

  TOnMenuItem = procedure( Sender : PMenu; Item : Integer ) of object;

  TMenuOption = (moDefault, moDisabled, moGrayed, moChecked, moCheckMark, moRadioMark, moSeparator, moBitmap, moSubMenu);

  TMenuOptions = set of TMenuOption;

function AddItem(Caption: PChar; Event: TOnMenuItem; Options: TMenuOptions): Integer;

Description


KOL TMenu.AssignBitmaps method
TKOL TMenu.AssignBitmaps method

TKOLMainMenu

Assigns bitmaps to given several items of a menu.

procedure AssignBitmaps( StartIdx: Integer; Bitmaps: array of HBitmap );

Description


KOL TMenu.AssignEvents method
TKOL TMenu.AssignEvents method

TKOLMainMenu

Assigns separate events to given several items of a menu.

procedure AssignEvents( StartIdx: Integer; Events: array of TOnMenuItem );

Description


KOL TMenu.InsertItem method
TKOL TMenu.InsertItem method

TKOLMainMenu

Inserts new item to the menu dynamically.

type

  TOnMenuItem = procedure( Sender : PMenu; Item : Integer ) of object;

  TMenuOption = (moDefault, moDisabled, moGrayed, moChecked, moCheckMark, moRadioMark, moSeparator, moBitmap, moSubMenu);

  TMenuOptions = set of TMenuOption;

function InsertItem(InsertBefore: Integer; Caption: PChar; Event: TOnMenuItem; Options: TMenuOptions): Integer;

Description


KOL TMenu.ParentItem method
TKOL TMenu.ParentItem method

TKOLMainMenu

Returns item, parent for given menu item.

function ParentItem( Idx: Integer ): Integer;

Description

Returns –1, if there are no parent item.


KOL TMenu.RadioCheck method
TKOL TMenu.RadioCheck method

TKOLMainMenu

Checks menu item, which is radio item rather then usual menu item or check item.

procedure RadioCheck( Idx: Integer );

Description


	TKOLPopupMenu component
Hierarchy	Properties	Events	Constructor	Methods

TKOLPopupMenu is a mirror of menu object, implementing popup menu.

Unit

mckobjs

Description

In KOL, the same object type TMenu can implement main menu and popup menu. At design time, two different mirror classes are made for your convenience.

See also: TKOLMainMenu mirror component.


TKOLObj

TKOLMainMenu


TKOLPopupMenu properties

TKOLPopupMenu	Legend

In TKOLMainMenu

 	ByAccel

 	Count

 	FirstCommand

 	Handle

ItemAccelerator

ItemBitmap

ItemChecked

ItemEnabled

 	ItemHandle

ItemText

ItemVisible

 	Owner

showShortcuts

in TComponent

Name


TKOLPopupMenu events

TKOLPopupMenu

In TKOLMainMenu

OnMenuItem

Item.OnMenu

OnUncheckRadioItem

In TKOLTObj

OnDestroy


TKOLPopupMenu methods

TKOLPopupMenu

In KOL TMenu, popup menu specific:

AutoPopup

Popup

PopupEx

In KOL TMenu

AddItem

AssignBitmaps

AssignEvents

InsertItem

ParentItem

RadioCheck

In KOL TObj

Add2AutoFree

Add2AutoFreeEx

Create

 	Destroy

Free

 	Init

InstanceSize

RefDec

RefInc

VmtAddr


KOL TMenu.AutoPopup method for popup menu
TKOL TMenu.AutoPopup method for popup menu

TKOLPopupMenu

Provides auto-popup for popup menu.

function AutoPopup: PMenu;

Description

Returns menu object iself (i.e. this method can be used in the same Pascal operator, where menu object is constructed).

This version of auto-popup menu implementation is not so useful. Use instead property popupMenu of TKOLControl descendant components in MCK projects. It is more convenient and allows to use the same popup menu for several controls at the same time.


KOL TMenu.Popup method for popup menu
TKOL TMenu. Popup method for popup menu

TKOLPopupMenu

Pops menu up.

procedure Popup( X, Y : Integer );

Description

X, Y coordinates are relative to upper left corner of screen.

See also: PopupEx method.


KOL TMenu.PopupEx method for popup menu
TKOL TMenu. PopupEx method for popup menu

TKOLPopupMenu

Pops menu up correctly even when its owner form is not visible.

procedure PopupEx( X, Y : Integer );

Description

X, Y coordinates are relative to upper left corner of screen.

This version of popup command is very useful to popup menu when its parent window is not visible (e.g., for such kinds of application, which always are invisible, and can be activated only using tray icon). PopupEx method provides correct tracking of menu disappearing when mouse is clicked anywhere else on screen, fixing strange menu behavior in some Windows versions (NT).

Actually, when PopupEx used, parent form is shown but outside of visible screen bounds, and when menu is disappearing, previous state of the form (visibility and position) are restored. If such solution is not satisfying you, this can be done something else (e.g., using region clipping, etc.)

See also: Popup method.


	TKOLOpenSaveDialog component
Hierarchy	Properties	Events	Constructor	Methods

TKOLOpenSaveDialog is a mirror of TOpenSaveDialog KOL object.

Unit

mckobjs

Description


KOL TOpenSaveDialog constructor
KOL TOpenSaveDialog object constructing function

TKOLOpenSaveDialog

Following function can be used to create KOL TOpenSaveDialog object at run time:

function NewOpenSaveDialog( const Title, StrtDir: String; Options: TOpenSaveOptions ): POpenSaveDialog;


TKOLOpenSaveDialog properties

TKOLOpenSaveDialog	Legend

In TKOLOpenSaveDialog

DefExtension

 	FileName

Filter

FilterIndex

InitialDir

OpenDialog

Options

Title

in TComponent

Name


TKOLOpenSaveDialog.DefExtension

TKOLOpenSaveDialog

Default extension ( without dot point, e.g., pas ).

property DefExtension: String;

Description


TKOLOpenSaveDialog.FileName
KOL TOpenSaveDialog.FileName

TKOLOpenSaveDialog

Selected file name.

property FileName: String;

Description


TKOLOpenSaveDialog.Filter

TKOLOpenSaveDialog

Filenames filter strings.

property Filter: String;

Description


TKOLOpenSaveDialog.FilterIndex

TKOLOpenSaveDialog

Index of filename filter used by default.

property FilterIndex: Integer;

Description


TKOLOpenSaveDialog.InitialDir

TKOLOpenSaveDialog

Initial directory.

property InitialDir: String;

Description


TKOLOpenSaveDialog.OpenDialog

TKOLOpenSaveDialog

TRUE, if dialog is for open files.

property InitialDir: String;

Description


TKOLOpenSaveDialog.Options

TKOLOpenSaveDialog

Options.

type

  TOpenSaveOption = ( OSCreatePrompt,

                      OSExtensionDiffent,

                      OSFileMustExist,

                      OSHideReadonly,

                      OSNoChangedir,

                      OSNoReferenceLinks,

                      OSAllowMultiSelect,

                      OSNoNetworkButton,

                      OSNoReadonlyReturn,

                      OSOverwritePrompt,

                      OSPathMustExist,

                      OSReadonly );

  TOpenSaveOptions = set of TOpenSaveOption;

property Options : TOpenSaveOptions;

Description


TKOLOpenSaveDialog.Title

TKOLOpenSaveDialog

Dialog window title.

property Title: String;

Description


TKOLOpenSaveDialog events

TKOLOpenSaveDialog

In TKOLTObj

OnDestroy


KOL TOpenSaveDialog methods

TKOLOpenSaveDialog

In KOL TOpenSaveDialog

Execute	Legend

In KOL TObj

Add2AutoFree

Add2AutoFreeEx

Create

 	Destroy

Free

 	Init

InstanceSize

RefDec

RefInc

VmtAddr


KOL TOpenSaveDialog.Execute
KOL TOpenSaveDialog.Execute method

TKOLOpenSaveDialog

Executes dialog, returns TRUE, if success.

function Execute : Boolean;

Description


	TKOLOpenDirDialog component
Hierarchy	Properties	Events	Constructor	Methods

TKOLOpenDirDialog is a mirror of TOpenDirDialog KOL object.

Unit

mckobjs

Description


KOL TOpenDirDialog constructor
KOL TOpenSaveDialog object constructing function

TKOLOpenDirDialog

Following function can be used to create KOL TOpenDirDialog object at run time:

function NewOpenDirDialog( const Title: String; Options: TOpenDirOptions ): POpenDirDialog;


TKOLOpenDirDialog properties

TKOLOpenDirDialog	Legend

In TKOLOpenDirDialog

CenterOnScreen

InitialPath

Options

 	Path

Title

in TComponent

Name


TKOLOpenDirDialog.CenterOnScreen

TKOLOpenDirDialog

Determines, if to center dialog on screen.

property CenterOnScreen: Boolean;

Description


TKOLOpenDirDialog.InitialPath

TKOLOpenDirDialog

Initial path.

property InitialPath: String;

Description


TKOLOpenDirDialog.Options

TKOLOpenDirDialog

Options.

type

  TOpenDirOption = ( odBrowseForComputer, odBrowseForPrinter, odDontGoBelowDomain, odOnlyFileSystemAncestors, odOnlySystemDirs, odStatusText );

  TOpenDirOptions = set of TOpenDirOption;

property InitialPath: String;

Description


TKOLOpenDirDialog.Path

TKOLOpenDirDialog

Path, selected(if any) in result of executing of the dialog.

property Path: String;

Description


TKOLOpenDirDialog.Title

TKOLOpenDirDialog

Title, shown under dialog title (title itself can not be changed).

property Title: String;

Description


TKOLOpenDirDialog events

TKOLOpenDirDialog

In TKOLOpenDirDialog

OnSelChanged

In TKOLTObj

OnDestroy


TKOLOpenDirDialog.OnSelChanged
TKOLOpenDirDialog.OnSelChange

TKOLOpenDirDialog

Occurs when selection is changed in directories tree.

type

  TOnODSelChange = procedure( Sender: POpenDirDialog; NewSelDir: PChar; var EnableOK: Integer; var StatusText: String ) of object;

property OnSelChanged: TOnODSelChange;

Description


KOL TOpenDirDialog methods

TKOLOpenDirDialog	Legend

In KOL TOpenDirDialog

Execute

In KOL TObj

Add2AutoFree

Add2AutoFreeEx

Create

 	Destroy

Free

 	Init

InstanceSize

RefDec

RefInc

VmtAddr


KOL TOpenDirDialog.Execute
KOL TOpenDirDialog.Execute method

TKOLOpenDirDialog

Executes dialog, returns TRUE, if success.

function Execute : Boolean;

Description


	TKOLColorDialog component
Hierarchy	Properties	Events	Constructor	Methods

TKOLColorDialog is a mirror for TColorDialog KOL object.

Unit

mckobjs

Description


KOL TColorDialog constructor
KOL TColorDialog object constructing function

TKOLColorDialog

Following function can be used to create KOL TColorDialog object at run time:

type

  TColorCustomOption = ( ccoFullOpen, ccoShortOpen, ccoPreventFullOpen );

function NewColorDialog( FullOpen: TColorCustomOption ): PColorDialog;


TKOLColorDialog properties

TKOLColorDialog	Legend

In TKOLColorDialog

Color

ColorCustomOption

CustomColorXX

CustomColors

OwnerWindow

in TComponent

Name


TKOLColorDialog.Color

TKOLColorDialog

Selected color.

property Color: TColor;

Description


TKOLColorDialog. ColorCustomOption

TKOLColorDialog

Defines, if to allow select custom color, and if yes, whether to show custom colors pane by default.

type

TColorCustomOption = ( ccoFullOpen, ccoShortOpen, ccoPreventFullOpen );

property ColorCustomOption: TColorCustomOption;

Description


TKOLColorDialog. CustomColorXX

TKOLColorDialog

Array of custom colors.

property CustomColorN: TColor;

(N = 1..16)

Description

This is design-time only property. At run time, it is available as CustomColors array property.


TKOLColorDialog.CustomColors[ ]
TKOLColorDialog.CustomColors

TKOLColorDialog

16 custom colors.

CustomColors: array[ 1..16 ] of TColor;

Description


TKOLColorDialog.OwnerWindow

TKOLColorDialog

Owner window for a dialog.

property OwnerWindow: HWnd;

Description


TKOLColorDialog events

TKOLColorDialog

In TKOLTObj

OnDestroy


KOL TColorDialog methods

TKOLColorDialog	Legend

In KOL TColorDialog

Execute

In KOL TObj

Add2AutoFree

Add2AutoFreeEx

Create

 	Destroy

Free

 	Init

InstanceSize

RefDec

RefInc

VmtAddr


KOL TColorDialog.Execute
KOL TColorDialog.Execute method

TKOLColorDialog

Executes dialog, returns TRUE, if success.

function Execute : Boolean;

Description


	TKOLImageList component
Hierarchy	Properties	Events	Constructor	Methods

TKOLImageList is a mirror for TImageList KOL object.

Unit

mckobjs

Description


KOL TImageList constructor
KOL TImageList object constructing function

TKOLImageList

Following function can be used to create KOL TImageList object at run time:

function NewImageList( AOwner: PControl ): PImageList;


TKOLImageList properties

TKOLImageList	Legend

In TKOLImageList

AllocBy

bitmap

BkColor

BlendColor

Colors

Count

DrawingStyle

Handle

ImgHeight

ImgWidth

 	Mask

Masked

Overlay

ShareImages

systemimagelist

TransparentColor

in TComponent

Name


TKOLImageList.AllocBy

TKOLImageList

Allocation factor.

property AllocBy: Integer;

Description

Default is 1. Set it to size of ImageList if this value is known - to optimize speed of allocation, when new images are adding.

See also: Add, AddMasked methods


TKOLImageList.bitmap

TKOLImageList

Bitmap, containing all images from image list.

property bitmap: TBitmap;

Description

This is design-time only property. This property allows to use another graphic tools than suggested component editor (based on standard VCL image list editor).


TKOLImageList.BkColor

TKOLImageList

Background color, used to draw images from image list.

property BkColor: TColor;

Description

This color is used, when images are drawn non-transparently.

See also: Draw method, DrawingStyle property.


TKOLImageList.BlendColor

TKOLImageList

Blend color to mix it with image while drawing images from image list.

property BlendColor: TColor;

Description

This color is used, when images are drawing to mix it with the image.

See also: Draw method, DrawingStyle property.


TKOLImageList.Colors

TKOLImageList

Colors set, used to store images.

type

  TImageListColors = ( ilcDefault, ilcColor4, ilcColor8, ilcColor16, ilcColor24, ilcColor32, ilcColorDDB );

property Colors: TImageListColors;

Description

This colors are used to store image list bitmap.


TKOLImageList.Count

TKOLImageList

Count of images in image list.

type

  TImageListColors = ( ilcDefault, ilcColor4, ilcColor8, ilcColor16, ilcColor24, ilcColor32, ilcColorDDB );

property Count: Integer;

Description


TKOLImageList.DrawingStyle

TKOLImageList

Drawing styles.

type

  TDrawingStyles = ( dsBlend25, dsBlend50, dsMask, dsTransparent );

  TDrawingStyle = Set of TDrawingStyles;

property DrawingStyle: TDrawingStyle;

Description

See also: Draw method.


TKOLImageList.Handle

TKOLImageList

Image list handle.

property Handle: THandle;

Description


TKOLImageList.ImgHeight

TKOLImageList

Image height for images in the image list.

property ImgHeight: Integer;

Description


TKOLImageList.ImgWidth

TKOLImageList

Image width for images in the image list.

property ImgWidth: Integer;

Description


KOL TImageList.Mask
TKOLImageList.Mask

TKOLImageList

Mask bitmap for all images in image list.

property Mask: HBitmap;

Description


KOL TImageList.Masked
TKOLImageList.Masked

TKOLImageList

TRUE when image list is masked, i.e. special monochrome mask bitmap of the same size as bitmap, containing image list images, is stored internally to provide correct transparent drawing of images.

property Masked: Boolean;

Description


KOL TImageList.Overlay
TKOLImageList.Overlay

TKOLImageList

Array of indeces to images in image list, which can be used as overlay images to draw it transpaarently over other images from the image list.

property Overlay[ Idx: 1..15]: Integer;

Description

This array defines, which images from image list can be used to draw it over others (as overlay images).


KOL TImageList.ShareImages
TKOLImageList.ShareImages

TKOLImageList

Determines, if images are shared (so image list Windows Handle can not be released, when KOL TImageList object is destroyed).

property ShareImages: Boolean;

Description

See also: systemimagelist property, LoadSystemIcons method.


KOL TImageList.systemimagelist
TKOLImageList.systemimagelist

TKOLImageList

Determines, if the image list is used to access system image list.

property systemimagelist: Boolean;

Description

<not finished>

See also: ShareImages property, LoadSystemIcons method.


KOL TImageList.TransparentColor
TKOLImageList.TransparentColor

TKOLImageList

Color, which is interpreted as transparent in image list bitmap..

property TransparentColor: TColor;

Description


TKOLImageList events

TKOLImageList

In TKOLTObj

OnDestroy


KOL TImageList methods

TKOLImageList	Legend

In KOL TImageList

Add

AddMasked

AddIcon

Clear

Delete

Draw

ExtractIcon

ExtractIconEx

ImgRect

LoadBitmap

LoadFromFile

LoadSystemIcons

Merge

Replace

StretchDraw

In KOL TObj

Add2AutoFree

Add2AutoFreeEx

Create

 	Destroy

Free

 	Init

InstanceSize

RefDec

RefInc

VmtAddr


KOL TImageList.Add
KOL TImageList.Add method

TKOLImageList

Adds an image to the image list.

function Add( Bmp, Msk : HBitmap ) : Integer;

Description


KOL TImageList.AddMasked
KOL TImageList.AddMasked method

TKOLImageList

Adds bitmap to the image list, assuming that given color is transparent in the bitmap.

function AddMasked( Bmp : HBitmap; Color : TColor ) : Integer;

Description


KOL TImageList.AddIcon
KOL TImageList.AddIcon method

TKOLImageList

Adds an icon to the image list.

function AddIcon( Ico : HIcon ) : Integer;

Description


KOL TImageList.Clear
KOL TImageList.Clear method

TKOLImageList

Clears image list.

procedure Clear;

Description


KOL TImageList.Delete
KOL TImageList.Delete method

TKOLImageList

Deletes an image from image list.

procedure Delete( Idx : Integer );

Description


KOL TImageList.Draw
KOL TImageList.Draw method

TKOLImageList

Draws an image from image list to the device context.

procedure Draw( Idx : Integer; DC : HDC; X, Y : Integer );

Description


KOL TImageList.ExtractIcon
KOL TImageList.ExtractIcon method

TKOLImageList

Extracts an image from image list as icon.

function ExtractIcon( Idx : Integer ) : HIcon;

Description


KOL TImageList.ExtractIconEx
KOL TImageList.ExtractIconEx method

TKOLImageList

Extracts an image from image list as icon, using current DrawingStyle.

function ExtractIconEx( Idx : Integer ) : HIcon;

Description


KOL TImageList.ImgRect
KOL TImageList.ImgRect method

TKOLImageList

Returns rectangle, occupied by certain image in image list bitmap.

function ImgRect( Idx: Integer ) : TRect;

Description


KOL TImageList.LoadBitmap
KOL TImageList.LoadBitmap method

TKOLImageList

Loads entire image list bitmap from resource.

function LoadBitmap( ResourceName : PChar; TranspColor : TColor ) : Boolean;

Description


KOL TImageList.LoadFromFile
KOL TImageList.LoadFromFile method

TKOLImageList

Loads entire image list bitmap from file.

function LoadFromFile( FileName : PChar; TranspColor : TColor; ImgType : TImageType ) : Boolean;

Description


KOL TImageList.LoadSystemIcons
KOL TImageList.LoadSystemIcons method

TKOLImageList

Assigns image list to system icons list (big or small).

function LoadSystemIcons( SmallIcons : Boolean ) : Boolean;

Description


KOL TImageList.Merge
KOL TImageList.Merge method

TKOLImageList

Creates new image list, contains this bitmap and given ImgList2 merged.

function Merge( Idx : Integer; ImgList2 : PImageList; Idx2 : Integer; X, Y : Integer ): PImageList;

Description


KOL TImageList.Replace
KOL TImageList.Replace method

TKOLImageList

Replaces given (by index) image with bitmap and its mask with mask bitmap.

function Replace( Idx : Integer; Bmp, Msk : HBitmap ) : Boolean;

Description


KOL TImageList.StretchDraw
KOL TImageList.StretchDraw method

TKOLImageList

Draws an image from image list stretched to the device context.

procedure StretchDraw( Idx : Integer; DC : HDC; const Rect : TRect );

Description


	TKOLTrayIcon component
Hierarchy	Properties	Events	Constructor	Methods

TKOLTrayIcon is a mirror of KOL TTrayIcon object.

Unit

mckobjs

Description


KOL TTrayIcon constructors
KOL TTrayIcon constructor functions

TKOLTrayIcon

Following function can be used to create KOL TTrayIcon object at run time:

function NewTrayIcon( Wnd: PControl; Icon: HIcon ): PTrayIcon;


TKOLTrayIcon properties

TKOLTrayIcon	Legend

In TKOLTrayIcon

Active

AutoRecreate

Icon

Tooltip

in TComponent

Name


TKOLTrayIcon.Active

TKOLTrayIcon

TRUE, if tray icon is shown in tray.

property Active: Boolean;

Description


TKOLTrayIcon.AutoRecreate

TKOLTrayIcon

When TRUE, tray icon is capable to auto-recreate when task bar is re-created (usually in result of abnormal termination of MS Internet Explorer in Windows98/NT with IE 4.0 or higher installed).

property AutoRecreate: Boolean;

Description


TKOLTrayIcon.Icon

TKOLTrayIcon

Icon, shown on task bar (in tray area).

property Icon: TIcon;

property Icon: HIcon;

Description


TKOLTrayIcon.Tooltip

TKOLTrayIcon

Tooltip shown for tray icon.

property Tooltip: String;

Description

Tooltip string always cutted to 63 characters, because Windows does not support longer tooltips for tray icons.


TKOLTrayIcon events

TKOLTrayIcon

In TKOLTrayIcon

OnMouse

In TKOLTObj

OnDestroy


TKOLTimer.OnMouse
TKOLTrayIcon.OnMouse

TKOLTrayIcon

Occurs when mouse is moving or clicking over tray icon.

type

  TOnTrayIconMouse = procedure( Sender : TObject; Message : Word ) of object;

property OnMouse: TOnTrayIconMouse;

Description


KOL TTrayIcon methods

TKOLTrayIcon

In KOL TObj

Add2AutoFree

Add2AutoFreeEx

Create

 	Destroy

Free

 	Init

InstanceSize

RefDec

RefInc

VmtAddr