Rx Font/Colour Combo Box

RX Library

Control Name Unit Class
RX Colour Combo Box RxCombos TColorComboBox
RX Font Combo Box RxCombos TFontComboBox

Class - TColorComboBox - Description:
This component is indented for color selection. It is actually a combo-box which drop-down list contains 16 basic system colors. The available colors are the same as the ones in the Object Inspector’s drop-down list of colors for the Color property.
ColorValue property contains the value of selected color.


Property TColorComboBox.ColorNames
Declaration: ColorNames: TStrings;

ColorNames provides a way to customize the display color's names for the items in the drop-down list of color combo box. Use the ColorNames property to supply color names of your choosing for the individual color items. Each color has a default english name. ColorNames allow the values of any or all of these default names to be replaced by customized names.

ColorNames is a string list. Each name is a string. The first string in the string list becomes the name for the first item on the list (clBlack). The 16-th string becomes the name for the 16-th item (clWhite).

When specifying names at runtime, enter an empty string ('') for any name that should keep the default value. Simply leave the line blank when using the string list property editor of the Object Inspector for the ColorNames property.


Property TColorComboBox.ColorValue
Declaration: ColorValue: TColor;

This property represents the color value that currently selected. If you assign a TColor value to ColorValue, the corresponding entry in the list is selected. If the specified TColor is not in the color combo box list, the assignment is ignored and the current selection is unchanged.


Property TColorComboBox.DisplayNames
Declaration: DisplayNames: Boolean;

If True the color names (Black, Red etc) will be displaying in color list to the right of the colors in the color combo box.


Class TFontComboBox

This component is indended for font selection. Its drop-down list contains the list of fonts currently available. Device and Options properties controls what fonts are displayed.


Property TFontComboBox.Device
Declaration: Device: TFontDevice;

This property controls the list of available fonts.

  • fdScreen - the list will be populated by the screen fonts only.
  • fdPrinter - the list will be populated by the printer fonts only.
  • fdBoth - the list will be populated both screen and printer fonts.

Property TFontComboBox.FontName
Declaration: FontName: string;

Contains the name of the selected font.


Property TFontComboBox.Options
Declaration: Options: TFontListOptions;

These are the possible values that can be included in the Options set for the TFontComboBox:

  • foAnsiOnly - If True, the user can select fonts that use the Windows character set only; that is, the user can't choose a font that contains only symbols because they aren't displayed in the Font combo box.
  • foTrueTypeOnly - If True, only TrueType fonts are displayed in the Font combo box.
  • foFixedPitchOnly - If True, only monospaced fonts are displayed in the Font combo box.
  • foNoOEMFonts - If True, only fonts that aren't vector fonts are displayed in the Font combo box.
  • foOEMFontsOnly - If True, only OEM fonts are displayed in the Font combo box.
  • foScalableOnly - If True, only fonts that can be scaled are displayed in the Font combo box.

The default value is [].


Property TFontComboBox.TrueTypeOnly
Declaration: TrueTypeOnly: Boolean;

See Options.


Type TFontComboBox.TFontDevice
Declaration: TFontDevice = (fdScreen, fdPrinter, fdBoth);

The TFontDevice type lists the values the Device property of the Font combo box (TFontComboBox) can assume.


Type TFontComboBox.TFontListOption
Declaration: TFontListOption = (foAnsiOnly, foTrueTypeOnly, foFixedPitchOnly, foNoOEMFonts, foOEMFontsOnly, foScalableOnly);

The TFontListOption type is the set of values the Options property of the Font combo box (TFontComboBox) can have.


Type TFontComboBox.TFontListOptions
Declaration: TFontListOptions = set of TFontListOption;

TFontListOptions is the type of the Options property of the TFontComboBox component.


Index Page | About | Download
Creation Date: 4 Feb 1998 | Last Update: 16 Mar 2000