Please enable JavaScript to view this site.

KOL/MCK - User Guide

splitter

 

Windows does not have a dedicated window that would deal with "splitting" adjacent elements. Nevertheless, such an element is widely used in applications when it is necessary to provide the user with the ability to dynamically change the width or height of one element due to the corresponding size of the adjacent visual element. Such an object is implemented simply as a regular panel with additional window message handlers that allow you to grab the object with the mouse and drag it to a new location (movement is allowed along one axis, only horizontally, or vertically). In this case, the "splitter" automatically resizes the shared visual elements.

 

Delimiter constructor:

NewSplitter(Parent, i, j

 

Creates an object of the PControl type with the separator functionality, assigning the values ​​i and j to the MinSizePrev and MinSizeNext properties. By default, no division axis is specified. The splitter object "learns" whether to split two adjacent windows vertically or horizontally when it gets the Align property equal to caLeft, caRight (separation of horizontally adjacent objects) or caTop, caBottom (vertical separation).

 

Properties and events:

 

MinSizePrev - the minimum size of the visual object "before" the separator. I put "before" in quotation marks, because the meaning of this definition depends on the alignment of the dividing window: for caLeft and caTop, "before" means to the left and above, and for caRight and caBottom - to the right and below;

MinSizeNext - the minimum size of the opposite of the two controls shared by the split object;

SecondControl - returns (and allows to set) the pointer of the visual object "after" the separator, the dimensions of which will be tightened when the location of the separator window is changed;

OnSplit - an event that is triggered every time when, in response to a signal about mouse movement (when dragging the separator), the object must make a decision about the admissibility of new coordinates (and, accordingly, new sizes of shared objects).

As you can see, this object is very simple. It is only intended to allow two (aligned) visuals to be resized by moving the border strip between them. If you need to have several such delimiters in a row (that is, in the form <window1> [separator] <window2> [separator] <window3>, then this object will not be able to function normally. In this case, make nested panels, and separate the parents, for example, according to the following scheme: <<> [] <>> [] <>.

 

MCK has a TKOLSplitter component that allows you to customize this type of window at design time.

 

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