TControl( unit KOL.pas ) ï TObj ï _TObj
TControl = object( TObj )
TControl is the basic visual object of KOL. And now, all visual objects have the same type PControl, differing only in "constructor", which during creating of object adjusts it so it can play role of desired control. Idea of incapsulating of all visual objects having the most common set of properties, is belonging to Vladimir Kladov, (C) 2000.
property Parent: PControl;
Parent of TParent object. Also must be of TParent type or derived from TParent.
property Enabled: Boolean;
Enabled usually used to decide if control can get keyboard focus
or been clicked by mouse.
property Visible: Boolean;
Obvious.
property ToBeVisible: Boolean;
Ñ
Returns True, if a control is supposed to be visible when its
form is showing. Thus is, True is returned if either control
is Visible or hidden, but marked with flag fCreateHidden.
property CreateVisible: Boolean;
False by default. If You want your form to be created visible and
flick due creation, set it to True. This does not affect size of
executable anyway.
property Align: TControlAlign;
Align style of a control. If this property is not used in your
application, there are no additional code added. Aligning of
controls is made in KOL like in VCL. To align controls when
initially create ones, use "transparent" function SetAlign
("transparent" means that it returns @Self as a result).
Note, that it is better not to align combobox caClient, caLeft or
caRight (better way is to place a panel with Border = 0 and
EdgeStyle = esNone, align it as desired and to place a combobox on it
aligning caTop or caBottom). Otherwise, big problems could be under
Win9x/Me, and some delay could occur under any other systems.
Do not attempt to align some kinds of controls (like combobox)
caLeft or caRight, this can cause infinite recursion.
property BoundsRect: TRect;
Bounding rectangle of the visual. Coordinates are relative
to top left corner of parent's ClientRect, or to top left corner
of screen (for TForm).
property Left: Integer;
Left horizontal position.
property Top: Integer;
Top vertical position.
property Width: Integer;
Width of TVisual object.
property Height: Integer;
Height of TVisual object.
property Position: TPoint;
Represents top left position of the object. See also BoundsRect.
property MinWidth: Integer;
Minimal width constraint.
property MinHeight: Integer;
Minimal height constraint.
property MaxWidth: Integer;
Maximal width constraint.
property MaxHeight: Integer;
Maximal height constraint.
property ClientWidth: Integer;
Obvious. Accessing this property, program forces window latent creation.
property ClientHeight: Integer;
Obvious. Accessing this property, program forces window latent creation.
property Windowed: Boolean;
Constantly returns True, if object is windowed (i.e. owns
correspondent window handle). Otherwise, returns False.
By now, all the controls are windowed (there are no controls in KOL, which are
emulating window, acually belonging to Parent - like TGraphicControl
in VCL).
Writing of this property provided only for internal purposes,
do not change it directly unless you understand well what you do.
property MDIClient: PControl;
Ñ
For MDI forms only: returns MDI client window control, containng all MDI
children. Use this window to send specific messages to rule MDI children.
property ChildCount: Integer;
Ñ
Returns number of commonly accessed child objects (without
MembersCount).
property Children[ Idx: Integer ]: PControl;
Ñ
Child items of TVisual object. Property is reintroduced here
to separate access to always visible Children[] from restricted
a bit Members[].
property MembersCount: Integer;
Ñ
Returns number of "internal" child objects, which are
not accessible through common Children[] property.
property Members[ Idx: Integer ]: PControl;
Ñ
Members and children array of the object (first from 0 to
MembersCount-1 are Members[], and Children[] are followed by
them. Usually You do not need to use this list. Use instead
Children[0..ChildCount] property, Members[] is intended for
internal needs of XCL (and in KOL by now Members and Children
actually are the same properties).
property WindowedParent: PControl;
Ñ
Returns nearest windowed parent, the same as Parent.
property ActiveControl: PControl;
property Handle: HWnd;
Ñ
Returns descriptor of system window object. If window is not yet
created, 0 is returned. To allocate handle, call CreateWindow method.
property ParentWindow: HWnd;
Ñ
Returns handle of parent window (not TControl object, but system
window object handle).
property ClsStyle: DWord;
Window class style. Available styles are:
CS_BYTEALIGNCLIENT | - Aligns the window's client area on the byte boundary (in the x direction) to enhance performance during drawing operations. |
CS_BYTEALIGNWINDOW | - Aligns a window on a byte boundary (in the x direction). |
CS_CLASSDC | - Allocates one device context to be shared by all windows in the class. |
CS_DBLCLKS | - Sends double-click messages to the window procedure when the user double-clicks the mouse while the cursor is within a window belonging to the class. |
CS_GLOBALCLASS |
- Allows an application to create a window of
the class regardless of the value of the hInstance parameter.
You can create a global class by creating the window class in a dynamic-link library (DLL) and listing the name of the DLL in the registry under specific keys. |
CS_HREDRAW | - Redraws the entire window if a movement or size adjustment changes the width of the client area. |
CS_NOCLOSE | - Disables the Close command on the System menu. |
CS_OWNDC | - Allocates a unique device context for each window in the class. |
CS_PARENTDC | - Sets the clipping region of the child window to that of the parent window so that the child can draw on the parent. |
CS_SAVEBITS | - Saves, as a bitmap, the portion of the screen image obscured by a window. Windows uses the saved bitmap to re-create the screen image when the window is removed. |
CS_VREDRAW | - Redraws the entire window if a movement or size adjustment changes the height of the client area. |
property Style: DWord;
Window styles. Available styles are:
WS_BORDER | Creates a window that has a thin-line border. |
WS_CAPTION | Creates a window that has a title bar (includes the WS_BORDER style). |
WS_CHILD | Creates a child window. This style cannot be used with the WS_POPUP style. |
WS_CHILDWINDOW | Same as the WS_CHILD style. |
WS_CLIPCHILDREN | Excludes the area occupied by child windows when drawing occurs within the parent window. This style is used when creating the parent window. |
WS_CLIPSIBLINGS | Clips child windows relative to each other; that is, when a particular child window receives a WM_PAINT message, the WS_CLIPSIBLINGS style clips all other overlapping child windows out of the region of the child window to be updated. If WS_CLIPSIBLINGS is not specified and child windows overlap, it is possible, when drawing within the client area of a child window, to draw within the client area of a neighboring child window. |
WS_DISABLED | Creates a window that is initially disabled. A disabled window cannot receive input from the user. |
WS_DLGFRAME | Creates a window that has a border of a style typically used with dialog boxes. A window with this style cannot have a title bar. |
WS_GROUP | Specifies the first control of a group of controls. The group consists of this first control and all controls defined after it, up to the next control with the WS_GROUP style. The first control in each group usually has the WS_TABSTOP style so that the user can move from group to group. The user can subsequently change the keyboard focus from one control in the group to the next control in the group by using the direction keys. |
WS_HSCROLL | Creates a window that has a horizontal scroll bar. |
WS_ICONIC | Creates a window that is initially minimized. Same as the WS_MINIMIZE style. |
WS_MAXIMIZE | Creates a window that is initially maximized. |
WS_MAXIMIZEBOX | Creates a window that has a Maximize button. Cannot be combined with the WS_EX_CONTEXTHELP style. The WS_SYSMENU style must also be specified. |
WS_MINIMIZE | Creates a window that is initially minimized. Same as the WS_ICONIC style. |
WS_MINIMIZEBOX | Creates a window that has a Minimize button. Cannot be combined with the WS_EX_CONTEXTHELP style. The WS_SYSMENU style must also be specified. |
WS_OVERLAPPED | Creates an overlapped window. An overlapped window has a title bar and a border. Same as the WS_TILED style. |
WS_OVERLAPPEDWINDOW | Creates an overlapped window with the WS_OVERLAPPED, WS_CAPTION, WS_SYSMENU, WS_THICKFRAME, WS_MINIMIZEBOX, and WS_MAXIMIZEBOX styles. Same as the WS_TILEDWINDOW style. |
WS_POPUP | Creates a pop-up window. This style cannot be used with the WS_CHILD style. |
WS_POPUPWINDOW | Creates a pop-up window with WS_BORDER, WS_POPUP, and WS_SYSMENU styles. The WS_CAPTION and WS_POPUPWINDOW styles must be combined to make the window menu visible. |
WS_SIZEBOX | Creates a window that has a sizing border. Same as the WS_THICKFRAME style. |
WS_SYSMENU | Creates a window that has a window-menu on its title bar. The WS_CAPTION style must also be specified. |
WS_TABSTOP | Specifies a control that can receive the keyboard focus when the user presses the TAB key. Pressing the TAB key changes the keyboard focus to the next control with the WS_TABSTOP style. |
WS_THICKFRAME | Creates a window that has a sizing border. Same as the WS_SIZEBOX style. |
WS_TILED | Creates an overlapped window. An overlapped window has a title bar and a border. Same as the WS_OVERLAPPED style. |
WS_TILEDWINDOW | Creates an overlapped window with the WS_OVERLAPPED, WS_CAPTION, WS_SYSMENU, WS_THICKFRAME, WS_MINIMIZEBOX, and WS_MAXIMIZEBOX styles. Same as the WS_OVERLAPPEDWINDOW style. |
WS_VISIBLE | Creates a window that is initially visible. |
WS_VSCROLL | Creates a window that has a vertical scroll bar. |
property ExStyle: DWord;
Extra window styles. Available flags are following:
WS_EX_ACCEPTFILES | Specifies that a window created with this style accepts drag-drop files. |
WS_EX_APPWINDOW | Forces a top-level window onto the taskbar when the window is minimized. |
WS_EX_CLIENTEDGE | Specifies that a window has a border with a sunken edge. |
WS_EX_CONTEXTHELP | Includes a question mark in the title bar of the window. When the user clicks the question mark, the cursor changes to a question mark with a pointer. If the user then clicks a child window, the child receives a WM_HELP message. The child window should pass the message to the parent window procedure, which should call the WinHelp function using the HELP_WM_HELP command. The Help application displays a pop-up window that typically contains help for the child window.WS_EX_CONTEXTHELP cannot be used with the WS_MAXIMIZEBOX or WS_MINIMIZEBOX styles. |
WS_EX_CONTROLPARENT | Allows the user to navigate among the child windows of the window by using the TAB key. |
WS_EX_DLGMODALFRAME | Creates a window that has a double border; the window can, optionally, be created with a title bar by specifying the WS_CAPTION style in the dwStyle parameter. |
WS_EX_LEFT | Window has generic "left-aligned" properties. This is the default. |
WS_EX_LEFTSCROLLBAR | If the shell language is Hebrew, Arabic, or another language that supports reading order alignment, the vertical scroll bar (if present) is to the left of the client area. For other languages, the style is ignored and not treated as an error. |
WS_EX_LTRREADING | The window text is displayed using Left to Right reading-order properties. This is the default. |
WS_EX_MDICHILD | Creates an MDI child window. |
WS_EX_NOPARENTNOTIFY | Specifies that a child window created with this style does not send the WM_PARENTNOTIFY message to its parent window when it is created or destroyed. |
WS_EX_OVERLAPPEDWINDOW | Combines the WS_EX_CLIENTEDGE and WS_EX_WINDOWEDGE styles. |
WS_EX_PALETTEWINDOW | Combines the WS_EX_WINDOWEDGE, WS_EX_TOOLWINDOW, and WS_EX_TOPMOST styles. |
WS_EX_RIGHT | Window has generic "right-aligned" properties. This depends on the window class. This style has an effect only if the shell language is Hebrew, Arabic, or another language that supports reading order alignment; otherwise, the style is ignored and not treated as an error. |
WS_EX_RIGHTSCROLLBAR | Vertical scroll bar (if present) is to the right of the client area. This is the default. |
WS_EX_RTLREADING | If the shell language is Hebrew, Arabic, or another language that supports reading order alignment, the window text is displayed using Right to Left reading-order properties. For other languages, the style is ignored and not treated as an error. |
WS_EX_STATICEDGE | Creates a window with a three-dimensional border style intended to be used for items that do not accept user input. |
WS_EX_TOOLWINDOW | Creates a tool window; that is, a window intended to be used as a floating toolbar. A tool window has a title bar that is shorter than a normal title bar, and the window title is drawn using a smaller font. A tool window does not appear in the taskbar or in the dialog that appears when the user presses ALT+TAB. |
WS_EX_TOPMOST | Specifies that a window created with this style should be placed above all non-topmost windows and should stay above them, even when the window is deactivated. To add or remove this style, use the SetWindowPos function. |
WS_EX_TRANSPARENT | Specifies that a window created with this style is to be transparent. That is, any windows that are beneath the window are not obscured by the window. A window created with this style receives WM_PAINT messages only after all sibling windows beneath it have been updated. |
WS_EX_WINDOWEDGE | Specifies that a window has a border with a raised edge. |
property Cursor: HCursor;
Current cursor. For most of controls, sets initially to IDC_ARROW. See
also ScreenCursor.
property Icon: HIcon;
Icon. By default, icon of the Applet is used. To load icon from the
resource, use IconLoad or IconLoadCursor method - this is more correct, because
in such case a special flag is set to prevent attempts to destroy
shared icon object in the destructor of the control.
property Menu: HMenu;
Menu (or ID of control - for standard GUI controls).
property HelpContext: Integer;
Help context.
property HelpPath: KOLString;
Property of a form or an Applet. Change it to provide custom path to
WinHelp format help file. If HtmlHelp used, call global procedure
AssignHtmlHelp instead.
property Caption: KOLString;
Caption of a window. For standard Windows buttons, labels and so on
not a caption of a window, but text of the window.
property Text: KOLString;
The same as Caption. To make more convenient with Edit controls. For
Rich Edit control, use property RE_Text.
property SelStart: Integer;
Start of selection (editbox - character position).
property SelLength: Integer;
Length of selection (editbox - number of characters selected, multiselect
listbox or listview - number of items selected).
Note, that for combobox and single-select listbox it always returns 0
(though for single-select listview, returns 1, if there is an item
selected).
It is possible to set SelLength only for memo and richedit controls.
property Selection: KOLString;
Selected text (editbox, richedit) as string. Can be useful to replace
selection. For rich edit, use RE_Text[ reText, TRUE ], if you want to
read correctly characters from another locale then ANSI only.
property CurIndex: Integer;
Index of current item (for listbox, combobox) or button index pressed
or dropped down (for toolbar button, and only in appropriate event
handler call).
You cannot use it to set or remove a selection in a multiple-selection
list box, so you should set option loNoExtendSel to true.
In OnClick event handler, CurIndex has not yet changed for listbox or combobox.
Use OnSelChange to respond to selection changes.
property Count: Integer;
Number of items (listbox, combobox, listview) or lines (multiline
editbox, richedit control) or buttons (toolbar). It is possible to
assign a value to this property only for listbox control with loNoData
style and for list view control with lvoOwnerData style (virtual list
box and list view).
property Items[ Idx: Integer ]: KOLString;
Obvious. Used with editboxes, listbox, combobox. With list view, use
property LVItems instead.
property ItemSelected[ ItemIdx: Integer ]: Boolean;
Returns True, if a line (in editbox) or an item (in listbox, combobox,
listview) is selected.
Can be set only for listboxes. For listboxes, which are not multiselect, and
for combo lists, it is possible only to set to True, to change selection.
property ItemData[ Idx: Integer ]: DWORD;
Access to user-defined data, associated with the item of a list box and
combo box.
property DroppedWidth: Integer;
Allows to change width of dropped down items list for combobox (only!)
control.
property DroppedDown: Boolean;
Dropped down state for combo box. Set it to TRUE or FALSE to change
dropped down state.
property BitBtnDrawMnemonic: Boolean;
Set this property to TRUE to provide correct drawing of bit btn control
caption with '&' characters (to remove such characters, and underline
follow ones).
property TextShiftX: Integer;
Horizontal shift for bitbtn text when the bitbtn is pressed.
property TextShiftY: Integer;
Vertical shift for bitbtn text when the bitbtn is pressed.
property BitBtnImgIdx: Integer;
BitBtn image index for the first image in list view, used as bitbtn
image. It is used only in case when BitBtn is created with bboImageList
option.
property BitBtnImgList: THandle;
BitBtn Image list. Assign image list handle to change it.
property DefaultBtn: Boolean;
Set this property to true to make control clicked when ENTER key is pressed.
This property uses OnMessage event of the parent form, storing it into
fOldOnMessage field and calling in chain. So, assign default button
after setting OnMessage event for the form.
property CancelBtn: Boolean;
Set this property to true to make control clicked when escape key is pressed.
This property uses OnMessage event of the parent form, storing it into
fOldOnMessage field and calling in chain. So, assign cancel button
after setting OnMessage event for the form.
property IgnoreDefault: Boolean;
Change this property to TRUE to ignore default button reaction on
press ENTER key when a focus is grabbed of the control. Default
value is different for different controls. By default, DefaultBtn
ignored in memo, richedit (even if read-only).
property Color: TColor;
Property Color is one of the most common for all visual
elements (like form, control etc.) Please note, that standard GUI button
can not change its color and the most characteristics of the Font. Also,
standard button can not become Transparent. Use bitbtn for such purposes.
Also, changing Color property for some kinds of control has no effect (rich edit,
list view, tree view, etc.). To solve this, use native (for such controls)
color property, or call Perform method with appropriate message to set the
background color.
property Font: PGraphicTool;
Ñ
If the Font property is not accessed, correspondent TGraphicTool object
is not created and its methods are not included into executable. Leaving
properties Font and Brush untouched can economy executable size a lot.
property Brush: PGraphicTool;
Ñ
If not accessed, correspondent TGraphicTool object is not created
and its methods are not referenced. See also note on Font property.
property Ctl3D: Boolean;
Inheritable from parent controls to child ones.
property Modal: Boolean;
Ñ
TRUE, if the form is shown modal.
property ModalForm: PControl;
Form currently shown modal from this form or from Applet.
property WindowState: TWindowState;
Window state.
property Canvas: PCanvas;
Ñ
Placeholder for Canvas: PCanvas. But in KOL, it is possible to
create applets without canvases at all. To do so, avoid using
Canvas and use DC directly (which is passed in OnPaint event).
property IsApplet: Boolean;
Ñ
Returns true, if the control is created using NewApplet (or CreateApplet).
property IsForm: Boolean;
Ñ
Returns True, if the object is form window.
property IsMDIChild: Boolean;
Ñ
Returns TRUE, if the object is MDI child form. In such case, IsForm also
returns TRUE.
property IsControl: Boolean;
Ñ
Returns True, is the control is control (not form or applet).
property IsButton: Boolean;
Ñ
Returns True, if the control is button-like or containing buttons (button,
bitbtn, checkbox, radiobox, toolbar).
property HasBorder: Boolean;
Obvious. Form-aware.
property HasCaption: Boolean;
Obvious. Form-aware.
property CanResize: Boolean;
Obvious. Form-aware.
property StayOnTop: Boolean;
Obvious. Form-aware, but can be applied to controls.
property Border: Integer;
Distance between edges and child controls and between child
controls by default (if methods PlaceRight, PlaceDown, PlaceUnder,
ResizeParent, ResizeParentRight, ResizeParentBottom are called).
Originally was named Margin, now I recommend to use the name 'Border' to
avoid confusion with MarginTop, MarginBottom, MarginLeft and
MarginRight properties.
Initial value is always 2. Border property is used in realigning
child controls (when its Align property is not caNone), and value
of this property determines size of borders between edges of children
and its parent and between aligned controls too.
See also properties MarginLeft, MarginRight, MarginTop, MarginBottom.
property Margin: Integer;
Old name for property Border.
property MarginTop: Integer;
Additional distance between true window client top and logical top of
client rectangle. This value is added to Top of rectangle, returning
by property ClientRect. Together with other margins and property Border,
this property allows to change view of form for case, that Align property
is used to align controls on parent (it is possible to provide some
distance from child controls to its parent, and between child controls.
Originally this property was introduced to compensate incorrect
ClientRect property, calculated for some types of controls.
See also properties Border, MarginBottom, MarginLeft, MarginRight.
property MarginBottom: Integer;
The same as MarginTop, but a distance between true window Bottom of
client rectangle and logical bottom one. Take in attention, that this value
should be POSITIVE to make logical bottom edge located above true edge.
See also properties Border, MarginTop, MarginLeft, MarginRight.
property MarginLeft: Integer;
The same as MarginTop, but a distance between true window Left of
client rectangle and logical left edge.
See also properties Border, MarginTop, MarginRight, MarginBottom.
property MarginRight: Integer;
The same as MarginLeft, but a distance between true window Right of
client rectangle and logical bottom one. Take in attention, that this value
should be POSITIVE to make logical right edge located left of true edge.
See also properties Border, MarginTop, MarginLeft, MarginBottom.
property Tabstop: Boolean;
True, if control can be focused using tabulating between controls.
Set it to False to make control unavailable for keyboard, but only
for mouse.
property TabOrder: Integer;
Order of tabulating of controls. Initially, TabOrder is equal to
creation order of controls. If TabOrder changed, TabOrder of
all controls with not less value of one is shifted up. To place
control before another, assign TabOrder of one to another.
For example:
Button1.TabOrder := EditBox1.TabOrder;
property Focused: Boolean;
True, if the control is current on form (but check also, what form
itself is focused). For form it is True, if the form is active (i.e.
it is foreground and capture keyboard). Set this value to True to make
control current and focused (if applicable).
property TextAlign: TTextAlign;
Text horizontal alignment. Applicable to labels, buttons,
multi-line edit boxes, panels.
property VerticalAlign: TVerticalAlign;
Text vertical alignment. Applicable to buttons, labels and panels.
property WordWrap: Boolean;
TRUE, if this is a label, created using NewWordWrapLabel.
property ShadowDeep: Integer;
Deep of a shadow (for label effect only, created calling NewLabelEffect).
property CannotDoubleBuf: Boolean;
property DoubleBuffered: Boolean;
Set it to true for some controls, which are flickering in repainting
(like label effect). Slow, and requires additional code. This property
is inherited by all child controls.
Note: RichEdit control can not become DoubleBuffered.
property Transparent: Boolean;
Set it to true to get special effects. Transparency also uses
DoubleBuffered and inherited by child controls.
Please note, that some controls can not be shown properly, when
Transparent is set to True for it. If You want to make edit control
transparent (e.g., over gradient filled panel), handle its OnChanged
property and call there Invalidate to provide repainting of edit
control content. Note also, that for RichEdit control property
Transparent has no effect (as well as DoubleBuffered). But special
property RE_Transparent is designed especially for RichEdit control
(it works fine, but with great number of flicks while resizing
of a control). Another note is about Edit control. To allow editing
of transparent edit box, it is necessary to invalidate it for
every pressed character. Or, use Ed_Transparent property instead.
property Ed_Transparent: Boolean;
Use this property for editbox to make it really Transparent. Remember,
that though Transparent property is inherited by child controls from
its parent, this is not so for Ed_Transparent. So, it is necessary to
set Ed_Transparent to True for every edit control explicitly.
property AlphaBlend: Byte;
If assigned to 0..254, makes window (form or control) semi-transparent
(Win2K only).
Depending on value assigned, it is possible to adjust transparency
level ( 0 - totally transparent, 255 - totally opaque).
property LookTabKeys: TTabKeys;
Set of keys which can be used as tabulation keys in a control.
property SubClassName: KOLString;
Name of window class - unique for every window class
in every run session of a program.
property CloseQueryReason: TCloseQueryReason;
Ñ
Reason why OnClose or OnQueryEndSession called.
property UpdateRgn: HRgn;
Ñ
A handle of update region. Valid only in OnPaint method. You
can use it to improve painting (for speed), if necessary. When
UpdateRgn is obtained in response to WM_PAINT message, value
of the property EraseBackground is used to pass it to the API
function GetUpdateRgn. If UpdateRgn = 0, this means that entire
window should be repainted. Otherwise, You (e.g.) can check
if the rectangle is in clipping region using API function
RectInRegion.
property EraseBackground: Boolean;
This value is used to pass it to the API function GetUpdateRgn,
when UpadateRgn property is obtained first in responce to WM_PAINT
message. If EraseBackground is set to True, system is responsible
for erasing background of update region before painting. If not
(default), the entire region invalidated should be painted by your
event handler.
property RightClick: Boolean;
Ñ
Use this property to determine which mouse button was clicked
(applicable to toolbar in the OnClick event handler).
property MinSizePrev: Integer;
Minimal allowed (while dragging splitter) size of previous control
for splitter (see NewSplitter).
property SplitMinSize1: Integer;
The same as MinSizePrev.
property MinSizeNext: Integer;
Minimal allowed (while dragging splitter) size of the rest of parent
of splitter or of SecondControl (see NewSplitter).
property SplitMinSize2: Integer;
The same as MinSizeNext.
property SecondControl: PControl;
Second control to check (while dragging splitter) if its size not less
than SplitMinSize2 (see NewSplitter). By default, second control is
not necessary, and needed only in rare case when SecondControl can not
be determined automatically to restrict splitter right (bottom) position.
property Dragging: Boolean;
Ñ
True, if splitter control is dragging now by user with left
mouse button. Also, this property can be used to detect if the control
is dragging with mouse (after calling DragStartEx method).
property ThreeButtonPress: Boolean;
Ñ
TRUE, if 3 button press detected. Check this flag in OnMouseDblClk event
handler. If 3rd button click is done for a short period of time after the
double click, the control receives OnMouseDblClk the second time and this
flag is set. (Applicable to the GDK and other Linux systems).
property MouseInControl: Boolean;
Ñ
This property can return True only if OnMouseEnter / OnMouseLeave
event handlers are set for a control (or, for BitBtn, property Flat
is set to True. Otherwise, False is returned always.
property Flat: Boolean;
Set it to True for BitBtn, to provide either flat border for a button
or availability of "highlighting" (correspondent to glyph index 4).
Note: this can work incorrectly a bit under win95 without comctl32.dll
updated. Therefore, application will launch. To enforce correct working
even under Win95, use your own timer, which event handler checks for
mouse over bitbtn control, e.g.:
procedure TForm1.Timer1Timer(Sender: PObj);
var P: TPoint;
begin
if not BitBtn1.MouseInControl then Exit;
GetCursorPos( P );
P := BitBtn1.Screen2Client( P );
if not PtInRect( BitBtn1.ClientRect, P ) then
begin
BitBtn1.Flat := FALSE;
BitBtn1.Flat := TRUE;
end;
end;
property Progress: Integer index(( PBM_SETPOS or $8000 ) shl 16 ) or PBM_GETPOS;
Only for ProgressBar.
property MaxProgress: Integer index(( PBM_SETRANGE32 or $8000 ) shl 16 ) or PBM_GETRANGE;
Only for ProgressBar. 100 is the default value.
property ProgressColor: TColor;
Only for ProgressBar.
property ProgressBkColor: TColor;
Obsolete. Now the same as Color.
property StatusText[ Idx: Integer ]: PKOLChar;
Only for forms to set/retrieve status text to/from given status panel.
Panels are enumerated from 0 to 254, 255 is to indicate simple
status bar. Size grip in right bottom corner of status window is
displayed only if form still CanResize.
When a status text is set first time, status bar window is created
(always aligned to bottom), and form is resizing to preset client height.
While status bar is showing, client height value is returned without
height of status bar. To remove status bar, call RemoveStatus method for
a form.
By default, text is left-aligned within the specified part of a status
window. You can embed tab characters (#9) in the text to center or
right-align it. Text to the right of a single tab character is centered,
and text to the right of a second tab character is right-aligned.
If You use separate status bar onto several panels, these automatically
align its widths to the same value (width divided to number of panels).
To adjust status panel widths for every panel, use property StatusPanelRightX.
property SimpleStatusText: PKOLChar;
Only for forms to set/retrive status text to/from simple status bar.
Size grip in right bottom corner of status window is displayed only
if form CanResize.
When status text set first time, (simple) status bar window is created
(always aligned to bottom), and form is resizing to preset client height.
While status bar is showing, client height value is returned without
height of status bar. To remove status bar, call RemoveStatus method for
a form.
By default, text is left-aligned within the specified part of a status
window. You can embed tab characters (#9) in the text to center or
right-align it. Text to the right of a single tab character is centered,
and text to the right of a second tab character is right-aligned.
property StatusCtl: PControl;
Ñ
Pointer to Status bar control. To "create" child controls on
the status bar, first create it as a child of form, for instance, and
then change its property Parent, e.g.:
var Progress1: PControl;
...
Progress1 := NewProgressBar( Form1 );
Progress1.Parent := Form1.StatusCtl;
Progress1 := NewProgressBar( Form );
Progress1.Parent := Form.StatusCtl;
property SizeGrip: Boolean;
Size grip for status bar. Has effect only before creating window.
property StatusPanelRightX[ Idx: Integer ]: Integer;
Use this property to adjust status panel right edges (if the status bar is
divided onto several subpanels). If the right edge for the last panel is
set to -1 (by default) it is expanded to the right edge of a form window.
Otherwise, status bar can be shorter then form width.
property StatusWindow: HWND;
Ñ
Provided for case if You want to use API direct message sending to
status bar.
property Color1: TColor;
Top line color for GradientPanel.
property Color2: TColor;
Bottom line color for GradientPanel, or shadow color for LabelEffect.
(If clNone, shadow color for LabelEffect is calculated as a mix bitween
TextColor and clBlack).
property GradientStyle: TGradientStyle;
Styles other then gsVertical and gsHorizontal has effect only for
gradient panel, created by NewGradientPanelEx.
property GradientLayout: TGradientLayout;
Has only effect for gradient panel, created by NewGradientPanelEx.
Ignored for styles gsVertical and gsHorizontal.
property ImageListSmall: PImageList;
Image list with small icons used with List View control. If not set,
last added (i.e. created with a control as an owner) image list with
small icons is used.
property ImageListNormal: PImageList;
Image list with normal size icons used with List View control (or with
icons for BitBtn, TreeView or TabControl). If not set,
last added (i.e. created with a control as an owner) image list is used.
property ImageListState: PImageList;
Image list used as a state images list for ListView or TreeView control.
property Pages[ Idx: Integer ]: PControl;
Ñ
Returns controls, which can be used as parent for controls, placed on
different pages of a tab control. Use it like in follows example:
Label1 := NewLabel( TabControl1.Pages[ 0 ], 'Label1' );
To find number of pages available, check out Count property of the tab
control. Pages are enumerated from 0 to Count - 1, as usual.
property TC_Pages[ Idx: Integer ]: PControl;
Ñ
The same as above.
property TC_Items[ Idx: Integer ]: KOLString;
Text, displayed on tab control tabs.
property TC_Images[ Idx: Integer ]: Integer;
Image index for a tab in tab control.
property TC_ItemRect[ Idx: Integer ]: TRect;
Ñ
Item rectangle for a tab in tab control.
property LVStyle: TListViewStyle;
ListView style of view. Can be changed at run time.
property LVOptions: TListViewOptions;
ListView options. Can be changed at run time.
property LVTextColor: TColor;
ListView text color. Use it instead of Font.Color.
property LVTextBkColor: TColor;
ListView background color for text.
property LVBkColor: TColor;
ListView background color. Use it instead of Color.
property LVColCount: Integer;
Ñ
ListView (additional) column count. Value 0 means that there are
no columns (single item text / icon is used). If You want
to provide several columns, first call LVColAdd to "insert" column 0,
i.e. to provide header text for first column (with index 0).
If there are no column, nothing will be shown in lvsDetail /
lvsDetailNoHeader view style.
property LVColWidth[ Item: Integer ]: Integer;
Retrieves or changes column width. For lvsList view style, the same width
is returned for all columns (ColIdx is ignored). It is possible to use
special values to assign to a property:
LVSCW_AUTOSIZE - Automatically sizes the column
LVSCW_AUTOSIZE_USEHEADER - Automatically sizes the column to fit
the header text
To set coumn width in lvsList view mode, column index must be -1
(and Width to set must be in range 0..32767 always).
property LVColText[ Idx: Integer ]: KOLString;
Allows to get/change column header text at run time.
property LVColAlign[ Idx: Integer ]: TTextAlign;
Column text aligning.
property LVColImage[ Idx: Integer ]: Integer;
Only starting from comctrl32.dll of version 4.70 (IE4+). Allows to
set an image for list view column itself from the ImageListSmall.
property LVColOrder[ Idx: Integer ]: Integer;
Only starting from comctrl32.dll of version 4.70 (IE4+). Allows to
set visual order of the list view column from the ImageListSmall.
This value does not affect the index, by which the column is still
accessible in the column array.
property LVCount: Integer;
Returns item count for ListView control. It is possible to use Count
property instead when obtaining of item count is needed only. But this this
property allows also to set actual count of list view items when a list
view is virtual.
property LVCurItem: Integer;
Returns first selected item index in a list view. See also LVNextSelected,
LVNextItem and LVFocusItem functions.
property LVFocusItem: Integer;
Ñ
Returns focused item index in a list view. See also LVCurItem.
property LVItemState[ Idx: Integer ]: TListViewItemState;
Access to list view item states set [lvisBlend, lvisHighlight, lvisFocus,
lvisSelect]. When assign new value to the property, it is possible to use
special index value -1 to change state for all items for a list view
(but only when lvoMultiselect style is applied to the list view, otherwise
index -1 is referring to the last item of the list view).
property LVItemIndent[ Idx: Integer ]: Integer;
Item indentation. Indentation is calculated as this value multiplied to
image list ImgWidth value (Image list must be applied to list view).
Note: indentation supported only if IE3.0 or higher installed.
property LVItemStateImgIdx[ Idx: Integer ]: Integer;
Access to state image of the item. Use index -1 to assign the same state
image index to all items of the list view at once (fast).
Option lvoCheckBoxes just means, that 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. Value 0 allows to remove checkbox at all. So, to check all
added items by default (e.g.), do following:
ListView1.LVItemStateImgIdx[ -1 ] := 2;
Use 1-based index of the image
in image list ImageListState. Value 0 reserved to use as "no state image".
Values 1..15 can be used only - this is the Windows restriction on
state images.
property LVItemOverlayImgIdx[ Idx: Integer ]: Integer;
Access to overlay image of the item. Use index -1 to assign the same
overlay image to all items of the list view at once (fast).
property LVItemData[ Idx: Integer ]: DWORD;
Access to user defined data, assiciated with the item of the list view.
property LVSelCount: Integer;
Ñ
Returns number of items selected in listview.
property LVItemImageIndex[ Idx: Integer ]: Integer;
Image index of items in listview. When an item is created (using LVItemAdd
or LVItemInsert), image index 0 is set by default (not -1 like in VCL!).
property LVItems[ Idx, Col: Integer ]: KOLString;
Access to List View item text.
property LVItemPos[ Idx: Integer ]: TPoint;
Position of List View item (can be changed in icon or small icon view).
property LVTopItem: Integer;
Ñ
Returns index of topmost visible item of ListView in lvsList view style.
property LVPerPage: Integer;
Ñ
Returns the number of fully-visible items if successful. If the current
view is icon or small icon view, the return value is the total number
of items in the list view control.
property LVItemHeight: Integer;
property TVSelected: THandle;
Returns or sets currently selected item handle in tree view.
property TVDropHilighted: THandle;
Returns or sets item, which is currently highlighted as a drop target.
property TVDropHilited: THandle;
The same as TVDropHilighted.
property TVFirstVisible: THandle;
Returns or sets given item to top of tree view.
property TVIndent: Integer;
The amount, in pixels, that child items are indented relative to their
parent items.
property TVVisibleCount: Integer;
Ñ
Returns number of fully (not partially) visible items in tree view.
property TVRoot: THandle;
Ñ
Returns handle of root item in tree view (or 0, if tree is empty).
property TVItemChild[ Item: THandle ]: THandle;
Ñ
Returns first child item for given one.
property TVItemHasChildren[ Item: THandle ]: Boolean;
TRUE, if an Item has children. Set this value to true if you want to
force [+] sign appearing left from the node, even if there are no
subnodes added to the node yet.
property TVItemChildCount[ Item: THandle ]: Integer;
Ñ
Returns number of node child items in tree view.
property TVItemNext[ Item: THandle ]: THandle;
Ñ
Returns next sibling item handle for given one (or 0, if passed item is
the last child for its parent node).
property TVItemPrevious[ Item: THandle ]: THandle;
Ñ
Returns previous sibling item (or 0, if the is no such item).
property TVItemNextVisible[ Item: THandle ]: THandle;
Ñ
Returns next visible item (passed item must be visible too, to determine,
if it is really visible, use property TVItemRect or TVItemVisible.
property TVItemPreviousVisible[ Item: THandle ]: THandle;
Ñ
Returns previous visible item.
property TVItemParent[ Item: THandle ]: THandle;
Ñ
Returns parent item for given one (or 0 for root item).
property TVItemText[ Item: THandle ]: KOLString;
Text of tree view item.
property TVItemRect[ Item: THandle; TextOnly: Boolean ]: TRect;
Ñ
Returns rectangle, occupied by an item in tree view.
property TVItemVisible[ Item: THandle ]: Boolean;
Returs True, if item is visible in tree view. It is also possible to
assign True to this property to ensure that a tree view item is visible
(if False is assigned, this does nothing).
property TVRightClickSelect: Boolean;
Set this property to True to allow change selection to an item, clicked with right mouse button.
property TVEditing: Boolean;
Ñ
Returns True, if tree view control is editing its item label.
property TVItemBold[ Item: THandle ]: Boolean;
True, if item is bold.
property TVItemCut[ Item: THandle ]: Boolean;
True, if item is selected as part of "cut and paste" operation.
property TVItemDropHighlighted[ Item: THandle ]: Boolean;
True, if item is selected as drop target.
property TVItemDropHilited[ Item: THandle ]: Boolean;
The same as TVItemDropHighlighted.
property TVItemExpanded[ Item: THandle ]: Boolean;
Ñ
True, if item's list of child items is currently expanded. To change
expanded state, use method TVExpand.
property TVItemExpandedOnce[ Item: THandle ]: Boolean;
Ñ
True, if item's list of child items has been expanded at least once.
property TVItemSelected[ Item: THandle ]: Boolean;
True, if item is selected.
property TVItemImage[ Item: THandle ]: Integer;
Image index for an item of tree view. To tell that there are no image
set, use index -2 (value -1 is reserved for callback image).
property TVItemSelImg[ Item: THandle ]: Integer;
Image index for an item of tree view in selected state. Use value -2 to
provide no image, -1 used for callback image.
property TVItemOverlay[ Item: THandle ]: Integer;
Overlay image index for an item in tree view.
Values 1..15 can be used only - this is the Windows restriction on
overlay images.
property TVItemStateImg[ Item: THandle ]: Integer;
State image index for an item in tree view. Use 1-based index of the image
in image list ImageListState. Value 0 reserved to use as "no state image".
property TVItemData[ Item: THandle ]: Pointer;
Stores any program-defined pointer with the item.
property CurItem: Integer;
Ñ
For toolbar, in OnClick event this property can be used to determine
which button was clicked (100-based button id in toolbar). It is also
possible to use CurIndex property (zero-based) for this purpose as
well, but do not assume, that CurItem always equal to CurIndex+100.
At least, it is possible to call TBItem2Index function to convert
button ID to its index in toolbar.
property TBButtonCount: Integer;
Ñ
Returns count of buttons on toolbar. The same as Count.
property TBBtnImgWidth: Integer;
Custom toolbar buttons width. Set it before assigning buttons bitmap.
Changing this property after assigning the bitmap has no effect.
property TBButtonEnabled[ BtnID: Integer ]: Boolean;
Obvious.
property TBButtonVisible[ BtnID: Integer ]: Boolean;
Allows to hide/show some of toolbar buttons.
property TBButtonChecked[ BtnID: Integer ]: Boolean;
Allows to determine 'checked' state of a button (e.g., radio-button),
and to check it programmatically.
property TBButtonMarked[ BtnID: Integer ]: Boolean;
Returns True if toolbar button is marked (highlighted). Allows to
highlight buttons assigning True to this value.
property TBButtonPressed[ BtnID: Integer ]: Boolean;
Allows to detrmine if toolbar button (given by its command ID) pressed,
and press/unpress it programmatically.
property TBButtonText[ BtnID: Integer ]: KOLString;
Obtains toolbar button text and allows to change it. Be sure that text
is not empty for all buttons, if You want for it to be shown (if at least
one button has empty text, no text labels will be shown at all). At
least set it to ' ' for buttons, which You do not want to show labels,
if You want from other ones to have it.
property TBButtonImage[ BtnID: Integer ]: Integer;
Allows to access/change button image. Do not read this property for
separator buttons, returning value is not proper. If you do not know,
is the button a separator, using function below.
property TBButtonRect[ BtnID: Integer ]: TRect;
Ñ
Obtains rectangle occupied by toolbar button in toolbar window.
(It is not possible to obtain rectangle for buttons, currently
not visible). See also function ToolbarButtonRect.
property TBButtonWidth[ BtnID: Integer ]: Integer;
Allows to obtain / change toolbar button width.
property TBButtonLParam[ const Idx: Integer ]: DWORD;
Allows to access/change LParam. Dufa
property TBButtonsMinWidth: Integer;
Allows to set minimal width for all toolbar buttons.
property TBButtonsMaxWidth: Integer;
Allows to set maximal width for all toolbar buttons.
property MaxTextSize: DWORD;
This property valid also for simple edit control, not only for RichEdit.
But for usual edit control, maximum text size available is 32K. For
RichEdit, limit is 4Gb. By default, RichEdit is limited to
32767 bytes (to set maximum size available to 2Gb, assign MaxInt value
to a property). Also, to get current text size of RichEdit, use property
TextSize or RE_TextSize[ ].
property TextSize: Integer;
Ñ
Common for edit and rich edit controls property, which returns size of
text in edit control. Also, for any other control (or form, or applet
window) returns size (in characters) of Caption or Text (what is, the
same property actually).
property RE_TextSize[ Units: TRichTextSize ]: Integer;
Ñ
For RichEdit control, it returns text size, measured in desired units
(rtsChars - characters, including OLE objects, counted as a single
character; rtsBytes - presize length of text image (if it would be stored
in file or stream). Please note, that for RichEdit1.0, only size in
characters can be obtained.
property RE_CharFmtArea: TRichFmtArea;
By default, this property is raSelection. Changing it, You determine in
for which area characters format is applyed, when changing
character formatting properties below (not paragraph formatting).
property RE_CharFormat: TCharFormat;
In differ to follow properties, which allow to control certain formatting
attributes, this property provides low level access for formatting current
character area (see RE_CharFmtArea). It returns TCharFormat structure,
filled in with formatting attributes, and by assigning another value to
this property You can change desired attributes as You wish. Even if
RichEdit1.0 is used, TCharFormat2 is returned (but extended fields are
ignored for RichEdit1.0).
property RE_Font: PGraphicTool;
Font of the first character in current selection (when retrieve).
When set (or subproperties of RE_Font are set), all font attributes are
applied to entire
area
. To apply only needed attributes, use another
properties: RE_FmtBold, RE_FmtItalic, RE_FmtStrikeout, RE_FmtUnderline,
RE_FmtName, etc.
Note, that font size is measured in twips, which is about 1/10 of pixel.
property RE_FmtBold: Boolean;
Formatting flag. When retrieve, returns True, if fsBold style RE_Font.FontStyle
is valid for a first character in the selection. When set, changes fsBold
style (True - set, False - reset) for all characters in
area
.
property RE_FmtBoldValid: Boolean;
Ñ
property RE_FmtItalic: Boolean;
Formatting flag. Like RE_FmtBold, when retrieving, shows, is fsItalic
style valid for the first character of the selection, and when set, changes
only fsItalic style for an
area
.
property RE_FmtItalicValid: Boolean;
Ñ
property RE_FmtStrikeout: Boolean;
Formatting flag. Like RE_FmtBold, when retrieving, shows, is fsStrikeout
style valid for the first selected character, and when set, changes only
fsStrikeout style for an
area
.
property RE_FmtStrikeoutValid: Boolean;
Ñ
property RE_FmtUnderline: Boolean;
Formatting flag. Like RE_FmtBold, when retrieving, shows, is fsUnderline
style valid for the first selected character, and when set, changes
fsUnderline style for an
area
.
property RE_FmtUnderlineValid: Boolean;
Ñ
property RE_FmtUnderlineStyle: TRichUnderline;
Extended underline style. To check, if this property is valid for
entire selection, examine RE_FmtUnderlineValid value.
property RE_FmtProtected: Boolean;
Formatting flag. When retrieving, shows, is the first character of the selection
is protected from changing it by user (True) or not (False). To get know,
if retrived value is valid for entire selection, check the property
RE_FmtProtectedValid. When set, makes all characters in
area
protected (
True) or not (False).
property RE_FmtProtectedValid: Boolean;
Ñ
True, if property RE_FmtProtected is valid for entire selection, when
retrieving it.
property RE_FmtHidden: Boolean;
For RichEdit3.0, makes text hidden (not displayed).
property RE_FmtHiddenValid: Boolean;
Ñ
Returns True, if RE_FmtHidden style is valid for entire selection.
property RE_FmtLink: Boolean;
Returns True, if the first selected character is a part of link (URL).
property RE_FmtLinkValid: Boolean;
Ñ
property RE_FmtFontSize: Integer index( 12 shl 16 ) or CFM_SIZE;
Formatting value: font size, in twips (1/1440 of an inch, or 1/20 of a
printer's point, or about 1/10 of pixel). When retrieving, returns
RE_Font.FontHeight.
When set, changes font size for entire
area
(but does not change
other font attributes).
property RE_FmtFontSizeValid: Boolean;
Ñ
Returns True, if property RE_FmtFontSize is valid for entire selection,
when retrieving it.
property RE_FmtAutoBackColor: Boolean;
True, when automatic back color is used.
property RE_FmtAutoBackColorValid: Boolean;
Ñ
property RE_FmtFontColor: Integer index( 20 shl 16 ) or CFM_COLOR;
Formatting value (font color). When retrieving, returns RE_Font.Color.
When set, changes font color for entire
area
(but does not change
other font attributes).
property RE_FmtFontColorValid: Boolean;
Ñ
Returns True, if property RE_FmtFontColor valid for entire selection,
when retrieving it.
property RE_FmtAutoColor: Boolean;
True, when automatic text color is used (in such case, RE_FmtFontColor
assignment is ignored for current area).
property RE_FmtAutoColorValid: Boolean;
Ñ
property RE_FmtBackColor: Integer index(( 64 + 32 ) shl 16 ) or CFM_BACKCOLOR;
Formatting value (back color). Only available for Rich Edit 2.0 and higher.
When set, changes background color for entire
area
(but does not change
other font attributes).
property RE_FmtBackColorValid: Boolean;
Ñ
property RE_FmtFontOffset: Integer index( 16 shl 16 ) or CFM_OFFSET;
Formatting value (font vertical offset from baseline, positive values
correspond to subscript). When retrieving, returns offset for first
character in the selection. When set, changes font offset for entire
area
. To get know, is retrieved value valid for entire selction,
check RE_FmtFontOffsetValid property.
property RE_FmtFontOffsetValid: Boolean;
Ñ
Returns True, if property RE_FmtFontOffset is valid for entire selection,
when retrieving it.
property RE_FmtFontCharset: Integer index( 25 shl 16 ) or CFM_CHARSET;
Returns charset for first character in current selection, when retrieved
(and to get know, if this value is valid for entire selection, check
property RE_FmtFontCharsetValid). When set, changes charset for all
characters in
area
, but does not alter other formatting attributes.
property RE_FmtFontCharsetValid: Boolean;
Ñ
Returns True, only if rerieved property RE_FmtFontCharset is valid for
entire selection.
property RE_FmtFontName: KOLString;
Returns font face name for first character in the selection, when retrieved,
and sets font name for entire
area
, wnen assigned to (without
changing of other formatting attributes). To get know, if retrived
font name valid for entire selection, examine property RE_FmtFontNameValid.
property RE_FmtFontNameValid: Boolean;
Ñ
Returns True, only if the font name is the same for entire selection,
thus is, if rerieved property value RE_FmtFontName is valid for entire
selection.
property RE_ParaFmt: TParaFormat;
Allows to retrieve or set paragraph formatting attributes for currently
selected paragraph(s) in RichEdit control. See also following properties,
which allow to do the same for certain paragraph format attributes
separately.
property RE_TextAlign: TRichTextAlign;
Returns text alignment for current selection and allows to change it
(without changing other formatting attributes).
property RE_TextAlignValid: Boolean;
Ñ
Returns True, if property RE_TextAlign is valid for entire selection. If
False, it is concerning only start of selection.
property RE_Numbering: Boolean;
Returns True, if selected text is numbered (or has style of list with
bullets). To get / change numbering style, see properties
RE_NumStyle and RE_NumBrackets.
property RE_NumStyle: TRichNumbering;
Advanced numbering style, such as rnArabic etc. If You use it, do not
change RE_Numbering property simultaneously - this can cause changing
style to rnBullets only.
property RE_NumStart: Integer;
Starting number for advanced numbering style. If this property is not
set, numbering is starting by default from 0. For rnLRoman and rnURoman
this cause, that first item has no number to be shown (ancient Roman
people did not invent '0').
property RE_NumBrackets: TRichNumBrackets;
Brackets style for advanced numbering. rnbPlain is default
brackets style, and every time, when RE_NumStyle is changed,
RE_NumBrackets is reset to rnbPlain.
property RE_NumTab: Integer;
Tab between start of number and start of paragraph text. If too small too
view number, number is not displayed. (Default value seems to be sufficient
though).
property RE_NumberingValid: Boolean;
Ñ
Returns True, if RE_Numbering, RE_NumStyle, RE_NumBrackets, RE_NumTab,
RE_NumStart properties are valid for entire selection.
property RE_Level: Integer;
Ñ
Outline level (for numbering paragraphs?). Read only.
property RE_SpaceBefore: Integer;
Spacing before paragraph.
property RE_SpaceBeforeValid: Boolean;
Ñ
True, if RE_SpaceBefore value is valid for all selected paragraph (if
False, this value is valid only for first paragraph.
property RE_SpaceAfter: Integer;
Spacing after paragraph.
property RE_SpaceAfterValid: Boolean;
Ñ
True, only if RE_SpaceAfter value is valid for all selected paragraphs.
property RE_LineSpacing: Integer;
Linespacing in paragraph (this value is based on RE_SpacingRule property).
property RE_SpacingRule: Integer;
Linespacing rule. Do not know what is it.
property RE_LineSpacingValid: Boolean;
Ñ
True, only if RE_LineSpacing and RE_SpacingRule values are valid for
entire selection.
property RE_Indent: Integer index( 20 shl 16 ) or PFM_OFFSET;
Returns left indentation for paragraph in current selection and allows
to change it (without changing other formatting attributes).
property RE_IndentValid: Boolean;
Ñ
Returns True, if RE_Indent property is valid for entire selection.
property RE_StartIndent: Integer index( 12 shl 16 ) or PFM_STARTINDENT;
Returns left indentation for first line in paragraph for current
selection, and allows to change it (without changing other formatting
attributes).
property RE_StartIndentValid: Boolean;
Ñ
Returns True, if property RE_StartIndent is valid for entire selection.
property RE_RightIndent: Integer index( 16 shl 16 ) or PFM_RIGHTINDENT;
Returns right indent for paragraph in current selection, and allow to
change it (without changing other formatting attributes).
property RE_RightIndentValid: Boolean;
Ñ
Returns True, if property RE_RightIndent is valid for entire selection only.
property RE_TabCount: Integer;
Number of tab stops in current selection. This value can not be set greater
then MAX_TAB_COUNT (32).
property RE_Tabs[ Idx: Integer ]: Integer;
Tab stops for RichEdit control.
property RE_TabsValid: Boolean;
Ñ
Returns True, if properties RE_Tabs[ ] and RE_TabCount are valid for
entire selection.
property RE_AutoKeyboard: Boolean;
True if autokeyboard on (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.
property RE_AutoFont: Boolean;
True if autofont on (automatic switching font when keyboard layout is
changes). By default, is 'on' always. It is suggested to turn this option
off for Unicode control.
property RE_AutoFontSizeAdjust: Boolean;
See IMF_AUTOFONTSIZEADJUST option in SDK:
Font-bound font sizes are scaled from insertion point size according to
script. For example, Asian fonts are slightly larger than Western ones.
This option is turned on by default.
property RE_DualFont: Boolean;
See IMF_DUALFONT option in SDK:
Sets the control to dual-font mode. Used for Asian language support.
The control uses an English font for ASCII text and a Asian font for
Asian text.
property RE_UIFonts: Boolean;
See IMF_UIFONTS option in SDK:
Use user-interface default fonts. This option is turned off by default.
property RE_IMECancelComplete: Boolean;
See IMF_IMECANCELCOMPLETE option in SDK:
This flag determines how the control uses the composition string of an
IME if the user cancels it. If this flag is set, the control discards
the composition string. If this flag is not set, the control uses the
composition string as the result string.
property RE_IMEAlwaysSendNotify: Boolean;
See IMF_IMEALWAYSSENDNOTIFY option in SDK:
Controls how Rich Edit notifies the client during IME composition:
0: No EN_CHANGED or EN_SELCHANGE notifications during undetermined state.
Send notification when final string comes in. (default)
1: Send EN_CHANGED and EN_SELCHANGE events during undetermined state.
property RE_OverwriteMode: Boolean;
This property allows to control insert/overwrite mode. 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 RichEdit
control, or to assign event OnRE_InsOvrMode_Change to your handler).
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).
property RE_DisableOverwriteChange: Boolean;
It is possible to disable switching between "insert" and "overwrite" mode
by user (therefore, event OnRE_InsOvrMode_Change continue works, but it
just called when key INSERT is pressed, though RE_OverwriteMode property
is not actually changed if switching is disabled).
property RE_Text[ Format: TRETextFormat; SelectionOnly: Boolean ]: KOLString;
This property allows to get / replace content of RichEdit control
(entire text or selection only). Using different formats, it is
possible to exclude or replace undesired formatting information
(see TRETextFormat specification). To get or replace entire text
in reText mode (plain text only), it is possible to use habitual
for edit controls Text property.
Note: it is possible to append text to the end of RichEdit control
using method Add, but only if property RE_Text is accessed at least
once:
RichEdit1.RE_Text[ reText, True ];
property RE_Error: Integer;
Ñ
Contains error code, if access to RE_Text failed.
property RE_AutoURLDetect: Boolean;
If set to True, automatically detects URLs (and highlights it with
blue color, applying fsItalic and fsUnderline font styles (while
typing and loading). Default value is False. Note: if event OnRE_URLClick
or event OnRE_OverURL are set, property RE_AutoURLDetect is set to True
automatically.
property RE_URL: KOLString;
Ñ
Detected URL (valid in OnRE_OverURL and OnRE_URLClick event handlers).
property RE_Transparent: Boolean;
Use this property to make richedit control transparent, instead of
Ed_Transparent or Transparent. But do not place such transparent
richedit control directly on form - it can be draw incorrectly when
form is activated and rich editr control is not current active control.
Use at least panel as a parent instead.
property RE_Zoom: TSmallPoint;
To set zooming for rich edit control (3.0 and above), pass X as numerator
and Y as denominator. Resulting X/Y must be between 1/64 and 64.
property DateTime: TDateTime;
DateTime for DateTimePicker control only.
property Date: TDateTime;
Date only for DateTimePicker control only.
property Time: TDateTime;
Time only for DateTimePicker control only.
property SystemTime: TSystemTime;
Date and Time as TSystemTime. When assing, use year 0 to set "no value".
property DateTimeRange: TDateTimeRange;
DateTimePicker range. If first date in the agrument assigned is NAN,
minimum system allowed value is used as the left bound, and if the second is
NAN, maximum system allowed is used as the right one.
property SBMin: Longint;
Minimum scrolling area position.
property SBMax: Longint;
Maximum scrolling area position (size of the text or image to be scrolling).
For case when SCROLL_OLD defined, this value should be set as scrolling
object size without SBPageSize.
property SBMinMax: TPoint;
The property to adjust SBMin and SBMax for a single call (set X to a minimum
and Y to a maximum value).
property SBPosition: Integer;
Current scroll position. When set, should be between SBMin and
SBMax - max(0, SBPageSize-1)
property SBPageSize: Integer;
property Checked: Boolean;
For checkbox and radiobox - if it is checked. Do not assign
value for radiobox - use SetRadioChecked instead.
property Check3: TTriStateCheck;
State of checkbox with BS_AUTO3STATE style.
property CustomData: Pointer;
Can be used to exend the object when new type of control added. Memory,
pointed by this pointer, released automatically in the destructor.
property CustomObj: PObj;
Can be used to exend the object when new type of control added. Object,
pointed by this pointer, released automatically in the destructor.
property LBTopIndex: Integer;
Index of the first visible item in a list box
procedure Init; virtual;
N
procedure InitParented( AParent: PControl ); virtual;
N
Initialization of visual object.
procedure InitOrthaned( AParentWnd: HWnd ); virtual;
N
Initialization of visual object.
procedure InitParented( AParent: PControl; widget: PGtkWidget; need_eventbox: Boolean ); virtual;
N
Initialization of visual object.
procedure DestroyChildren;
N
Destroys children. Is called in destructor, and can be
called in descending classes as earlier as needed to
prevent problems of too late destroying of visuals.
Note: since v 2.40, used only for case when a symbol NOT_USE_AUTOFREE4CONTROLS
is defined, otherwise all children are destroyed using common mechanism of
Add2AutoFree.
function GetParentWnd( NeedHandle: Boolean ): HWnd;
N
Returns handle of parent window.
function GetParentWindow: HWnd;
N
procedure SetEnabled( Value: Boolean );
N
Changes Enabled property value. Overriden here to change enabling
status of a window.
function GetEnabled: Boolean;
N
Returns True, if Enabled. Overriden here to obtain real window
state.
procedure SetVisible( Value: Boolean );
N
Sets Visible property value. Overriden here to change visibility
of correspondent window.
procedure Set_Visible( Value: Boolean );
N
function GetVisible: Boolean;
N
Returns True, if correspondent window is Visible. Overriden
to get visibility of real window, not just value stored in object.
function Get_Visible: Boolean;
N
Returns True, if correspondent window is Visible, for forms and applet,
or if fVisible flag is set, for controls.
procedure SetCtlColor( Value: TColor );
N
Sets TControl's Color property value.
procedure SetBoundsRect( const Value: TRect );
N
Sets BoudsRect property value.
function GetBoundsRect: TRect;
N
Returns bounding rectangle.
function GetIcon: HIcon;
N
Returns Icon property. By default, if it is not set,
returns Icon property of an Applet.
procedure CreateSubclass( var Params: TCreateParams; ControlClassName: PKOLChar );
N
Can be used in descending classes to subclass window with given
standard Windows ControlClassName - must be called after
creating Params but before CreateWindow. Usually it is called
in overriden method CreateParams after calling of the inherited one.
function UpdateWndStyles: PControl;
N
Updates fStyle, fExStyle, fClsStyle from window handle
procedure SetOnChar( const Value: TOnChar );
N
procedure SetOnDeadChar( const Value: TOnChar );
N
procedure SetOnKeyDown( const Value: TOnKey );
N
procedure SetOnKeyUp( const Value: TOnKey );
N
procedure SetOnMouseDown( const Value: TOnMouse );
N
procedure SetOnMouseMove( const Value: TOnMouse );
N
procedure SetOnMouseUp( const Value: TOnMouse );
N
procedure SetOnMouseWheel( const Value: TOnMouse );
N
procedure SetOnMouseDblClk( const Value: TOnMouse );
N
procedure SetHelpContext( Value: Integer );
N
procedure SetOnTVDelete( const Value: TOnTVDelete );
N
function DefaultBtnProc( var Msg: TMsg; var Rslt: Integer ): Boolean;
N
constructor CreateParented( AParent: PControl );
Creates new instance of TControl object, calling InitParented
constructor CreateOrthaned( AParentWnd: HWnd );
Creates new instance of TControl object, calling InitOrthaned
constructor CreateParented( AParent: PControl; widget: PGtkWidget; need_eventbox: Boolean );
Creates new instance of TControl object, calling InitParented
destructor Destroy; virtual;
Destroyes object. First of all, destructors for all children
are called.
function GetWindowHandle: HWnd;
Returns window handle. If window is not yet created,
method CreateWindow is called.
procedure CreateChildWindows;
Enumerates all children recursively and calls CreateWindow for all
of these.
function ChildIndex( Child: PControl ): Integer;
Returns index of given child.
procedure MoveChild( Child: PControl; NewIdx: Integer );
Moves given Child into new position.
procedure EnableChildren( Enable, Recursive: Boolean );
Enables (Enable = TRUE) or disables (Enable = FALSE) all the children
of the control. If Recursive = TRUE then all the children of all the
children are enabled or disabled recursively.
function ClientRect: TRect;
Client rectangle of TControl. Contrary to VCL, for some
classes (e.g. for graphic controls) can be relative
not to itself, but to top left corner of the parent's ClientRect
rectangle.
function ControlRect: TRect;
Absolute bounding rectangle relatively to nearest
Windowed parent client rectangle (at least to a form, but usually to
a Parent).
Useful while drawing on device context, provided by such
Windowed parent. For form itself is the same as BoundsRect.
function ControlAtPos( X, Y: Integer; IgnoreDisabled: Boolean ): PControl;
Searches control at the given position (relatively to top left
corner of the ClientRect).
procedure Invalidate;
Invalidates rectangle, occupied by the visual (but only if Showing =
True).
procedure InvalidateEx;
Invalidates the window and all its children.
procedure InvalidateNC( Recursive: Boolean );
Invalidates the window and all its children including non-client area.
procedure Update;
Updates control's window and calls Update for all child controls.
procedure BeginUpdate;
Call this method to stop visual updates of the control until correspondent
EndUpdate called (pairs BeginUpdate - EndUpdate can be nested).
procedure EndUpdate;
See BeginUpdate.
function HandleAllocated: Boolean;
Returns True, if window handle is allocated. Has no sense for
non-Windowed objects (but now, the KOL has no non-Windowed controls).
procedure PaintBackground( DC: HDC; Rect: PRect );
Is called to paint background in given rectangle. This
method is filling clipped area of the Rect rectangle with
Color, but only if global event Global_OnPaintBkgnd is
not assigned. If assigned, this one is called instead here.
This method made public, so it can be called directly to
fill some device context's rectangle. But remember, that
independantly of Rect, top left corner of background piece
will be located so, if drawing is occure into ControlRect
rectangle.
function ParentForm: PControl;
Returns parent form for a control (of @Self for form itself.
function Client2Screen( const P: TPoint ): TPoint;
Converts the client coordinates of a specified point to screen coordinates.
function Screen2Client( const P: TPoint ): TPoint;
Converts screen coordinates of a specified point to client coordinates.
procedure Close;
Closes window. If a window is the main form, this closes application,
terminating it. Also it is possible to call Close method for Applet
window to stop application.
procedure CursorLoad( Inst: Integer; ResName: PKOLChar );
Loads Cursor from the resource. See also comments for Icon property.
procedure IconLoad( Inst: Integer; ResName: PKOLChar );
See Icon property.
procedure IconLoadCursor( Inst: Integer; ResName: PKOLChar );
Loads Icon from the cursor resource. See also Icon property.
function AssignHelpContext( Context: Integer ): PControl;
Assigns HelpContext and returns @ Self (can be used in initialization
of a control in a chain of "transparent" calls).
procedure CallHelp( Context: Integer; CtxCtl: PControl );
Method of a form or Applet. Call it to show help with the given context
ID. If the Context = 0, help contents is displayed. By default,
WinHelp is used. To allow using HtmlHelp, call AssignHtmlHelp global
function. When WinHelp used, HelpPath variable can be assigned directly.
If HelpPath variable is not assigned, application name
(and path) is used, with extension replaced to '.hlp'.
procedure SelectAll;
Makes all the text in editbox or RichEdit, or all items in listbox
selected.
procedure ReplaceSelection( const Value: KOLString; aCanUndo: Boolean );
Replaces selection (in edit, RichEdit). Unlike assigning new value
to Selection property, it is possible to specify, if operation can
be undone.
procedure DeleteLines( FromLine, ToLine: Integer );
Deletes lines from FromLine to ToLine (inclusively, i.e. 0 to 0 deletes
one line with index 0). Current selection is restored as possible.
function Item2Pos( ItemIdx: Integer ): DWORD;
Only for edit controls: converts line index to character position.
function Pos2Item( Pos: Integer ): DWORD;
Only for edit controls: converts character position to line index.
function SavePosition: TEditPositions;
Only for edit controls: saves current editor selection and scroll
positions. To restore position, use RestorePosition with a structure,
containing saved position as a parameter.
procedure RestorePosition( const p: TEditPositions );
Call RestorePosition with a structure, containing saved position
as a parameter (this structure filled in in SavePosition method).
If you set RestoreScroll to FALSE, only selection is restored,
without scroll position.
procedure UpdatePosition( var p: TEditPositions; FromPos, CountInsertDelChars, CountInsertDelLines: Integer );
If you called SavePosition and then make some changes in the edit control,
calling RestorePosition will fail if chages are affecting selection size.
The problem can be solved updating saved position info using this method.
Pass a count of inserted characters and lines as a positive number and a
count of deleted characters as a negative number here. CountInsertDelLines
is optional paramters: if you do not specify it, only selection is fixed.
function EditTabChar: PControl;
Call this method (once) to provide insertion of tab character (code #9)
when tab key is pressed on keyboard.
function IndexOf( const S: KOLString ): Integer;
Works for the most of control types, though some of those
have its own methods to search given item. If a control is not
list box or combobox, item is finding by enumerating all
the Items one by one. See also SearchFor method.
function SearchFor( const S: KOLString; StartAfter: Integer; Partial: Boolean ): Integer;
Works for the most of control types, though some of those
have its own methods to search given item. If a control is not
list box or combobox, item is finding by enumerating all
the Items one by one. See also IndexOf method.
procedure AddDirList( const Filemask: KOLString; Attrs: DWORD );
Can be used only with listbox and combobox - to add directory list items,
filtered by given Filemask (can contain wildcards) and Attrs. Following
flags can be combined in Attrs:
DDL_ARCHIVE | Include archived files. |
DDL_DIRECTORY | Includes subdirectories. Subdirectory names are enclosed in square brackets ([ ]). |
DDL_DRIVES | Includes drives. Drives are listed in the form [-x-], where x is the drive letter. |
DDL_EXCLUSIVE | Includes only files with the specified attributes. By default, read-write files are listed even if DDL_READWRITE is not specified. Also, this flag needed to list directories only, etc. |
DDL_HIDDEN | Includes hidden files. |
DDL_READONLY | Includes read-only files. |
DDL_READWRITE | Includes read-write files with no additional attributes. |
DDL_SYSTEM | Includes system files. |