Please enable JavaScript to view this site.

KOL/MCK - User Guide

paintbox

 

Perhaps a paint box is an even simpler window object than a label or panel.

 

Constructor:

NewPaintBox(Parent)

 

It differs from other interface objects in that its text is not displayed in any way at runtime. This object is not intended to render anything on its own at all: the entire rectangle of its window (the size of which is the same as the client's size, that is, it does not even have a non-client part, or a border) must be drawn by your code in the OnPaint event (OnEraseBkgnd can also be used if needed). In general, if an OnPaint event handler is not assigned, the standard code will erase the rectangle (filled with a Color or Brush).

 

In both KOL and MCK, the paint box can be the parent of other controls. In fact, introducing a separate type of control for the paint box is redundant, since the panel may also have no border, and its image can also be painted in the OnPaint event. But it is more customary and more convenient to have a separate specialized object for drawing purposes.

 

In order to draw an image in the paint box control, it is enough to assign the OnPaint event and call the necessary methods of the picture object to paint on the canvas of our "box". This task is greatly simplified by a specially developed kind of control, which is called so - image show ("showing a picture", or "show a picture", whatever you like).

 

In MCK, the mirror for the paint box control is TKOLPaintBox.

 

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