Please enable JavaScript to view this site.

KOL/MCK - User Guide

function NewTabControl( AParent: PControl; const Tabs: array of PKOLChar; Options: TTabControlOptions; ImgList: PImageList; ImgList1stIdx: Integer ): PControl;

Creates new tab control (like notebook).

 

function NewTabEmpty( AParent: PControl; Options: TTabControlOptions; ImgList: PImageList ): PControl;

Creates new empty tab control for using metods TC_Insert (to create Pages as Panel), or TC_InsertControl (if you want using your custom Pages).

 

To place child control on a certain page of TabControl, use property Pages[ Idx ], for example:

Label1 := NewLabel( TabControl1.Pages[ 0 ], 'Label1' );

 

To determine number of pages at run time, use property Count ;

to determine which page is currently selected (or to change selection), use property CurIndex ;

to feedback to switch between tabs assign your handler to OnSelChange event;

Note, that by default, tab control is created with a border lowered to tab control's parent. To remove it, you can apply WS_EX_TRANSPARENT extended style (see TControl.ExStyle property), but painting of some child controls can be strange a bit in this case (no border drawing for edit controls was found, but not always...). You can also apply style WS_THICKFRAME (TControl.Style property) to make the border raised.

 

Other methods and properties, suitable for tab control, are:

 

OnChange

property OnChange: TOnEvent;

IndexOf

function IndexOf( const S: KOLString ): Integer;

SearchFor

function SearchFor( const S: KOLString; StartAfter: Integer; Partial: Boolean ): Integer;

SetUnicode

function SetUnicode( Unicode: Boolean ): PControl;

TC_Insert

function TC_Insert( Idx: Integer; const TabText: KOLString; TabImgIdx: Integer ): PControl;

TC_Delete

procedure TC_Delete( Idx: Integer );

TC_InsertControl

procedure TC_InsertControl( Idx: Integer; const TabText: KOLString; TabImgIdx: Integer; Page: PControl );

TC_Remove

function TC_Remove( Idx: Integer ): PControl;

TC_SetPadding

procedure TC_SetPadding( cx, cy: Integer );

TC_TabAtPos

function TC_TabAtPos( x, y: Integer ): Integer;

TC_DisplayRect

function TC_DisplayRect: TRect;

TC_IndexOf

function TC_IndexOf( const S: KOLString ): Integer;

TC_SearchFor

function TC_SearchFor( const S: KOLString; StartAfter: Integer; Partial: Boolean ): Integer;

ImageListNormal

property ImageListNormal: PImageList;

Pages

property Pages[ Idx: Integer ]: PControl;

TC_Pages

property TC_Pages[ Idx: Integer ]: PControl;

TC_Items

property TC_Items[ Idx: Integer ]: KOLString;

TC_Images

property TC_Images[ Idx: Integer ]: Integer;

TC_ItemRect

property TC_ItemRect[ Idx: Integer ]: TRect;

 

KOL / MCK User Guide - Created by Carl Peeraer - Diamant Soft, based on the work of Vladimir Kladov - Artwerp.be

  

Keyboard Navigation

F7 for caret browsing
Hold ALT and press letter

This Info: ALT+q
Nav Header: ALT+n
Page Header: ALT+h
Topic Header: ALT+t
Topic Body: ALT+b
Exit Menu/Up: ESC