SRVControls

<< Click to display table of contents >>

SRVControls

SRVControls is a set of controls designed for insertion in TSRichViewEdit.

Controls:

srvbutton TSRVButton – button;

srvcheckbox TSRVCheckBox – check box;

srvcombobox TSRVComboBox – combo box; hierarchical; with images, custom colors and fonts; with hints (suggestions);

srvedit TSRVEdit – plain-text one-line editor with hints (suggestions);

srvgroupbox TSRVGroupBox – panel with a title;

srvimagesscroll TSRVImagesScroll – gallery of images;

srvlabel TSRVLabel – text label;

srvlistbox TSRVListBox – scrollable list of items; hierarchical; with images, check boxes, custom colors and fonts;

srvmemo TSRVMemo – plain-text multi-line editor;

srvpaintbox TSRVPaintBox – controls for custom drawing;

srvpanel TSRVPanel – panel;

srvradiobutton TSRVRadioButton – radio button.

See also:

srvscrollbar TSRVScrollBar;

srvtabset TSRVTabSet.

All the controls above can be skinned using TSRVSkinManager.

Data-aware controls:

srvdbcheckbox TSRVDBCheckBox – data-aware check box;

srvdbcombobox TSRVDBComboBox – data-aware combo box; hierarchical; with images, custom colors and fonts; with hints (suggestions);

srvdbedit TSRVDBEdit – data-aware plain-text one-line editor with hints (suggestions);

srvdblistbox TSRVDBListBox – data-aware scrollable list of items; hierarchical; with images, check boxes, custom colors and fonts;

srvdbmemo TSRVDBMemo – data-aware plain-text multi-line editor;

srvdbtext TSRVDBText – data-aware text label.

How to use

SRVControls may work both on a form (like any other Delphi controls) or inserted in TSRichViewEdit / TDBSRichViewEdit.

While you can insert any control in TSRichViewEdit, SRVControls work better in this mode:

they provide high-quality scaling when displaying in the editor;

they provide high-quality printing;

they are scaled properly if Screen.PixelsPerInch <> 96 (but only in Delphi 10.1 and newer).

If you create SRVControls at run-time in code, it's highly recommended (instead of a direct assigning of its Parent) to use RVSetControlParent function (defined in RVFuncs unit). This recommendation is in effect both to controls that will be added to a form, and to controls that will be inserted in the editor (in the latter case, RVSetControlParent should be called before calling InsertItem or AddItem methods):

  c := TSRVCheckBox.Create(nil);
  RVSetControlParent(c, SRichViewEdit1.ActiveEditor);
  c.Caption := 'Default';
  SRichViewEdit1.ActiveEditor.InsertControl('', c, rvvaMiddle);