Please enable JavaScript to view this site.

KOL/MCK - User Guide

The next large group of objects are visual objects designed to represent a set of items (for example, lines of text) that can be manipulated through the corresponding General Items [] property. These can be windows for editing multi-line text, for viewing lists of texts, images, for presenting a line of buttons, etc.

 

The common set of properties, methods and events for all of these kinds of objects in TControl include:

 

Count - the number of items (lines in a multi-line input field - memo or rich edit, items in the list box, combo box and list view lists, top-level nodes in the tree view, pages in panels with tab controls, buttons in the tool bar) ;

Items[i] - access to the text of the element with index i (does not work for all list controls, for some of them - for example, list view - you need to use specialized properties);

ItemData[i] - access to an additional number or pointer associated with an element (not typical for all list controls);

IndexOf(s) - returns the index of elements with the specified text, or -1 if no such element was found;

SearchFor(s, i) - similar to the IndexOf function, finds an element containing the specified text, but the search starts from the element with index i;

Add(s) - adds a given string to the end of the "list" (just about the peculiarities of using for multi-line text input fields: the string must contain line termination characters # 13 # 10, otherwise, when the next lines are added, their text will be concatenated with the last line without moving to a new one string);

Insert(i, s) - inserts a new element with the specified text in the specified position of the "list";

Delete(i) - removes the element with index i;

Clear - clears the list of items (or text in the input field)

CurIndex - the current item in the list is also valid not for all list controls;

ItemSelected[i] - checks that the element is "selected" (typical for those list controls in which there is the concept of "selected element" or "set of selected elements");

OnMeasureItem - an event that allows you to set the dimensions (height) of an element in your handler. For more details, see below in the description of the controls for which this event works (list box, combo box, list view);

OnDrawItem - the event of drawing an item, allows you to set your own procedure for the image of a separate item in the list.

 

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