TMlSkinNCEdit
An edit box on the title bar (new in v5.7), typically used for a search field that blends into the title bar.
Notes
- With
Transparenton, the background is see-through and the edit blends into the title bar image or color. TextHintis the placeholder shown while empty;TextKindrestricts input to digits, letters and so on.EdItemsputs icons or small buttons inside the box, for example a search icon on the right.- The border uses two images,
BorderNormalandBorderHot, swapped on hover.
Properties 27
| Name | Type | Default | Description |
|---|---|---|---|
Text | string | — | The text in the edit box. |
TextHint | string | — | Placeholder text shown in a light color while the box is empty, for example "Search…". |
TextHintHideInKey | Boolean | False | When the placeholder disappears: with this on it stays while the box has focus and only hides once a character is typed. |
ReadOnly | Boolean | False | Read-only: the user cannot change the content. |
MaxLength | Integer | 0 | Maximum number of characters; 0 means no limit. |
AutoSelect | Boolean | True | Selects the existing text automatically when the box receives focus. |
CharCase | TEditCharCase | ecNormal | Letter case conversion: as typed, upper case or lower case. |
TextKind | TMlTextKind | tkAll | Restricts what can be typed: tkAll anything, tkEN letters only, tkNumInt integers, tkNumReal numbers with decimals and sign, tkENandNum letters and digits. |
ShowCheckBox | Boolean | False | Shows a check box at the left of the edit; its state is read and written through Checked. |
Checked | Boolean | False | State of the check box at the left of the edit; requires ShowCheckBox. |
BorderVisible | Boolean | True | Whether the border is drawn. Turn it off to blend the edit completely into the title bar. |
BorderNormal | TMlResID | — | Border image in the normal state. |
BorderHot | TMlResID | — | Border image used on hover or while focused. |
Color | TColor | clWhite | Text color. |
Width | Integer | 160 | Width of the edit box in pixels. |
Height | Integer | 22 | Height of the edit box in pixels. |
BkColor | TColor | clBtnFace | Background color of the box; ignored while Transparent is on. |
Transparent | Boolean | True | Transparent background: the edit blends into the title-bar image or color. |
CursorColor | TColor | clBlack | Color of the caret; set it light on a dark background. |
CursorVisible | Boolean | True | Whether the caret is shown. |
SelColorAlpha | Byte | 255 | Opacity (0–255) of the selection highlight behind selected text. |
DisableIME | Boolean | False | Disables the IME, so only Latin letters and digits can be typed — useful for account or serial number fields. |
Font | TFont | — | Font of the typed text. |
FontHint | TFont | — | Font of the placeholder text (TextHint), usually in a lighter color. |
Space | TMlSpaceSize | — | Padding between the text and the border (left, top, right, bottom), which can be enabled separately. |
EdItems | TMlEditItems | — | The small items inside the edit: icons or buttons such as search or clear, each with its own image, position and click handling. |
Tips | TMlSkinEditTips | — | Settings for the hint balloon next to the edit: frame color, background color, font and how long it stays. |
Events 10
| Name | Type | Default | Description |
|---|---|---|---|
OnChange | TNotifyEvent | — | Fires when the content changes. |
OnClick | TNotifyEvent | — | Fires when the control is clicked. |
OnEnter | TNotifyEvent | — | Fires when the control receives focus. |
OnExit | TNotifyEvent | — | Fires when the control loses focus, a common place for validation. |
OnKeyDown | TKeyEvent | — | Fires when a key goes down. |
OnKeyPress | TKeyPressEvent | — | Fires as a character is typed, which is where unwanted characters can be filtered out. |
OnKeyUp | TKeyEvent | — | Fires when a key is released. |
OnMouseDown | TMouseEvent | — | Fires when a mouse button goes down. |
OnMouseMove | TMouseMoveEvent | — | Fires as the mouse moves over the control. |
OnMouseUp | TMouseEvent | — | Fires when a mouse button is released. |
Properties of TMlSkinNCCtrlBase 6
| Name | Type | Default | Description |
|---|---|---|---|
About | TMlAboutInfo | — | A design-time property: double-clicking it in the Object Inspector opens the MLSkin about box with the component version. It has no effect at run time and is not stored in the .dfm. |
PutSide | TSideKind | skdTop | Which edge of the non-client area the control sits on: skdTop, skdBottom, skdLeft or skdRight. |
Tag | Integer | 0 | A spare integer for your own bookkeeping; the component itself does not use it. |
Pos | TNCCtrlPos | — | Position along that edge: an alignment plus X/Y offsets. With UseDefault on, the default layout is used. |
Hint | string | — | Tooltip text shown when the mouse rests on the control. |
Visible | Boolean | True | Whether the control is visible. |
Events of TMlSkinNCCtrlBase 5
| Name | Type | Default | Description |
|---|---|---|---|
OnLMouseDown | TNotifyEvent | — | Fires when the left mouse button goes down on the control. |
OnLMouseUp | TNotifyEvent | — | Fires when the left mouse button is released on the control. |
OnMouseEnter | TNotifyEvent | — | Fires when the mouse enters the control. |
OnMouseLeave | TNotifyEvent | — | Fires when the mouse leaves the control. |
OnDPIChanged | TMlDPIChangedEvent | — | Fires when the screen DPI changes, for example when the window moves to a monitor with a different scaling — a good place to re-adjust anything you draw yourself. |
Only the properties and events MLSkin adds are listed here. Standard VCL properties such as Align, Anchors, Font and OnClick are available too and behave exactly as on the stock controls.
Offline helpA PDF / CHM version is available for offline reading.