General
List of available controls
TTMSFNCHTMLText Text shape that supports HTML (see MiniHTML chapter) |
![]() |
TTMSFNCBitmapContainer Container that holds multiple bitmaps |
![]() |
TTMSFNCPopup Component that allows displaying any type of control inside a customizable popup dialog. |
![]() |
TTMSFNCEdit Autocomplete and lookup enabled control that extends TEdit. Has the capability of display and editing various editing types such as float, money, lowercase, uppercase, … |
![]() |
TTMSFNCColorPicker / TTMSFNCColorSelector A color selector and picker with many customization / custom drawing options and events. |
![]() |
TTMSFNCBitmapPicker / TTMSFNCBitmapSelector A bitmap selector and picker with many customization / custom drawing options and events. |
![]() |
TTMSFNCFontNamePicker / TTMSFNCFontSizePicker | ![]() |
TTMSFNCToolBar | ![]() |
TTMSFNCTabSet / TTMSFNCPageControl | ![]() |
TTMSFNCListBox / TTMSFNCCheckedListBox | ![]() |
TTMSFNCCheckGroup / TTMSFNCCheckGroupPicker | ![]() |
TTMSFNCRadioGroup / TTMSFNCRadioGroupPicker | ![]() |
TTMSFNCPanel | ![]() |
TTMSFNCNavigationPanel | ![]() |
TTMSFNCListEditor | ![]() |
TTMSFNCHint | ![]() |
TTMSFNCToolBarPopup | ![]() |
TTMSFNCScrollBar | ![]() |
TTMSFNCAnalogTimeSelector / TTMSFNCAnalogTimePicker | ![]() |
TTMSFNCDigitalTimeSelector / TTMSFNCDigitalTimePicker | ![]() |
TTMSFNCFillKindSelector / TTMSFNCFillKindPicker | ![]() |
TTMSFNCStrokeKindSelector / TTMSFNCStrokeKindPicker | ![]() |
TTMSFNCColorWheel | ![]() |
TTMSFNCTaskDialog | ![]() |
TTMSFNCStatusBar | ![]() |
TTMSFNCSignatureCapture | ![]() |
TTMSFNCDateTimePicker | ![]() |
TTMSFNCFontDialog | ![]() |
TTMSFNCIPEdit | ![]() |
TTMSFNCCheckBox | ![]() |
TTMSFNCRadioButton | ![]() |
TTMSFNCTrackBar | ![]() |
TTMSFNCRangeSlider | ![]() |
TTMSFNCSpinEdit | ![]() |
TTMSFNCComboBox | ![]() |
TTMSFNCSwitch | ![]() |
TTMSFNCLabelEdit | ![]() |
Persistence
Each component in the TMS FNC UI Pack is capable of saving its published properties (settings), to a file or stream. The format that is being used is JSON. To save a specific component, use the code below.
To load an existing settings stream/file use the following code. Each component additionally exposes events to control which properties need to be saved to the settings file. In some circumstances, it might be required to only save a specific set of properties. The OnCanLoadProperty and OnCanSaveProperty events are responsible for this. Below is a sample that excludes a property ‘Extra’ from the persistence list.procedure TForm1.MyFNCComponentCanLoadProperty(Sender, AObject: TObject;
APropertyName: string; APropertyType: TTypeKind; var ACanLoad: Boolean);
begin
ACanLoad := ACanLoad and not (APropertyName = ‘Extra’);
end;
procedure TForm1.MyFNCComponentCanSaveProperty(Sender, AObject: TObject;
APropertyName: string; APropertyType: TTypeKind; var ACanSave: Boolean);
begin
ACanSave := ACanSave and not (APropertyName = ‘Extra’);
end;
Please note that the above AND operation is crucial to maintain the existing exclusion list. Returning a true for each property will additionally save its default published properties such as Align, Position and many more.
GlobalFont
For components with multiple fonts the GlobalFont property is made available. This allows you to change the size, color, name and style of all the fonts in the chart. With the scale property you can change the font sizes in relation to their previous sizes.
Undo / Redo
Each component exposes a public UndoManager property that is capable of loading a previous state of the component. To push a state, use the following code:
MyFNCComponent.UndoManager.PushState('default state');
MyFNCComponent.ChangeText;
MyFNCComponent.UndoManager.PushState('text changed');
MyFNCComponent.UndoManager.Undo;
TMS Mini HTML rendering engine
Another core technology used among many components is a small fast & lightweight HTML rendering engine. This engine implements a subset of the HTML standard to display formatted text. It supports following tags :
B : Bold tag
Example : This is a testU : Underline tag
Example : This is a testI : Italic tag
Example : This is a testS : Strikeout tag
Example : This is aA : anchor tag
<A href="value">
: text after tag is an anchor. The 'value' after the href identifier is the anchor. This can be an URL (with ftp,http,mailto,file identifier) or any text. If the value is an URL, the shellexecute function is called, otherwise, the anchor value can be found in the OnAnchorClick event </A>
: end of anchor
Examples : This is a test
This is a test
This is a test FONT : font specifier tag
<FONT face='facevalue' size='sizevalue' color='colorvalue' bgcolor='colorvalue'>
: specifies font of
text after tag.
with
- face : name of the font
- size : HTML style size if smaller than 5, otherwise pointsize of the font
- color : font color with either hexidecimal color specification or color constant name, ie gcRed,gcYellow,gcWhite ... etc
- bgcolor : background color with either hexidecimal color specification or color constant name
</FONT>
: ends font setting
Examples: This is a test This is a test
P : paragraph
<P align="alignvalue" [bgcolor="colorvalue"] [bgcolorto="colorvalue"]>
: starts a new paragraph, with left, right or center alignment. The paragraph background color is set by the optional bgcolor parameter. If bgcolor and bgcolorto are specified,
a gradient is displayed ranging from begin to end color.
</P>
: end of paragraph
Example :
This is a test
Example :
This is a test
Example :
This has a red background
Example :
This has a yellow background
Example :
This has a gradient background
*HR : horizontal line
BR : linebreak
BODY : body color / background specifier
<BODY bgcolor="colorvalue" [bgcolorto="colorvalue"] [dir="v|h"] background="imagefile specifier"> :
sets the background color of the HTML text or the background bitmap file
Example :
: sets background color to yellow<BODY background="file://c:\test.bmp"> : sets tiled background to file test.bmp
<BODY bgcolor="gcYellow" bgcolorto="gcWhite" dir="v"> : sets a vertical gradient from yellow to white
IND : indent tag
This is not part of the standard HTML tags but can be used to easily create multicolumn text <IND x="indent">
: indents with "indent" pixels
Example :
This will be
IMG : image tag
<IMG src="specifier:name" [align="specifier"] [width="width"] [height="height"] [alt="specifier:name"]>
: inserts an image at the location
specifier can be: name of image in a BitmapContainer
Optionally, an alignment tag can be included. If no alignment is included, the text alignment with respect to the image is bottom. Other possibilities are: align="top" and align="middle"
The width & height to render the image can be specified as well. If the image is embedded in anchor tags, a different image can be displayed when the mouse is in the image area through the Alt attribute.
Examples :
This is an image
SUB : subscript tag
Example : This is 9/16 looks like 9/16SUP : superscript tag
UL : list tag
Example :
<LI>List item 1
<LI>List item 2
<UL>
<LI> Sub list item A
<LI> Sub list item B
</UL>
<LI>List item 3
</UL>
LI : list item
<LI [type="specifier"] [color="color"] [name="imagename"]> <br>
New list item specifier can be "square", "circle" or "image" bullet. Color sets the color of the square or circle bullet. Imagename sets the PictureContainer image name for image to use as bullet
SHAD : text with shadow
Z : hidden text
Special characters Following standard HTML special characters are supported :
< : less than : <
> : greater than : >
& : &
" : "
: non breaking space
™ : trademark symbol
€ : euro symbol
§ : section symbol
© : copyright symbol
¶ : paragraph symbol
Styling
Each control in the TMS FNC UI Pack supports styling on FMX and VCL. When setting the AdaptToStyle property to true, the style loaded in the application will be applied to the control. Below is a sample after applying styles to the TTMSFNCTabSet/TTMSFNCPageControl.