ScaleRichView

 Top Next

Version 6 (What's new?)

Introduction

ScaleRichView is a package of Delphi/C++Builder components.

It uses TRichView Package (www.trichview.com) and RichViewActions (www.trichview.com/resources/actions/).

TRichView and RichViewActions must be installed in order to use ScaleRichView.

Components

srichviewedit TSRichViewEdit allows editing rich text documents in WYSIWYG mode. It supports scaling and different view modes, including a page-view mode.

dbsrichviewedit TDBSRichViewEdit is a data-aware version of WYSIWYG editing component.

scrlrvruler TSclRVRuler is a horizontal or vertical ruler designed to work with TSRichViewEdit. It is inherited from TRVRuler component included in RichViewActions.

srvtoolbar TSRVToolBar is a simplified analog of TToolBar. Instances of TSRVToolbar are used in TSRichViewEdit: they allow adding buttons in scrollbar area.

srvtoolwindow TSRVToolWindow uses the TSRVToolBar and displays it in a popup window.

srvpagescroll TSRVPageScroll displays thumbnails of pages for documents prepared in TSRichViewEdit component.

srvprint TSRVPrint and srvpreview TSRVPreview are components for advanced printing of documents prepared in TSRichViewEdit. For example, they allow printing posters (e.g. A3 page on A4 printer).

srvskinmanager TSRVSkinManager allows applying skins to scrollbars of TSRichViewEdit/TDBSRichViewEdit, to TSRVScrollBar, to TSRVTabSet.

srvtabset TSRVTabSet – advanced skinnable tabs, can be used to implement a tabbed multiple document interface.

srvscrollbar TSRVScrollBar – skinnable scrollbar. This component is used for scrollbars in TSRichViewEdit, but may be useful as a separate component as well.

Example

Main ScaleRichView Components

Main ScaleRichView Components

In the screenshot above, you can see:

· TSRichViewEdit component;
· TSRVPageScroll, component;
· two TSclRVRuler components;
· a window displayed by TSRVToolWindow.

You can also see three instances of TSRVToolBar: two toolbars embedded in a scrollbar area of TSRichViewEdit component, and a toolbar inside a TSRVToolWindow's window. These three toolbars are not separate components, they are owned by TSRichViewEdit and TSRVToolWindow, and their properties are defined by their owners.

ScaleRichView © trichview.com


Overview

 Top Previous Next
· Document parts in TSRichViewEdit
· Footnotes and endnotes


Document parts in TSRichViewEdit

Overview

Editors

TSRichViewEdit control contains several TRichViewEdit controls inside. These controls are invisible, they are used to render end edit different document parts. These controls are available as properties of TSRichViewEdit:

· RichViewEdit for the main document;
· RVHeader for page headers;
· RVFooter for page footers;
· RVNote for notes and text box items.

RichViewEdit stores the main document. Other editors are used to edit documents stored in different places:

· RVHeader and RVFooter edit Subdocuments
· RVNote edits Document of footnotes, endnotes, sidenotes, text boxes.

RichViewEdit always contain the main document. Other editors contain valid documents only when they are active (equal to ActiveEditor).

Loading

When you load a new document, call TSRichViewEdit.Format.

This method copies page properties from TSRichViewEdit.RichViewEdit.DocParameters to TSRichViewEdit.PageProperty (when loading files, page properties are loaded in RichViewEdit.DocParameters), formats RVHeader, RVFooter, RichViewEdit, notes and text boxes, paginates the document.

Example of loading RTF file:

SRichViewEdit1.Clear;

SRichViewEdit1.RichViewEdit.LoadRTF(FileName);

SRichViewEdit1.Format;

The same sequence must be called for other loading methods of TSRichViewEdit.RichViewEdit: LoadRTFFromStream, LoadRVF, LoadRVFFromStream, LoadText, etc.

For RVF, you can use the methods of TSRichViewEdit: LoadRVF and LoadRVFFromStream. These methods load, format and assign all necessary data themselves.

If you do not want to display a header and a footer, assign:

SRichViewEdit1.PageProperty.HeaderVisible := False;

SRichViewEdit1.PageProperty.FooterVisible := False;

Switching between document parts

The active TRichViewEdit control (the control corresponding to the document part containing the caret) is returned in the TSRichViewEdit.ActiveEditor property.

To activate editing of the main document, a header, or a footer, call StartEditing.

To activate editing of a footnote or an endnote, call StartEditNote.

The user can activate editing of the page header/footer by double clicking.

If you use RichViewActions, you can use the following actions to switch between document parts:

TsrvActionEditHeader starts editing a page header;

TsrvActionEditFooter starts editing a page footer;

TsrvActionEditMain to return to the main document.

Then ActiveEditor is changed, OnChangeActiveEditor event occurs.

Editing

All editing operations must be applied to ActiveEditor, for example:

SRichViewEdit1.ActiveEditor.Undo;

ChangeStyleTemplates must not be called for ActiveEditor. It must not be called if ActiveEditor=RVNote.

Operations applied to the whole document (such as saving or loading) must be called for the main editor:

SRichViewEdit1.RichViewEdit.SaveRTF(...);

In the events of TSRichViewEdit (such as OnStyleConversion, OnParaStyleConversion, OnCurTextStyleChanged, OnCurParaStyleChanged) you can distinguish the TRichViewEdit control using the Sender parameter.


Notes and text boxes

Overview

TSRichViewEdit control can edit documents with footnotes, endnotes, sidenotes (notes in a floating box) and floating boxes.

When a note or a text box is being edited, its Document is loaded in TSRichViewEdit.RVNote, ActiveEditor becomes equal to RVNote, CurrentNote returns this note/text box item, CurrentNoteParentEditor returns the editor containing this note.

Footnotes and endnotes can be inserted only in the main document. Sidenotes and text box items can be inserted in the main document, headers and footers.

Limitations:

· document of footnote/endnote must not be higher than one page;
· ChangeStyleTemplates must not be called when a note editor is active.

Notes and text boxes in RichViewActions

TsrvActionInsertFootnote inserts a footnote.

TsrvActionInsertEndnote inserts an endnote.

TsrvActionInsertSidenote inserts a sidenote.

TsrvActionInsertTextBox inserts a text box item.

TsrvActionEditNote starts editing a note or a text box.

TsrvActionReturnToNote moves the caret to the parent footnote/endnote.

Use the actions above instead of their analogs included in RichViewActions for TRichViewEdit controls.

Editing notes and text boxes without RichViewActions

Inserting a new footnote in SRichViewEdit1 (this example does not use StyleTemplates):

var Note: TRVFootnoteItemInfo;

NoteRef: TRVNoteReferenceItemInfo;

rve: TCustomRichViewEdit;

// we can insert a footnote only in the main document

rve := SRichViewEdit1.ActiveEditor;

if rve<>SRichViewEdit1.RichViewEdit then

exit;

// we will use item indices, so we require the top level editor

rve := rve.TopLevelEditor;

// creating a footnote

Note := TRVFootnoteItemInfo.CreateEx(rve.RVData, RVGetNoteTextStyleNo(rve.Style, rve.CurTextStyleNo), 1, False);

// filling Note.Document: adding a footnote number and a space character

NoteRef := TRVNoteReferenceItemInfo.CreateEx(Note.Document, RVGetNoteTextStyleNo(rve.Style, 0));

Note.Document.AddItem('', NoteRef);

Note.Document.AddNL(' ', 0, -1);

// inserting

if rve.InsertItem('', Note) then begin

// starting editing the inserted footnote

SRichViewEdit1.StartEditNote(rve.RVData, rve.CurItemNo);

// moving the caret to the end of the Note.Document

rve := SRichViewEdit1.ActiveEditor; // now rv = SRichViewEdit.RVNote

rve.SetSelectionBounds(rve.ItemCount-1, rve.GetOffsAfterItem(rve.ItemCount-1),

rve.ItemCount-1, rve.GetOffsAfterItem(rve.ItemCount-1));

end;

Returning from RVNote to the parent footnote/endnote:

SRichViewEdit1.ReturnToNote;


TSRichViewEdit

srichviewedit TSRichViewEdit

Properties Methods Events | Overview

 Top Previous Next

TSRichViewEdit is a word processing component.

Unit SclRView.

Syntax

TSRichViewEdit = class(TCustomControl);

Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TCustomControl

Description

The main features of the component are:

· zooming;
· WYSIWYG mode;
· real-time repagination;
· displaying and printing in different formats (e.g. the document in A5 format can be printed in A3 format);
· free positioning of page on the screen (optional);
· variety of document view modes (web mode, draft mode, page view mode, etc.).
· hint on scrolling containing page number and a short text;
· vertical and horizontal lines of buttons in the scroll bar area.

Properties

Main properties

RichViewEdit returns a TRichViewEdit control used to render a document. Use properties and methods of this control to modify document or get information about it.

By default, an internal TRichViewEdit component is used. You can assign an external component to ExternalRV property. If you want to use an external TRVStyle component, use ExternalRVStyle property.

Other editors are used to render different parts of document:

· RVHeader for page header;
· RVFooter for page footer;
· RVNote for notes and text boxes.

The active editor is returned in ActiveEditor property. Additional information about different part of documents is available in overview.

Properties related to page attributes are available in PageProperty.

Properties related to viewing modes are available in ViewProperty.

Properties related to background are available in BackgroundProperty.

Quick access to properties of RichViewEdit

The following properties provide access to properties of RichViewEdit of the same name (some of these properties are applied to ActiveEditor or to all editors, see more information in the topics about these properties):

· AnimationMode
· BiDiMode
· CPEventKind
· ReadOnly
· RTFOptions
· RTFReadProperties
· RVBackgroundBitmap (access to BackgrounBitmap)
· RVBackgroundStyle (access to BackgrounStyle)
· RVColor (access to Color)
· RVEditorOptions (access to EditorOptions)
· RVFOptions
· RVFParaStylesReadMode
· RVFTextStylesReadMode
· RVOptions (access to Options)
· SmartPopupProperties, SmartPopupVisible
· TabNavigation
· UseStyleTemplates, StyleTemplateInsertMode.

These properties (except for a public property SmartPopupVisible) can be used to assign values at design time.

Scrolling

HScrollPos (0..HMaxScrollPos) and VScrollPos (0..VMaxScrollPos) allow getting/setting the scrolling positions.

HScrollBar and VScrollBar hide/show scrollbars.

OnHScrolled and OnVScrolled events occur on scrolling.

ScrolledPage returns the index of the first visible page.

Menus (toolbars) in the scrollbar area

MenuHButtons and MenuHorizontal define properties of horizontal menu.

MenuVButtons and MenuVertical define properties of vertical menu.

Skins

Skins can be applied to scrollbars. Skins are linked using SkinManager property. HScrollBarSkinSchemeIndex and HScrollBarSkinSchemeIndex are used to specify skin schemes for scrollbars.

Converted properties of PageProperty

Some properties return layout-related properties of PageProperty converted to screen pixels and scaled according to ViewProperty.ZoomPercent:

· LeftMarginPix, TopMarginPix, RightMarginPix, BottomMarginPix
· PageHeightPix, PageWidthPix

Menus (toolbars) in scrollbars areas

Buttons are defined in MenuHButtons and MenuVButtons. Properties of menus are defined in MenuHorizontal and MenuVertical.

See also events below.

Methods

Coordinates

ConvertRVToSRV and ConvertSRVToRV allow translating coordinates between this TSRichViewEdit control and RichViewEdit.

GetPageClientRect returns the position of page, GetItemBounds returns the position of item in the page. The page is returned by GetItemPages.

GetCaretPosInUnits returns the caret position on the page.

GetPageAt returns the page at the specified coordinates, GetItemAt returns the item at the specified coordinates.

UnitsPerInchH and UnitsPerInchV allow converting coordinates from units to units.

Finding items

FindNextHyperlink/FindPriorHyperlink, FindNextCheckpoint/FindPriorCheckpoint, FindNextItem/FindPriorItem, FindNextHeading/FindPriorHeading search for hyperlinks, checkpoints, items, headings.

NextCurHyperlink/PriorCurHyperlink, NextCurCheckpoint/PriorCurCheckpoint, NextCurItem/PriorCurItem select the next/previous hyperlink, item with checkpoint, item.

NextCurHeading/PriorCurHeading moves the caret to the next/previous heading.

By default, the search is performed in the whole document. But you can search in the specified range of vertical coordinates, see RangeSearch property.

FirstCurPage, PriorCurPage, NextCurPage, LastCurPage moves the caret to the beginning of the first/previous/next/last page.

Printing

You can print the whole document (PrintAll), the current page (PrintCurrent) or a range of pages (PrintRange).

With MinPrintedItemNo and MaxPrintedItemNo you can define a subrange of items for printing. Items outside of this range are not printed (but places are still reserved for them). Using these properties, you can implement an incremental printing: when the next portion of the document is ready, you can print it below the previously printed fragment.

Drawing on external canvas

DrawPage/DrawMetafile draws page onto the specified canvas/metafile.

Scrolling

ScrollToCaret/ScrollToItem makes the caret/item visible.

GetFirstItemVisibleRV returns the first visible item.

Footnotes and endnotes

Call StartEditNote to edit a footnote/endnote, call ReturnToNote to finish editing.

Additional information can be found in overview.

Events

The most of TSRichViewEdit events provides access to RichViewEdit's events of the same names.

Events on changing properties

OnPageFormatChanged occurs when PageProperty.PageFormat is changed.

OnChangeViewModeAfter and OnChangeViewModeBefore occur when ViewProperty.ViewMode is changed.

OnZoomChanged occurs when ViewProperty.ZoomPercent or .ZoomMode are changed. OnZoomViewChanged occurs when other properties of ViewProperty related to zooming are changed.

Events on scrolling, clicking and caret moving

OnHScrolled, OnVScrolled, OnPageScrolled occur on scrolling.

OnCurrentPageChange occurs when the caret is moved to another page.

OnPageCountChanged occurs when the count of pages is changed.

OnClickPage occurs when the user clicked on the page.

Custom drawing

In addition to custom drawing events of TRVStyle, you can use OnPaintPage for drawing on page, OnPaintComponent for drawing inserted controls, and OnPaint for drawing something else.

Inserted controls

OnPaintComponent allows drawing inserted controls (useful if the default procedure cannot draw them properly).

OnCheckControl allows enumerating all inserted controls.

OnMessageControl allows responding on messages from inserted controls.

Free page position and ordering

OnGetPagePos allows defining position, zooming and Z-order of pages

Menus (toolbars) in scrollbars areas

OnHMenuClickButton and OnVMenuClickButton occur when the user clicked a button.

OnHMenuEnterButton and OnVMenuEnterButton occur when the mouse pointer is above a button.

Table "icons"

When the user moves the mouse pointer above some table, a special icon is displayed at the top left corner of this table (if ViewProperty.UseTableIcons=True).

This icon is displayed for some time (specified in ViewProperty.TableIconDelay) after the mouse pointer leaves this table.

When the user clicks on this icon, OnTableIconClick occurs.


TSRichViewEdit.ActiveEditor

TSRichViewEdit.ActiveEditor (read-only)

 Top Previous Next

Returns the active editor belonging to this TSRichViewEdit control.

property ActiveEditor: TRichViewEdit;

This property returns the editor containing the caret. All editing operations must be applied to this editor.

This property can return one of the following values:

· RichViewEdit
· RVHeader
· RVFooter
· RVNote

When the user starts editing another RichViewEdit, OnChangeActiveEditor event occurs.

See also methods:

· StartEditing
· StartEditNote
· Document parts in TSRichViewEdit


TSRichViewEdit.AnimationMode

Specifies when an animation of images starts.

property AnimationMode: TRVAnimationMode;

Animation is played in ActiveEditor. Animation in other editors is disabled.

To enable gif animation, include in your project:

· RVGifAnimate.pas (animation using the Anders Melander's TGifImage, for Delphi 4-2006);
· RVGifAnimate2007.pas (animation using VCL's TGifImage, for Delphi 2007 or newer);
· RVJvGifAnimate.pas (animation using the JVCL's TJvGifImage).

Default value:

rvaniOnFormat (animation is started automatically)


TSRichViewEdit.BackgroundProperty

Contains background settings.

property BackgroundProperty: TSRVBackgroundProperty;


TSRichViewEdit.BiDiMode

Specifies the default bidirectional mode for the control.

property BiDiMode: TRVBiDiMode;

This property provides access to RichViewEdit's property of the same name.


TSRichViewEdit.BottomMarginPix

TSRichViewEdit.BottomMarginPix, BottomMargin100Pix

Returns the bottom margin, in pixels.

property BottomMarginPix: Integer;

property BottomMargin100Pix: Integer;

The bottom margin is defined in PageProperty.TopMargin. These properties return this margin converted to pixels.

BottomMarginPix is scaled according to ViewProperty.ZoomPercent (so this property returns the margin as it is displayed on the screen).

BottomMargin100Pix is not scaled, it is the margin in 100% zooming.

See also:

· LeftMarginPix
· TopMarginPix
· RightMarginPix


TSRichViewEdit.CanUpdate, CanScroll, CanUpdatePosition

Enables/disables repainting.

property CanUpdate: Boolean;

property CanScroll: Boolean;

property CanUpdatePosition: Boolean;

If CanUpdate=False, the component does not update its image on the screen and does not move the caret.

If CanScroll=False, the component does not scroll itself.

If CanUpdatePosition=False, the component does not scroll to make the caret visible.

See also:

· CalculatePageCount


TSRichViewEdit.CanUpdateMargin

Enables/disables margins changing.

property CanUpdateMargin: Boolean;

If this property is False:

· the component does not allow changing FormatWidth, FormatHeight, PageLeft, PageTop, PageRight, PageBottom, PageBreakHeight, MinPageBreakHeight, MaxPageBreakHeight, properties;
· SetMargin and SetMarginMM functions do not set the margin values.


TSRichViewEdit.CaretBlinkTime

Caret blinking interval.

property CaretBlinkTime: Cardinal;

This property defines the period when the caret remains in one of the states: displayed or not.

Default value:

a system default value returned by GetCaretBlinkTime function.


TSRichViewEdit.CaretPos

Client coordinates of the caret.

property CaretPos: TPoint;

The caret coordinates relative to the top left corner of the component.

See also:

· GetCaretPosInUnit


TSRichViewEdit.CaretVisible

Enable/disable the caret display.

property CaretVisible: Boolean;

CursorVisible indicates whether to display caret or not, for example for implementing a read-only mode or a print preview.

By default the caret is visible.


TSRichViewEdit.CPEventKind

Specifies the mode of generating OnCheckpointVisible event.

property CPEventKind: TCPEventKind;

This property provides access to RichViewEdit's property of the same name.

TSRichViewEdit supports this property&event, despite of the fact that they are not supported by TRichViewEdit.


TSRichViewEdit.CurControl

Returns the control (inserted in the editor) having the input focus.

property CurControl: TControl;

Nil, if no control has focus.

See also:

· OnChangeCurrentControl


TSRichViewEdit.CurrentNote, CurrentNoteParentEditor

TSRichViewEdit.CurrentNote, CurrentNoteParentEditor (read-only)

 Top Previous Next

The properties return the note (or a text box) item edited in RVNote, and the editor containing this note.

property CurrentNote: TCustomRVNoteItemInfo;

property CurrentNoteParentEditor: TCustomRichViewEdit;

These properties return nil if a note is not being edited.

Use StartEditNote to start editing a note, use ReturnToNote to finish editing.

CurrentNote can be of one of the following types:

· footnotes (TRVFootnoteItemInfo)
· endnotes (TRVEndnoteItemInfo)
· sidenotes (TRVSidenoteItemInfo)
· text box items (TRVTextBoxItemInfo)

Footnotes and endnotes can be inserted only in RichViewEdit. Sidenotes and text boxes can be inserted in RichViewEdit, RVHeader and RVFooter.

CurrentNoteParentEditor always returns a root editor (RichViewEdit, RVHeader or RVFooter), even if a note is inserted in a table cell).

See also:

· Footnotes and endnotes


TSRichViewEdit.CurrentPage

Index of the current page (from 1)

property CurrentPage: Integer;

This page contains the caret.

If you assign a value to this property, the caret is moved to the beginning of the specified page.

See also:

· ScrolledPage
· OnCurrentPageChange
· FirstCurPage, PriorCurPage, NextCurPage, LastCurPage


TSRichViewEdit.ExternalRV, -H, -F, -N

TSRichViewEdit.ExternalRV, ExternalRVH, ExternalRVF, ExternalRVN

 Top Previous Next

These properties main contain references to an external TRichViewEdit components used to render documents in this TSRichViewEdit component.

property ExternalRV: TCustomRichViewEdit;

property ExternalRVH: TCustomRichViewEdit;

property ExternalRVF: TCustomRichViewEdit;

property ExternalRVN: TCustomRichViewEdit;

Deprecated! Please do not use these properties!

Assigning these properties is optional. You can assign links to TRichViewEdit components to these properties.

If assigned (not nil):

· ExternalRV is assigned to RichViewEdit
· ExternalRVH is assigned to RVHeader
· ExternalRVF is assigned to RVFooter
· ExternalRVN is assigned to RVNote

By default, these properties are not assigned (nil), and internal TRichViewEdit components are used.

All these components must be different, you cannot assign the same component to two or more of these properties.

Note:

In TDBSRichViewEdit, ExternalRV must be TDBRichViewEdit (ExternalRVH, ExternalRVF, ExternalRVN must still be TRichViewEdits)


TSRichViewEdit.ExternalRVStyle, -Header, -Footer

TSRichViewEdit.ExternalRVStyle, ExternalRVStyleHeader, ExternalRVStyleFooter

 Top Previous Next

These properties allow using external TRVStyle components.

property ExternalRVStyle: TRVStyle;

property ExternalRVStyleHeader: TRVStyle;

property ExternalRVStyleFooter: TRVStyle;

Assigning these properties is optional. You can assign links to TRVStyle components to these properties.

If assigned (not nil):

· ExternalRVStyle is assigned to RichViewEdit.Style
· ExternalRVStyleHeader is assigned to RVHeader.Style
· ExternalRVStyleFooter is assigned to RVFooter.Style

By default, these properties are not assigned (nil), and internal TRVStyle components are used.

All these components must be different, you cannot assign the same component to two or more of these properties.

These properties are useful if you want to define properties of TRVStyle at design time.

If UseStyleTemplates=True, the component assigns:

· RichViewEdit.Style.MainRVStyle = nil;
· RVHeader.Style.MainRVStyle = RichViewEdit.Style
· RVFooter.Style.MainRVStyle = RichViewEdit.Style

If some of these TRVStyle components are external, these assignments are made to their properties too.


TSRichViewEdit.FirstPageNo

TSRichViewEdit.FirstPageNo (read-only)

 Top Previous Next

Returns the index of the first page that will be printed, from 1.

property FirstPageNo: Integer;

This property takes the properties MinPrintedItemNo and MaxPrintedItemNo into account. By default, when these properties define the range including the whole document, FirstPageNo returns 1. If MinPrintedItemNo>0, this property returns the index of the page containing the MinPrintedItemNo-th item (see GetPageNo). If MinPrintedItemNo>=RichViewEdit.ItemCount, FirstPageNo returns PageCount+1 (and nothing will be printed).


TSRichViewEdit.FixMarginsMode

Specifies how to work with too small margins (less than the printer supports).

type

TSRVFixMarginsMode = (srvfmmAutoCorrect, srvfmmIgnore);

property FixMarginsMode : TSRVFixMarginsMode;

This property is similar to TRVPrint's property of the same name.

Mode | Meaning
srvfmmAutoCorrect | Minimal supported margins are used (if the left and/or the top margin were too small, the output is moved to the right and/or down)
srvfmmIgnore | The specified values of margins are used (document may be cropped)

Default value:

srvfmmAutoCorrect

See also

· PageProperty.PrintableAreaPen


TSRichViewEdit.HMaxScrollPos

Returns the maximal position of horizontal scroll bar.

property HMaxScrollPos: Integer;

This is a maximal possible value for HScrollPos.

This is a read-only property.

See also:

· VMaxScrollPos


TSRichViewEdit.HScrollBar

Shows/hides the horizontal scrollbar.

property HScroolBar: Boolean;

Default value:

True (visible)


TSRichViewEdit.HScrollBarSchemeIndex

Determines which skin scheme is used for the horizontal scrollbar.

property HScrollBarSchemeIndex: Integer;

This is an index in SkinManager.CurrentSkin.HorizontalTabSetSchemes collection.

If SkinManager = nil, or SkinManager.CurrentSkin = nil, or this index is not valid for this collection (negative or too large), then this scrollbar has a default (no-skin) appearance.

Default value

0

See also

· VScrollBarSchemeIndex


TSRichViewEdit.HScrollPos

Defines the position of horizontal scroll bar, measured in screen pixels.

property HScrollPos: Integer;

You can use this property for scrolling to the specified position.

Value of this property is in the range 0...HMaxScrollPos.

See also:

· VScrollPos


TSRichViewEdit.LastPageNo

TSRichViewEdit.LastPageNo (read-only)

 Top Previous Next

Returns the index of the last page that will be printed, from 1.

property LastPageNo: Integer;

This property takes the properties MinPrintedItemNo and MaxPrintedItemNo into account. By default, when these properties define the range including the whole document, LastPageNo returns PageCount. If MaxPrintedItemNo is inside the items range (0..RichViewEdit.ItemCount-1), this property returns the index of the page containing the MaxPrintedItemNo-th item (see GetPageNo).


TSRichViewEdit.LeftMarginPix

TSRichViewEdit.LeftMarginPix, LeftMargin100Pix

TSRichViewEdit.GetLeftMarginPix, GetLeftMargin100Pix

 Top Previous Next

Returns the left margin, in pixels.

property LeftMarginPix: Integer;

property LeftMargin100Pix: Integer;

function GetLeftMarginPix(PageNo : Integer) : Integer;

function GetLeftMargin100Pix(PageNo : Integer) : Integer;

The left margin is defined in PageProperty.LeftMargin.

Properties

These properties return this margin converted to pixels.

LeftMarginPix is scaled according to ViewProperty.ZoomPercent (so this property returns the margin as it is displayed on the screen).

LeftMargin100Pix is not scaled, it is the margin in 100% zooming.

Methods

The methods return the left margin for the specified page, taking PageProperty.MirrorMargins into account.

See also:

· TopMarginPix
· RightMarginPix
· BottomMarginPix


TSRichViewEdit.MaxPrintedItemNo

Defines the index of the last item to print.

property MaxPrintedItemNo: Integer;

The component prints items from MinPrintedItemNo to MaxPrintedItemNo. By default, this range includes all items.

The value -1 is treated like RichViewEdit.ItemCount-1, i.e. the document is printed to the end.

Items outside of this range are not printed (but they still occupy their spaces). The pages that do not contain items in this range are skipped (the component prints pages from FirstPageNo to LastPageNo).

These properties allow implementing an incremental printing: when the next portion of the document is ready, it can be printed below the previously printed fragment. This feature can be used for printing accounting journals, logs, etc.

Default value:

-1


TSRichViewEdit.MenuHButtons

A collection of buttons for the horizontal menu.

property MenuHButtons: TSRVButtonCollection;

A horizontal menu (horizontal toolbar) is placed in the horizontal scrollbar area.

Properties of horizontal menu are defined in MenuHorizontal property.

See also:

· MenuVButtons


TSRichViewEdit.MenuHorizontal

Properties of a horizontal menu (horizontal toolbar)

property MenuHorizontal: TSRVPropertyTBH;

See also:

· MenuHButtons
· OnHMenuClickButton
· OnHMenuEnterButton
· MenuVertical


TSRichViewEdit.MenuVButtons

A collection of buttons for the vertical menu.

property MenuVButtons: TSRVButtonCollection;

A vertical menu (vertical toolbar) is placed in the vertical scrollbar area.

Properties of vertical menu are defined in MenuVertical property.

See also:

· MenuHButtons


TSRichViewEdit.MenuVertical

Properties of a vertical menu (vertical toolbar)

property MenuVertical: TSRVPropertyTBV;

See also:

· MenuVButtons
· OnVMenuClickButton
· OnVMenuEnterButton
· MenuHorizontal


TSRichViewEdit.MinPrintedItemNo

Defines the index of the first item to print.

property MinPrintedItemNo: Integer;

The component prints items from MinPrintedItemNo to MaxPrintedItemNo. By default, this range includes all items.

Items outside of this range are not printed (but they still occupy their spaces). The pages that do not contain items in this range are skipped (the component prints pages from FirstPageNo to LastPageNo).

These properties allow implementing an incremental printing: when the next portion of the document is ready, it can be printed below the previously printed fragment. This feature can be used for printing accounting journals, logs, etc.

Default value:

0


TSRichViewEdit.OffsetX

A horizontal offset of document (page) image in the editor window.

property OffsetX: Single;

This property is a maximal value of:

· (ClientWidth - PageWidthPix) div 2
· PageProperty.BoundLeftRight

See also:

· OffsetY


TSRichViewEdit.OffsetY

A vertical offset of document (page) image in the editor window.

property OffsetY: Single;

This property is a maximal value of:

· (ClientHeight - PageHeightPix) div 2
· 0

See also:

· OffsetX


TSRichViewEdit.PageCount

Returns the count of pages in the document.

property PageCount: Integer;

Accessing this property does not invoke a repagination.

Use calculatePageCount method for repagination.


TSRichViewEdit.PageHeightPix, PageHeight100Pix

TSRichViewEdit.PageHeightPix, PageHeight100Pix (read-only)

 Top Previous Next

The properties return a page height of document on the screen.

property PageHeightPix: Integer;

property PageHeight100Pix: Integer;

PageHeightPix returns the page height converted to screen pixels and scaled according to ViewProperty.ZoomPercent (i.e. a page height as it can be seen in the control window).

PageHeight100Pix returns the page height converted to screen pixels in ZoomPercent=100. The same value measured in UnitsProgram is returned in ViewProperty.PageHeight.

The page height is defined in PageProperty.PageHeight.

See also:

· PageWidthPix


TSRichViewEdit.PageNoMouseDown

Returns the index of page (from 1) where a mouse button was pressed last time.

property PageNoMouseDown: Integer;


TSRichViewEdit.PageNoMouseMove

Returns the index of page (from 1) below the mouse pointer.

property PageNoMouseMove: Integer;


TSRichViewEdit.PageProperty

Page properties.

property PageProperty: TSRVPageProperty;


TSRichViewEdit.PageWidthPix, PageWidth100Pix

TSRichViewEdit.PageWidthPix, PageWidth100Pix (read-only)

 Top Previous Next

The properties return a page width of document on the screen.

property PageWidthPix: Integer;

property PageWidth100Pix: Integer;

PageWidthPix returns the page width converted to screen pixels and scaled according to ViewProperty.ZoomPercent (i.e. a page width as it can be seen in the control window).

PageWidth100Pix returns the page width converted to screen pixels in ZoomPercent=100. The same value measured in UnitsProgram is returned in ViewProperty.PageWidth.

The page width is defined in PageProperty.PageWidth.

See also:

· PageHeightPix


TSRichViewEdit.RangeSearch

Allows to narrow a search scope.

RangeSearch: Boolean;

If it is True, the search is performed only in items located between coordinates specified in RangeSearchFirstY..RangeSearchLastY properties.

This range affects the following methods:

· FindPriorItem, FindNextItem,
· FindPriorHyperlink, FindNextHyperlink,
· FindPriorCheckpoint, FindNextCheckpoint,
· PriorCurItem, NextCurItem,
· PriorCurHyperlink, NextCurHyperlink,
· PriorCurCheckpoint, NextCurCheckpoint.

This feature can be used, for example, to search only on the some pages.

Example: searching for the first visible hyperlink (if any hyperlink is visible):

var

RVData: TCustomRVData;

RVData2: TCustomRVFormattedData;

ItemNo, OffsetInItem: Integer;

..

SRichViewEdit1.RangeSearch := True;

SRichViewEdit1.RangeSearchFirstY := 0;

SRichViewEdit1.RangeSearchLastY := SRichViewEdit1.ClientHeight;

SRichViewEdit1.GetFirstItemVisibleRV(RVData2, ItemNo, OffsetInItem);

RVData := RVData2;

Dec(ItemNo);

if FindNextHyperlink(RVData, ItemNo) then

...


TSRichViewEdit.RangeSearchFirstY

Allows to narrow a search scope.

RangeSearchFirstY: Integer;

This is a client coordinate (relative to the top of the component window).

See RangeSeach property.


TSRichViewEdit.RangeSearchLastY

Allows to narrow a search scope.

RangeSearchLastY: Integer;

This is a client coordinate (relative to the top of the component window).

See RangeSeach property.


TSRichViewEdit.ReadOnly

When set to True, this property prevents user's input in the editor; it also blocks execution of all editing-style methods of RichViewEdit.

property ReadOnly : Boolean;

This property provides access to RichViewEdit's property of the same name.


TSRichViewEdit.RichViewEdit

Returns TRichViewEdit component used to render documents.

property RichViewEdit: TRichViewEdit;

TSRichViewEdit can use two types of TRichViewEdit:

· internal: TRichViewEdit component is created inside TSRichViewEdit. Users cannot see it, it is responsible only for document rendering.
· external: refers to external TRichViewEdit component (ExternalRV). Take a note that width and height of this RichViewEdit are set by TSRichViewEdit.

This editor is used to render and edit the main part of document.

Other editors are used to render different parts of document:

· RVHeader for page header;
· RVFooter for page footer;
· RVNote for footnotes and endnotes.

The active editor is returned in ActiveEditor property.

See also:

· Document parts in TSRichViewEdit


TSRichViewEdit.RightMarginPix

TSRichViewEdit.RightMarginPix, RightMargin100Pix

TSRichViewEdit.GetRightMarginPix, GetRightMargin100Pix

 Top Previous Next

Returns the right margin, in pixels.

property RightMarginPix: Integer;

property RightMargin100Pix: Integer;

function GetRightMarginPix(PageNo : Integer) : Integer;

function GetRightMargin100Pix(PageNo : Integer) : Integer

The right margin is defined in PageProperty.RightMargin.

Properties

These properties return this margin converted to pixels.

RightMarginPix is scaled according to ViewProperty.ZoomPercent (so this property returns the margin as it is displayed on the screen).

RightMargin100Pix is not scaled, it is the margin in 100% zooming.

Methods

The methods return the right margin for the specified page, taking PageProperty.MirrorMargins into account.

See also:

· LeftMarginPix
· TopMarginPix
· BottomMarginPix


TSRichViewEdit.RTFOptions

Options for saving RTF (Rich Text Format).

property RTFOptions: TRVRTFOptions;

This property provides access to RichViewEdit's property of the same name.

The initial value of this property for an internal TRichViewEdit includes rvrtfSaveDocParameters (in addition to the options included in the initial value of this property for TRichView)


TSRichViewEdit.RTFReadProperties

A set of properties controlling RTF (Rich Text Format) import.

property RTFReadProperties: TRVRTFReaderProperties;

This property provides access to RichViewEdit's property of the same name.

The initial value of this property for an internal TRichViewEdit has:

· RTFReadProperties.ReadDocParameters = True.
· RTFReadProperties.UnicodeMode = rvruOnlyUnicode for Delphi 2009+ and rvruMixed for the older versions of Delphi.


TSRichViewEdit.RVBackgroundBitmap

Background image shown below the document

property RVBackgroundBitmap: TBitmap;

Provides access to RichViewEdit.BackgroundBitmap property.

See also:

· RVBackgroundStyle
· RVColor


TSRichViewEdit.RVBackgroundStyle

Defines how RVBackgroundBitmap is displayed

property RVBackgroundStyle: TBackgroundStyle;

Provides access to RichViewEdit.BackgroundStyle property.

See also:

· RVColor


TSRichViewEdit.RVColor

Background color of document.

property RVColor: TColor;

Provides access to RichViewEdit.Color property.

See also:

· RVBackgroundStyle
· RVBackgroundBitmap


TSRichViewEdit.RVEditorOptions

Options affecting editing in TRichViewEdit.

property RVEditorOptions: TRVEditorOptions;

Provides access to RichViewEdit.EditorOptions property.


TSRichViewEdit.RVFooter

Specifies the TRichViewEdit control used for editing footers.

property RVFooter: TRichViewEdit;

Footers are visible if PageProperty.FooterVisible = True.

When footer editing is activated, a document is loaded from Subdocuments to RVFooter. Depending on the current page, PageProperty.TitlePage and PageProperty.FacingPages, a document is loaded from one of the following Subdocuments.Items: srvhftFirstPageFooter, srvhftEvenPagesFooter, srvhftNormalFooter. An edited document is saved back when editing is finished, or when the editor needs to be saved or printed.

When this editor is active, it is returned in ActiveEditor property. Only in this case (RVFooter=ActiveEditor) you can assume that the document in it is valid.

Distances from the page border to the footer are defined in PageProperty:

· LeftMargin (from the left side)
· RightMargin (from the right side)
· FooterY (from the bottom side)

Margins properties of this editor (RVFooter.LeftMargin, TopMargin, etc.) are ignored when calculating the footer position.

When the footer is being edited, it is visually indicated by the following properties of ViewProperty:

· Texts
· FooterPen
· FooterTitleFont
· FooterTitleColor

Using an external editor (not recommended!)

You can assign an external TRichViewEdit control to this property. Take a note that width and height of this RichViewEdit are set by TSRichViewEdit.

Assigning nil to this property makes TSRichViewEdit to use a hidden internal TRichViewEdit for the footer (this is a default behavior). Users cannot see it, it is responsible only for document rendering.

See also:

· RVHeader
· RVNote
· RichViewEdit
· Document parts in TSRichViewEdit


TSRichViewEdit.RVFOptions

Options for reading and saving RVF (RichView Format)

property RVFOptions: TRVFOptions;

This property provides access to RichViewEdit's property of the same name.

Initial value (for internal RichViewEdit):

[rvfoLoadDocProperties, rvfoSaveDocProperties,

rvfoSavePicturesBody, rvfoSaveControlsBody,

rvfoIgnoreUnknownPicFmt, rvfoIgnoreUnknownCtrls,

rvfoConvUnknownStylesToZero, rvfoConvLargeImageIdxToZero,

rvfoSaveBinary, rvfoSaveBack, rvfoLoadBack,

rvfoSaveTextStyles, rvfoSaveParaStyles, rvfoSaveLayout,

rvfoLoadLayout]

See also:

· RVFParaStylesReadMode
· RVFTextStylesReadMode


TSRichViewEdit.RVFParaStylesReadMode

Specifies how paragraph styles and list styles are loaded from RVF files or streams.

property RVFParaStylesReadMode: TRVFReaderStyleMode;

This property provides access to RichViewEdit's property of the same name.

See also:

· RVFTextStylesReadMode
· RVFOptions


TSRichViewEdit.RVFTextStylesReadMode

Specifies how text styles are loaded from RVF files or streams.

property RVFTextStylesReadMode: TRVFReaderStyleMode;

This property provides access to RichViewEdit's property of the same name.

See also:

· RVFParaStylesReadMode
· RVFOptions


TSRichViewEdit.RVHeader

Specifies the TRichViewEdit control used for editing headers.

property RVHeader: TRichViewEdit;

Headers are visible if PageProperty.HeaderVisible = True.

When header editing is activated, a document is loaded from Subdocuments to RVHeader. Depending on the current page, PageProperty.TitlePage and PageProperty.FacingPages, a document is loaded from one of the following Subdocuments.Items: srvhftFirstPageHeader, srvhftEvenPagesHeader, srvhftNormalHeader. An edited document is saved back when editing is finished, or when the editor needs to be saved or printed.

When this editor is active, it is returned in ActiveEditor property. Only in this case (RVHeader=ActiveEditor) you can assume that the document in it is valid.

Distances from the page border to the header are defined in PageProperty:

· LeftMargin (from the left side)
· RightMargin (from the right side)
· HeaderY (from the top side)

Margins properties of this editor (RVHeader.LeftMargin, TopMargin, etc.) are ignored when calculating the header position.

When the header is being edited, it is visually indicated by the following properties of ViewProperty:

· Texts
· HeaderPen
· HeaderTitleFont
· HeaderTitleColor

Using an external editor (not recommended!)

You can assign an external TRichViewEdit control to this property. Take a note that width and height of this RichViewEdit are set by TSRichViewEdit.

Assigning nil to this property makes TSRichViewEdit to use a hidden internal TRichViewEdit for the header (this is a default behavior). Users cannot see it, it is responsible only for document rendering.

See also:

· RVFooter
· RVNote
· RichViewEdit
· Document parts in TSRichViewEdit


TSRichViewEdit.RVNote

Returns TRichViewEdit control used to edit notes and text boxes.

property RVNote: TRichViewEdit;

Unlike other similar properties (RVHeader, RVFooter, RichViewEdit), the content of this editor is not persistent after document loading. This TRichViewEdit control is used to edit different footnotes/endnotes (see StartEditNote). The content of this editor is defined only if CurrentNote<>nil.

When this editor is active, it is returned in ActiveEditor property.

Documents of items of the following types can be edited:

· footnotes (TRVFootnoteItemInfo)
· endnotes (TRVEndnoteItemInfo)
· sidenotes (TRVSidenoteItemInfo)
· text box items (TRVTextBoxItemInfo)

See also:

· RVHeader
· RVFooter
· RichViewEdit
· Document parts in TSRichViewEdit
· Footnotes and endnotes


TSRichViewEdit.RVOptions

Options for TRichViewEdit.

property RVOptions: TRVOptions;

Provides access to RichViewEdit.Options property.

Initial value (for internal RichViewEdit):

[rvoAllowSelection, rvoScrollToEnd, rvoTagsArePChars,

rvoAutoCopyText, rvoAutoCopyRVF, rvoAutoCopyImage,

rvoAutoCopyRTF, rvoFormatInvalidate, rvoDblClickSelectsWord,

rvoRClickDeselects]


TSRichViewEdit.ScrolledPage

Returns the index of the first visible page (from 1).

property ScrolledPage: Integer;

This value is not necessary the same as CurrentPage.


TSRichViewEdit.Subdocuments

A list of headers and footers.

type
TSRVSubDocuments = class (TPersistent)
property SubDocuments: TSRVSubDocuments;

The main property of TSRVSubDocuments is Items:

type
TSRVHeaderFooterType = (
srvhftFirstPageHeader, srvhftEvenPagesHeader, srvhftNormalHeader,
srvhftFirstPageFooter, srvhftEvenPagesFooter, srvhftNormalFooter);
TSRVSubDocumentRVData = class (TCustomRVData)
property Items[Index: TSRVHeaderFooterType]: TSRVSubDocumentRVData;

The Index specifies the header or footer type:

Value | Meaning | When used
srvhftFirstPageHeader | Header for the first page | PageProperty.TitlePage=True
srvhftEvenPagesHeader | Header for even pages | PageProperty.FacingPages=True
srvhftNormalHeader | Normal header (for other pages) | Always
srvhftFirstPageFooter | Footer for the first page | PageProperty.TitlePage=True
srvhftEvenPagesFooter | Footer for even pages | PageProperty.FacingPages=True
srvhftNormalFooter | Normal footer (for other pages | Always

Items is the default property, so you can access (for example) the first page header as SRichViewEdit.Subdocuments[srvhftFirstPageHeader].

Headers are shown and used only if PageProperty.HeaderVisible=True. Footers are shown and used only if PageProperty.FooterVisible=True.

Each subdocument is linked to its own TRVStyle object. You can access it as SRichViewEdit.Subdocuments[srvhftFirstPageHeader].GetRVStyle. RichViewEdit.Style is assigned as MainRVStyle to these TRVStyle objects, so they all use a common collection of StyleTemplates.

When an event occurs in some subdocument, RichViewEdit is passed as the Sender parameter of this event.

Editing

When a header is activated for editing (by double clicking or by calling StartEditing), a document is loaded in RVHeader. When a footer is activated for editing, a document is loaded in RVFooter. An edited document is saved back to Subdocuments when the editing is finished, or when the main document needs to be saved or printed. The process of saving and loading data between Subdocuments and RVHeader/RVFooter is completely automatic and transparent for the user.

Saving to files

Headers and footers can be saved in RVF, RTF, DocX files, loaded from RVF, RTF files.

PageProperty.TitlePage and FacingPages only turn on/off displaying of the specific headers and footers. They do not affect saving and loading: all headers and footers are stored.

Assigning PageProperty.HeaderVisible=False prevents saving and loading headers.

Assigning PageProperty.FooterVisible=False prevents saving and loading footers.


TSRichViewEdit.SkinManager

Determines which skin manager is associated with this editor.

property SkinManager: TSRVSkinManager;

SkinManager defines a visual appearance of scrollbars. If it is not specified, scrollbars have a default (no-skin) view.

See also:

· HScrollBarSchemeIndex
· VScrollBarSchemeIndex


TSRichViewEdit.SmartPopupProperties

Properties for "smart popups"

property SmartPopupProperties: TRVSmartPopupProperties;

Provides access to RichViewEdit.SmartPopupProperties property.

TSRichViewEdit uses RichViewEdit.SmartPopupProperties not only for "smart popups" in RichViewEdit, but for "smart popups" in other editors as well (RVHeader, RVFooter, RVNote). Values of SmartPopupProperties of these other editors are ignored.

You can show/hide a button using SmartPopupVisible property.

See also:

· OnSmartPopupClick


TSRichViewEdit.SmartPopupVisible

Shows/hides a "smart popup" button for the current item in ActiveEditor.

property SmartPopupVisible: Boolean;

Properties of this button are defined in SmartPopupProperties.

See also:

· OnSmartPopupClick


TSRichViewEdit.StyleTemplateInsertMode

Controls how RichViewEdit.Style.StyleTemplates affect insertion of RTF and RVF files or streams.

property StyleTemplateInsertMode: TRVStyleTemplateInsertMode;

This property provides access to RichViewEdit's property of the same name.

Default value

rvstimUseTargetFormatting


TSRichViewEdit.TabNavigation

Mode of Tab and Shift + Tab navigation

property TabNavigation: TRVTabNavigationType;

This property provides access to RichViewEdit's property of the same name.

This property does nothing in TSRichViewEdit. Reserved for future.


TSRichViewEdit.TopMarginPix

TSRichViewEdit.TopMarginPix, TopMargin100Pix

Returns the top margin, in pixels.

property TopMarginPix: Integer;

property TopMargin100Pix: Integer;

The top margin is defined in PageProperty.TopMargin. These properties return this margin converted to pixels.

TopMarginPix is scaled according to ViewProperty.ZoomPercent (so this property returns the margin as it is displayed on the screen).

TopMargin100Pix is not scaled, it is the margin in 100% zooming.

See also:

· LeftMarginPix
· RightMarginPix
· BottomMarginPix


TSRichViewEdit.UnitsProgram

Measurement units for page margins and size.

property UnitsProgram: TRVUnits;

This property defines measurement units for:

· page size and margins properties of PageProperty,
· PageWidth and PageHeight properties of ViewProperty.

Note: "pixels" unit assumes 96 dpi (used internally in ScaleRichView).

Default value:

rvuMillimeters


TSRichViewEdit.UseDrawHyperlinksEvent

Specifies whether OnDrawHyperlink event is used.

property UseDrawHyperlinksEvent: Boolean;

This property may be useful if you want to use this event only when drawing on external canvas (DrawMetafile, DrawPage).

Default value:

True


TSRichViewEdit.UseStyleTemplates

Allows or disallows using RichViewEdit.Style.StyleTemplates ("real styles").

property UseStyleTemplates: Boolean;

This property provides access to RichViewEdit's property of the same name.

Default value:

False


TSRichViewEdit.Version

Returns the version of ScaleRichView.

property Version : string;

It is a string like 'v1.6.0'.


TSRichViewEdit.ViewProperty

Contains settings for document displaying.

property ViewProperty: TSRVViewProperty;


TSRichViewEdit.VMaxScrollPos

Returns the maximal position of vertical scroll bar.

property VMaxScrollPos: Integer;

This is a maximal possible value for VScrollPos.

This is a read-only property.

See also:

· HMaxScrollPos


TSRichViewEdit.VScrollBar

Shows/hides the vertical scrollbar.

property VScroolBar: Boolean;

Default value:

True (visible)


TSRichViewEdit.VScrollBarSchemeIndex

Determines which skin scheme is used for the vertical scrollbar.

property VScrollBarSchemeIndex: Integer;

This is an index in SkinManager.CurrentSkin.VerticalScrollBarSchemes collection.

If SkinManager = nil, or SkinManager.CurrentSkin = nil, or this index is not valid for this collection (negative or too large), then this scrollbar has a default (no-skin) appearance.

Default value

0

See also

· HScrollBarSchemeIndex


TSRichViewEdit.VScrollPos

Defines the position of vertical scroll bar, measured in screen pixels.

property VScrollPos: Integer;

You can use this property for scrolling to the specified position.

Value of this property is in the range 0...VMaxScrollPos.

See also:

· HScrollPos


TSRichViewEdit.BeginComponentsUpdate

Locks redrawing of inserted controls.

procedure BeginComponentsUpdate;

Inserted components will not be repainted until EndComponentsUpdate is called.

Calls to BeginComponentsUpdate and EndComponentsUpdate may be nested.

If redrawing of inserted controls is locked, repainting is faster.


TSRichViewEdit.CalculateAllPagePositions

Recalculates positions, zooming and Z-orders for all pages.

procedure CalculateAllPagePositions;

This method calls OnGetPagePos event for all pages.

This event is used only if ViewProperty.FreePosPage = True. Usually page positions are calculated automatically. Call this method if you want to recalculate them for existing pages.

Z-orders are recalculated only if PageProperty.UsePageOrders = True.

See also:

· CalculatePagePosition


TSRichViewEdit.CalculatePageCount

Repaginates and returns the page count.

function CalculatePageCount: Integer;

Usually, if a document is changed by editing-style methods, it is is repaginated automatically.

Call this method in the following cases:

· if you modified a document using viewer-style methods (methods that do not call OnChange)
· if you blocked updating with CanUpdate property

Return value:

count of pages

See also:

· PageCount property


TSRichViewEdit.CalculatePagePosition

Recalculates position, zooming and Z-order for the specified page.

function CalculatePagePosition(PageNo : Integer): Boolean;

PageNo is a page index, from 1.

This method calls OnGetPagePos event for this page.

This event is used only if ViewProperty.FreePosPage = True. Usually page positions are calculated automatically. Call this method if you want to recalculate them for the existing page.

Z-orders are recalculated only if PageProperty.UsePageOrders = True.

See also:

· CalculateAllPagePositions


TSRichViewEdit.Clear

Clears the whole editor content and deletes all unused styles.

procedure Clear;

This method calls Clear and DeleteUnusedStyles(True,True,True) for:

· RichViewEdit
· Subdocuments
· RVHeader
· RVFooter

See also:

· Document parts in TSRichViewEdit


TSRichViewEdit.ConvertRVtoSRV

Converts client coordinates in ActiveEditor to client coordinates of this TSRichViewEdit component.

function ConvertRVtoSRV(p: TPoint) : TPoint;

Input parameters:

p – coordinates relative to the top left corner of ActiveEditor.

Return value:

coordinates relative to the top left corner of TSRichViewEdit's window.

See also

· ConvertSRVToRV


TSRichViewEdit.ConvertSRVtoRV

Converts client coordinates in this TSRichViewEdit component to client coordinates of ActiveEditor.

function ConvertSRVtoRV(p: TPoint; var bInTextArea, bInLeft, bInPageArea: Boolean): TPoint;

Input parameters:

p – coordinates relative to the top left corner of TSRichViewEdit's window.

Output parameters:

bInTextArea – True if p is inside of some page's content area.

bInLeft – True if p is to the left of some page (in the "line selection" area).

InPageArea – True if p is inside of some page's area (above content or above margins).

Return value:

coordinates relative to the top left corner of ActiveEditor.

See also:

· ConvertRVToSRV

Example:

This code assigns text of the item at the position of the mouse pointer to Label1.Caption

// OnMouseMove event

procedure TForm3.SRichViewEdit1MouseMove(Sender: TObject;

Shift: TShiftState; X, Y: Integer);

var pt: TPoint;

RVData: TCustomRVFormattedData;

InPageArea, InLeftArea, InTextArea: Boolean;

ItemNo, Offs: Integer;

begin

pt := SRichViewEdit1.ConvertSRVtoRV(Point(X, Y), InTextArea, InLeftArea, InPageArea);

if InTextArea then begin

pt := SRichViewEdit1.ActiveEditor.ClientToDocument(pt);

SRichViewEdit1.ActiveEditor.GetItemAt(pt.X, pt.Y, RVData, ItemNo, Offs, True);

if ItemNo>=0 then

Label1.Caption := RVData.GetItemText(ItemNo)

else // in page, but not in item

Label1.Caption := '';

end

else // not in page

Label1.Caption := '';

end;


TSRichViewEdit.ConvertToTwips, ConvertToPixels, ConvertToDifferentUnits

The methods convert lengths in the documents and RVStyle components to twips or pixels.

procedure ConvertDocToTwips;

procedure ConvertDocToPixels;

procedure ConvertDocToDifferentUnits(NewUnits: TRVStyleUnits);

The methods convert documents and RVStyles of the following properties to new units:

· RichViewEdit
· Subdocuments
· RVFooter
· RVHeader
· RVNote (if a note is being edited)

The methods convert documents in these editors (using ConvertDocTo* methods) and their RVStyles (using Style.ConvertTo* methods).

If you do not change RVStyles of these editors (and rvfoCanChangeUnits is not included in their RVFOptions), it is enough to call a conversion method one time, unit of measurement will be kept.


TSRichViewEdit.Copy

Copies the selected fragment to the Clipboard. Copies in all supported formats (such as text, RVF, RTF and images).

procedure Copy;

This procedure does nothing if the selection is empty.

This procedure empties the Clipboard before copying.

This method should be called only when document is formatted.

This method calls RichViewEdit.CopyDef.

See also:

· OnCopy


TSRichViewEdit.Create

A constructor, creates a new instance of TSRichViewEdit.

constructor Create(AOwner: TComponent);

AOwner is another component, typically the form, that is responsible for freeing the control. It becomes the value of the Owner property.

Controls placed on form at design time are created automatically.


TSRichViewEdit.Cut

Cuts the selected fragment to the Clipboard.

procedure Cut;

This procedure does nothing if the selection is empty.

This procedure empties the Clipboard before copying.

This method should be called only when document is formatted.

This method calls RichViewEdit.CutDef.

See also:

· OnCopy


TSRichViewEdit.DeletePage

Deletes content of the PageNo-th page, as an editing operation.

procedure DeletePage(PageNo : Integer);

It's not guaranteed that after calling this method other pages will not be changed. It's not even guaranteed that page count will be decreased exactly by 1.


TSRichViewEdit.Destroy

Disposes of the component.

destructor Destroy; override;

Do not call Destroy directly. Call Free instead. Free verifies that the component is not nil, and only then calls Destroy.

Never explicitly free a component in one of its own event handlers, nor free a component from the event handler of a component that it owns or contains.

Note: A form owns all the controls and non-visual components that are placed on it in design mode. When it is freed, all of these components are automatically freed as well.


TSRichViewEdit.DrawMetafile

Paints the specified page in the metafile.

procedure DrawMetafile(PageNo : Integer; PicturePage : TMetafile;

PageNoVisible, ClipMargins, Printing : Boolean);

PageNo – index of page, from 1.

PicturePage – a metafile to draw. Page image will be scaled to PicturePage.Width x PicturePage.Height.

PageNoVisible specifies whether to print page numbers (see the properties of PageProperty).

ClipMargins specifies whether all drawing outside the document area (i.e. drawing on margins) will be cropped.

Printing specifies whether this is a drawing for printing (a special method for drawing pictures is used in this case).

See also:

· DrawPage
· OnDrawHyperlink


TSRichViewEdit.DrawPage

Draws the PageNo-th page onto the specified canvas.

procedure DrawPage(PageNo, PageWd, PageHt, OffX, OffY: Integer;

CanvasPage: TCanvas; PageNoVisible, ClipMargins, Printing : Boolean);

PageNo – index of page, from 1.

CanvasPage – a canvas where to draw.

Bounds(OffX, OffY, PageWd, PageHt) defines a rectangle on CanvasPage where the page will be drawn. Page image will be scaled to PageWd x PageHt.

PageNoVisible specifies whether to print page numbers (see the properties of PageProperty).

ClipMargins specifies whether all drawing outside the document area (i.e. drawing on margins) will be cropped.

Printing specifies whether this is a drawing for printing (a special method for drawing pictures is used in this case).

See also:

· DrawMetafile
· OnDrawHyperlink


TSRichViewEdit.EndComponentsUpdate

Unlocks redrawing of inserted controls.

procedure EndComponentsUpdate;

Unlocks redrawing of inserted controls, locked by BeginComponentsUpdate.

Calls to BeginComponentsUpdate and EndComponentsUpdate may be nested.


TSRichViewEdit.FindNextCheckpoint

Finds the location of the next checkpoint.

function FindNextCheckpoint(var RVData : TCustomRVData;

var ItemNo : Integer; CheckRaiseEvent : Boolean) : Boolean;

Unlike TCustomRichView's methods for checkpoints enumeration, this method correctly processes checkpoints in table cells.

The search can be limited to the specified range of coordinates, see RangeSearch.

Input parameters:

RVData, ItemNo – starting position for the search. The search starts from the next item. RVData is a document (RichViewEdit.RVData, table cell, or cell inplace editor's RVData; if the cell is edited, it must be an inplace editor's RVData), ItemNo is an index of item in this document.

CheckRaiseEvent – if True, searches only for checkpoints with "raise event" flag.

Output parameters:

RVData, ItemNo – position of the found checkpoint. Valid only if the method returns True.

Return value:

True if found.

See also:

· FindPriorCheckpoint
· NextCurCheckpoint
· FindNextHyperlink
· FindNextItem


TSRichViewEdit.FindNextHeading

Finds the location of the next heading.

function FindNextHeading(var RVData: TCustomRVData; var ItemNo: Integer): Boolean;

The search can be limited to the specified range of coordinates, see RangeSearch.

Heading is a paragraph with OutlineLevel property > 0.

Input parameters:

RVData, ItemNo – starting position for the search. The search starts from the next item. RVData is a document (RichViewEdit.RVData, table cell, or cell inplace editor's RVData; if the cell is edited, it must be an inplace editor's RVData), ItemNo is an index of item in this document.

Output parameters:

RVData, ItemNo – position of the found item. Valid only if the method returns True.

Return value:

True if found.

See also:

· FindPriorItem
· NextCurItem
· FindNextCheckpoint
· FindNextHyperlink


TSRichViewEdit.FindNextHyperlink

Finds the location of the next hyperlink.

function FindNextHyperlink(var RVData: TCustomRVData;

var ItemNo: Integer): Boolean;

The search can be limited to the specified range of coordinates, see RangeSearch.

Input parameters:

RVData, ItemNo – starting position for the search. The search starts from the next item. RVData is a document (RichViewEdit.RVData, table cell, or cell inplace editor's RVData; if the cell is edited, it must be an inplace editor's RVData), ItemNo is an index of item in this document.

Output parameters:

RVData, ItemNo – position of the found hyperlink. Valid only if the method returns True.

Return value:

True if found.

See also:

· FindPriorHyperlink
· NextCurHyperlink
· FindNextCheckpoint
· FindNextItem


TSRichViewEdit.FindNextItem

Finds the location of the next item of the specified styles (types).

function FindNextItem(StyleNo: array of Integer;

var RVData: TCustomRVData; var ItemNo: Integer) : Boolean;

The search can be limited to the specified range of coordinates, see RangeSearch.

Input parameters:

StyleNo – a list of styles (types) for searching.

RVData, ItemNo – starting position for the search. The search starts from the next item. RVData is a document (RichViewEdit.RVData, table cell, or cell inplace editor's RVData; if the cell is edited, it must be an inplace editor's RVData), ItemNo is an index of item in this document.

Output parameters:

RVData, ItemNo – position of the found item. Valid only if the method returns True.

Return value:

True if found.

Example:

var

RVData: TCustomRVData;

ItemNo: Integer;

...

// searching for the first image in the document

RVData := SRichViewEdit1.RichViewEdit.RVData;

ItemNo := -1;

if SRichViewEdit1.FindNextItem([rvsPicture, rvsHotPicture, rvsBullet, rvsHotspot], RVData, ItemNo) then

...

See also:

· FindPriorItem
· NextCurItem
· FindNextCheckpoint
· FindNextHyperlink


TSRichViewEdit.FindPriorCheckpoint

Finds the location of the previous checkpoint.

function FindNextCheckpoint(var RVData : TCustomRVData;

var ItemNo : Integer; CheckRaiseEvent : Boolean) : Boolean;

Unlike TCustomRichView's methods for checkpoints enumeration, this method correctly processes checkpoints in table cells.

The search can be limited to the specified range of coordinates, see RangeSearch.

Input parameters:

RVData, ItemNo – starting position for the search. The search starts from the previous item. RVData is a document (RichViewEdit.RVData, table cell, or cell inplace editor's RVData; if the cell is edited, it must be an inplace editor's RVData), ItemNo is an index of item in this document.

CheckRaiseEvent – if True, searches only for checkpoints with "raise event" flag.

Output parameters:

RVData, ItemNo – position of the found checkpoint. Valid only if the method returns True.

Return value:

True if found.

See also:

· FindNextCheckpoint
· PriorCurCheckpoint
· FindPriorHyperlink
· FindPriorItem


TSRichViewEdit.FindPriorHeading

Finds the location of the next heading.

function FindPriorHeading(var RVData: TCustomRVData; var ItemNo: Integer): Boolean;

The search can be limited to the specified range of coordinates, see RangeSearch.

Heading is a paragraph with OutlineLevel property > 0.

Input parameters:

RVData, ItemNo – starting position for the search. The search starts from the previous item. RVData is a document (RichViewEdit.RVData, table cell, or cell inplace editor's RVData; if the cell is edited, it must be an inplace editor's RVData), ItemNo is an index of item in this document.

Output parameters:

RVData, ItemNo – position of the found item. Valid only if the method returns True.

Return value:

True if found.

See also:

· FindNextItem
· PriorCurItem
· FindPriorCheckpoint
· FindPriorHyperlink


TSRichViewEdit.FindPriorHyperlink

Finds the location of the previous hyperlink.

function FindPriorHyperlink(var RVData: TCustomRVData;

var ItemNo: Integer): Boolean;

The search can be limited to the specified range of coordinates, see RangeSearch.

Input parameters:

RVData, ItemNo – starting position for the search. The search starts from the previous item. RVData is a document (RichViewEdit.RVData, table cell, or cell inplace editor's RVData; if the cell is edited, it must be an inplace editor's RVData), ItemNo is an index of item in this document.

Output parameters:

RVData, ItemNo – position of the found hyperlink. Valid only if the method returns True.

Return value:

True if found.

See also:

· FindNextHyperlink
· PriorCurHyperlink
· FindPriorCheckpoint
· FindPriorItem


TSRichViewEdit.FindPriorItem

Finds the location of the next item of the specified styles (types).

function FindPriorItem(StyleNo: array of Integer;

var RVData: TCustomRVData; var ItemNo: Integer) : Boolean;

The search can be limited to the specified range of coordinates, see RangeSearch.

Input parameters:

StyleNo – a list of styles (types) for searching.

RVData, ItemNo – starting position for the search. The search starts from the previous item. RVData is a document (RichViewEdit.RVData, table cell, or cell inplace editor's RVData; if the cell is edited, it must be an inplace editor's RVData), ItemNo is an index of item in this document.

Output parameters:

RVData, ItemNo – position of the found item. Valid only if the method returns True.

Return value:

True if found.

Example:

var

RVData: TCustomRVData;

ItemNo: Integer;

...

// searching for the last image in the document

RVData := SRichViewEdit1.RichViewEdit.RVData;

ItemNo := SRichViewEdit1.RichViewEdit.ItemCount;

if SRichViewEdit1.FindPriorItem([rvsPicture, rvsHotPicture, rvsBullet, rvsHotspot], RVData, ItemNo) then

...

See also:

· FindNextItem
· PriorCurItem
· FindPriorCheckpoint
· FindPriorHyperlink


TSRichViewEdit.FirstCurPage

Moves the caret to the beginning of the first page.

procedure FirstCurPage;

The same affect as CurrentPage := 1.

See also:

· PriorCurPage, NextCurPage, LastCurPage


TSRichViewEdit.Format, Reformat

The methods format the document completely. Only formatted documents can be displayed or edited. In addition, this methods copy properties (document size, margins, etc.) from RichViewEdit.DocParameters to PageProperty.

procedure Format;

procedure Reformat;

The difference between these methods is the following. Format does not require document to be formatted before its call, and it moves the caret to the beginning. Reformat can be called only if the document is already formatted, and it keeps the selection and the caret position.

Format/Reformat do the following work:

· loads header and footer from Subdocuments to RVHeader and RVFooter
· SetRVMargins(True/False).
· paginates the document

Call Format after loading files in RichViewEdit.

Call Reformat after calling SetIntPropertyEd(..., False)/SetFloatPropetyEd(...False).

See also:

· Document parts in TSRichViewEdit


TSRichViewEdit.GetCaretPosInUnits

Returns the caret coordinates relative to the top left corner of the page.

function GetCaretPosInUnits(Units: TRVUnits; var CaretPosX, CaretPosY: TRVLength) : Boolean;

Units define the measurement units for the output coordinates. Note: "pixels" unit assumes 96 dpi (used internally in ScaleRichView).

The coordinates are returned in CaretPosX, CaretPosY.

Return value:

True if the caret position is successfully returned.

See also:

· CaretPos
· OnCaretMove


TSRichViewEdit.GetCurrentLineCol

Returns a line and column at the caret position in ActiveEditor.

procedure GetCurrentLineCol(var Line, Column: Integer);

Number of the first line on the page is 1. Number of the leftmost caret position in the line is 1.

If the caret is in a table cell, the method returns values for this table.


TSRichViewEdit.GetFirstItemVisibleRV

Returns the first visible item.

procedure GetFirstItemVisibleRV(var RVData: TCustomRVFormattedData;

var ItemNo, OffsetInItem: Integer);

This function returns the position where the caret would be placed if the user clicked at the top left corner of TSRichViewEdit control's window.

RVData is a document (RichViewEdit.RVData, table cell, or cell inplace editor's RVData), ItemNo is an index of item in this document, OffsetInItem is a position inside this item.

See also:

· GetLastItemVisibleRV


TSRichViewEdit.GetFirstVisiblePage

Returns the index of the first page visible on the screen (at least partially), from 1

function GetFirstVisiblePage: Integer;

See also:

· GetLastVisiblePage


TSRichViewEdit.GetItemAt

Returns the ActiveEditor's item at the specified coordinates.

function GetItemAt(X, Y : Integer; var RVData: TCustomRVFormattedData;

var ItemNo, OffsetInItem: Integer; Strict: Boolean): Boolean;

Input parameters:

X, Y – coordinates relative to the client area of TSRichViewEdit control.

If Strict=True, the method returns the item only if it is located exactly at the specified position (if it exists). If False, the method returns the closest item for any position above a page.

Output parameters:

Output parameters are valid only if this method returns True.

RVData – object containing this item (ActiveEditor.RVData or table cell or RVData of cell inplace editor)

ItemNo – index of item (in the items list of RVData), or -1 if no item was found.

OffsetInItem – position of this item:

· for non-text: 0 (closer to the beginning of the item) or 1 (to the end);
· for text: position is before the OffsetInItem-th character of text; characters are indexed from 1, the last position is Length(text)+1.

Return value:

"item found?"


TSRichViewEdit.GetItemBounds

TSRichViewEdit.GetItemBounds, GetItemBounds100

The methods return the coordinates and size of the specified item or its part.

function GetItemBounds(RVData: TCustomRVData; ItemNo: Integer; Part: Integer = -1) : TRect;

RVData is a document (RichViewEdit.RVData, table cell, or cell inplace editor's RVData), ItemNo is an index of item in this document.

If Part=-1, the result is returned for the whole item. Otherwise, it is returned for the specified item part, counted from 0. A text item may have more than one part if drawn on several lines. To enumerate all parts, start calling this method from Part=0 and increase this value until the method returns Rect(-1, -1, -1, -1). You can use the function RichViewEdit.RVData.GetItemPart to get the item part for the position in the document.

The returned coordinates are relative to the top left corner of the item's (or part's) page (see GetItemPages). If the item spans across several pages (it is possible only if Part=-1), the top left corner is relative to the first item page, the bottom left corner is relative to the last item page.

Coordinates are scaled (see ViewProperty.ZoomPercent).

To get the client coordinates of the item, add top and left coordinates returned by GetPageClientRect.

function GetItemBounds100(RVData: TCustomRVFormattedData;

ItemNo: Integer; var ARect: TRect; var PageNoB, PageNoE: Integer; Part: Integer = -1) : Boolean;

This method is similar, but:

· the resulting coordinates are returned in ARect parameter; they are is valid only if this method returns True;
· the coordinates are not scaled (they correspond to zooming = 100%)
· this method returns False if an incorrect part index is specified; all output parameters are valid only if this method returns True;
· this method returns the fist and the last item (or part) pages in PageNoB and PageNoE parameters, so it is not necessary to call GetItemPages;

See also:

· GetItemCoords100


TSRichViewEdit.GetItemCoords100

The methods return the coordinates of the specified item or its part.

function GetItemCoords100(RVData: TCustomRVFormattedData; ItemNo: Integer;

var ALeft, ATop: Integer; var PageNo: Integer; Part : Integer = -1): Boolean;

Input parameters

RVData is a document (RichViewEdit.RVData, table cell, or cell inplace editor's RVData), ItemNo is an index of item in this document.

If Part=-1, the result is returned for the whole item. Otherwise, it is returned for the specified item part, counted from 0. A text item may have more than one part if drawn on several lines. To enumerate all parts, start calling this method from Part=0 and increase this value until the method returns False (since the item is started from the 0th part, the method returns the same values for Part=-1 and Part=0). You can use the function RichViewEdit.RVData.GetItemPart to get the item part for the position in the document.

The returned coordinates are relative to the top left corner of the item's (or part's) page (see GetItemPages). If the item spans across several pages (it is possible only if Part=-1), the top left corner is relative to the first item page, the bottom left corner is relative to the last item page.

Coordinates are not scaled (they correspond to zooming = 100%).

See also:

· GetItemBounds, GetItemBounds100


TSRichViewEdit.GetItemPages

Returns pages containing the specified item.

function GetItemPages(RVData: TCustomRVFormattedData; ItemNo: Integer;

var FirstPageNo, LastPageNo: Integer; Part : Integer = -1): Boolean;

Input parameters:

RVData is a document (RichViewEdit.RVData, table cell, or cell inplace editor's RVData), ItemNo is an index of item in this document.

If Part=-1, the result is returned for the whole item. Otherwise, it is returned for the specified item part, counted from 0. A text item may have more than one part if drawn on several lines. To enumerate all parts, start calling this method from Part=0 and increase this value until the method returns False. You can use the function RichViewEdit.RVData.GetItemPart to get the item part for the position in the document.

Output parameters:

FirstPageNo – the first page where this item (or its part) is located, from 1.

LastPageNo – the last page where this item (or its part) is located, from 1.

Return value:

True if the specified item part exists.


TSRichViewEdit.GetLastItemVisibleRV

Returns the last visible item.

procedure GetFirstItemVisibleRV(var RVData: TCustomRVFormattedData;

var ItemNo, OffsetInItem: Integer);

This function returns the position where the caret would be placed if the user clicked at the bottom left corner of TSRichViewEdit control's window.

RVData is a document (RichViewEdit.RVData, table cell, or cell inplace editor's RVData), ItemNo is an index of item in this document, OffsetInItem is a position inside this item.

See also:

· GetFirstItemVisibleRV


TSRichViewEdit.GetLastVisiblePage

Returns the index of the last page visible on the screen (at least partially), from 1

function GetLastVisiblePage: Integer;

See also:

· GetFirstVisiblePage


TSRichViewEdit.GetPageAt

Returns the page at the specified coordinates.

function GetPageAt(X, Y: Integer; var PageNo: Integer) : Boolean;

Input parameters:

X, Y – client coordinates (relative to the top left corner of TSRichViewEdit component's window)

Output parameter:

PageNo – index of page, from 1. Valid only if the method returns True.

Return value:

True if the position is inside a page.


TSRichViewEdit.GetPageClientRect

Returns client coordinates of the specified page.

function GetPageClientRect(PageNo: Integer): TRect;

NoPage is the index of page (from 1).

Return value:

page area (TRect) relative to the top left corner of the component's client area.


TSRichViewEdit.GetPageLastItemNo

Returns the index of the last item at the end of the PageNo-th page.

procedure GetPageLastItemNo(PageNo: Integer; var ItemNo, Offs: Integer);

Input parameter

PageNo is a page index, from 1.

Output parameters

ItemNo – index of the item ending this page. This value is in range 0..RichViewEdit.ItemCount-1.

Offs – defines the position in the ItemNo-th item, where the last line on the page ends. For all items except for tables, this is an offset in item:

· for text items, this is the index of the character ending the page (from 1)+1,
· for non-text items (except for tables), this parameter equals to 1;
· for tables, this is the index of the last row on this page (from 0).

See also:

· GetPageStartItemNo


TSRichViewEdit.GetPageNo

Returns the index of page for the specified position in the document.

function GetPageNo(RVData: TCustomRVFormattedData; ItemNo, Offs : Integer): Integer;

Parameters:

The parameters define a position in the source document,

RVData is a document/subdocument. It can be either RVData of the source TRichView control, or table cell, or RVData of a cell inplace editor.

ItemNo is the index of item in this RVData.

OffsetInItem is the position inside this item. For non-text items, 0 is a position before the item, 1 is a position after the item. For text items, offsets are counted from 1 (1 - before the first character, 2 - before the second character, ... Length+1 - after the last character).

Return value:

Index of the page for this position, from 1.


TSRichViewEdit.GetPageStartItemNo

Returns the index of the first item at the beginning of the PageNo-th page.

procedure GetPageStartItemNo(PageNo: Integer; var ItemNo, Offs: Integer);

Input parameter

PageNo is a page index, from 1.

Output parameters

ItemNo – index of the item starting this page. This value is in range 0..RichViewEdit.ItemCount-1.

Offs – defines the position in the ItemNo-th item, where the first line on the page starts. For all items except for tables, this is an offset in item:

· for text items, this is the index of the character starting the page (from 1);
· for non-text items (except for tables), this parameter equals to 0;
· for tables, this is the index of the first row on this page (from 0) (see GetPageStartTableItem and GetPageStartTableRow).

See also:

· GetPageLastItemNo


TSRichViewEdit.GetPageStartTableItem

Returns the index of table item (TRVTableItemInfo) at the beginning of the PageNo-th page.

function GetPageStartTableItem(PageNo: Integer) : Integer;

PageNo is a page index, from 1.

Return value:

item index of table in RichViewEdit, or -1 if the page is not started from a table.

See also:

· GetPageStartTableRow


TSRichViewEdit.GetPageStartTableRow

Returns the index of table row at the beginning of the PageNo-th page.

function GetPageStartTableRow(PageNo : Integer) : Integer;

PageNo is a page index, from 1.

Return value:

index of row in the table, or -1 if the page is not started from a table.

The table is TRVTableItemInfo(RichViewEdit.GetItem(GetPageStartTableItem)), if GetPageStartTableItem>=0.


TSRichViewEdit.GetTableIconItem

The function returns the table for which the "icon" (rectangle in the top left corner) is displayed.

function GetTableIconItem: TRVTableItemInfo;

This method can be used in OnTableIconClick event.

If a table icon is not displayed, the function returns nil.

Table icon is displayed when the user moves the mouse pointer above the table, if ViewProperty.UseTableIcons=True.


TSRichViewEdit.GetTableIconRVData

The function returns a document containing the table for which the "icon" (rectangle in the top left corner) is displayed.

function GetTableIconRVData: TCustomRVFormattedData;

The returned value may be RichViewEdit.RVData, table cell, or cell inplace editor's RVData.

This method can be used in OnTableIconClick event.

If a table icon is not displayed, the function returns nil.

Table icon is displayed when the user moves the mouse pointer above the table, if ViewProperty.UseTableIcons=True.


TSRichViewEdit.InsertPageBreak

Inserts a page break in the position of the caret.

procedure InsertPageBreak;

The same as RichViewEdit.InsertPageBreak, but keeps the selection.


TSRichViewEdit.InZoomRect

Zoom the rectangle in by the specified Ratio.

function InZoomRect(r: TRect; Ratio: Single): TRect;

This method multiples all coordinates in r by Ratio and returns the modified rectangle.

This method may be useful for calculating coordinates in TSRichViewEdit component.

See also:

· OutZoomRect
· ViewProperty.ZoomPercent


TSRichViewEdit.LastCurPage

Moves the caret to the beginning of the last page.

procedure LastCurPage;

The same affect as CurrentPage := PageCount.

See also:

· FirstCurPage, PriorCurPage, NextCurPage


TSRichViewEdit.LoadRVF

Load data in RVF (RichView Format) from the file FileName

function LoadRVF(FileName: String): Boolean;

This method calls RichViewEdit.LoadRVF, then formats a header and a footer and calls SetRVMargins.

Return value:

True if loading was successful


TSRichViewEdit.LoadRVFFromStream

Load data in RVF (RichView Format) from Stream.

function LoadRVFFromStream(Stream: TStream): Boolean;

This method calls RichViewEdit.LoadRVFFromStream, then formats a header and a footer and calls SetRVMargins.

Return value:

True if loading was successful


TSRichViewEdit.NextCurCheckpoint

Selects the next item having a checkpoint.

function NextCurCheckpoint: Boolean;

The search is started from the next item after the caret position (RichViewEdit.TopLevelEditor.RVData, RichViewEdit.TopLevelEditor.CurItemNo).

If a checkpoint is found, the method selects its item and returns True.

See also

· PriorCurCheckpoint


TSRichViewEdit.NextCurHeading

Moves the caret to the beginning of the next heading.

function NextCurHeading: Boolean;

The search is started from the next item after the caret position (RichViewEdit.TopLevelEditor.RVData, RichViewEdit.TopLevelEditor.CurItemNo).

If an item is found, the method moves the caret and returns True.

Heading is a paragraph with OutlineLevel property > 0.

See also:

· PriorCurHeading


TSRichViewEdit.NextCurHyperlink

Selects the next hyperlink.

function NextCurHyperlink : Boolean;

The search is started from the next item after the caret position (RichViewEdit.TopLevelEditor.RVData, RichViewEdit.TopLevelEditor.CurItemNo).

If a hyperlink is found, the method selects it and returns True.

See also

· PriorCurHyperlink


TSRichViewEdit.NextCurItem

Selects the next item of one of the specified styles (types).

function NextCurItem(StyleNo: array of Integer) : Boolean;

StyleNo – a list of styles (types) for searching. If this array is empty, this method searches for any item.

The search is started from the next item after the caret position (RichViewEdit.TopLevelEditor.RVData, RichViewEdit.TopLevelEditor.CurItemNo).

If an item is found, the method selects it and returns True.

This method can be used for the command "Find Picture" and "Find Table" in the horizontal toolbar.

See also:

· PriorCurItem


TSRichViewEdit.NextCurPage

Moves the caret to the beginning of the next page.

procedure NextCurPage;

The same affect as

if CurrentPage < PageCount then

CurrentPage := CurrentPage + 1;

See also:

· FirstCurPage, PriorCurPage, LastCurPage
· NextCurHyperlink
· NextCurCheckpoint
· NextCurItem


TSRichViewEdit.OutZoomRect

Zoom the rectangle out by the specified Ratio.

function OutZoomRect(r: TRect; Ratio: Single): TRect;

This method divides all coordinates in r by Ratio and returns the modified rectangle.

This method may be useful for calculating coordinates in TSRichViewEdit component.

See also:

· OutZoomRect
· ViewProperty.ZoomPercent


TSRichViewEdit.Paste

Pastes data from the Clipboard in the caret position.

procedure Paste;

This method calls RichViewEdit.Paste.

See also:

· OnPaste


TSRichViewEdit.PrintAll

Prints the document.

procedure PrintAll;

This method takes MinPrintedItemNo and MaxPrintedItemNo properties into account.

The printer is defined in Printer.PrinterIndex.

See also:

· PrintCurrent
· PrintRange


TSRichViewEdit.PrintCurrent

Prints the current page.

procedure PrintCurrent;

The printer is defined in Printer.PrinterIndex.

See also:

· CurrentPage
· PrintAll
· PrintRange


TSRichViewEdit.PrintRange

Prints all pages from StartPageNo to EndPageNo.

procedure PrintRange(StartPageNo, EndPageNo: Integer);

This method takes MinPrintedItemNo and MaxPrintedItemNo properties into account.

The printer is defined in Printer.PrinterIndex.

See also:

· PrintAll
· PrintCurrent


TSRichViewEdit.PriorCurCheckpoint

Selects the previous item having a checkpoint.

function PriorCurCheckpoint: Boolean;

The search is started from the item before the caret position (RichViewEdit.TopLevelEditor.RVData, RichViewEdit.TopLevelEditor.CurItemNo).

If a checkpoint is found, the method selects its item and returns True.

See also

· NextCurCheckpoint


TSRichViewEdit.PriorCurHeading

Moves the caret to the beginning of the previous heading.

function PriorCurHeading: Boolean;

The search is started from the item before the caret position (RichViewEdit.TopLevelEditor.RVData, RichViewEdit.TopLevelEditor.CurItemNo).

If an item is found, the method moves the caret and returns True.

Heading is a paragraph with OutlineLevel property > 0.

See also:

· NextCurHeading


TSRichViewEdit.PriorCurHyperlink

Selects the next hyperlink.

function PriorCurHyperlink : Boolean;

The search is started from the item before the caret position (RichViewEdit.TopLevelEditor.RVData, RichViewEdit.TopLevelEditor.CurItemNo).

If a hyperlink is found, the method selects it and returns True.

See also

· NextCurHyperlink


TSRichViewEdit.PriorCurItem

Selects the previous item of one of the specified styles (types).

function NextCurItem(StyleNo: array of Integer) : Boolean;

StyleNo – a list of styles (types) for searching. If this array is empty, this method searches for any item.

The search is started from the item before the caret position (RichViewEdit.TopLevelEditor.RVData, RichViewEdit.TopLevelEditor.CurItemNo).

If an item is found, the method selects it and returns True.

This method can be used for the command "Find Picture" and "Find Table" in the horizontal toolbar.

See also:

· NextCurItem


TSRichViewEdit.PriorCurPage

Moves the caret to the beginning of the previous page.

procedure PriorCurPage;

The same affect as

if CurrentPage > 1 then

CurrentPage := CurrentPage - 1;

See also:

· FirstCurPage, NextCurPage, LastCurPage
· PriorCurHyperlink
· PriorCurCheckpoint
· PriorCurItem


TSRichViewEdit.ProcessControls

Calls OnCheckControl event for all controls inserted in the document.

procedure ProcessControls;


TSRichViewEdit.ReturnToNote

Ends editing a note's Document and moves the caret to the location of this note in the main document.

function ReturnToNote: Boolean;

This method does nothing if a note is not being edited (i.e. when ActiveEditor<>RVNote).

When the caret is moved, the main document becomes active (ActiveEditor becomes equal to RichViewEdit).

Return value:

True if the caret was moved successfully

See also:

· StartEditNote
· Footnotes and endnotes


TSRichViewEdit.ScrollToCaret, ScrollCaretToCenter

The methods scroll to make the caret visible.

function ScrollToCaret : Boolean;

function ScrollCaretToCenter : Boolean;

ScrollToCaret does nothing if the caret is already completely visible. ScrollCaretToCenter always scrolls.

ScrollToCaret scrolls to show the top of the caret in the middle of the editor. ScrollCaretToCenter scrolls to show the middle of the caret in the middle of the editor.

See also

· ScrollToItem


TSRichViewEdit.ScrollToItem

Scrolls to make the specified item visible. Optionally moves the caret to this item.

function ScrollToItem(RVData: TCustomRVFormattedData; ItemNo: Integer;

SetCaret: Boolean = True; ToItemEnd: Boolean = False;

ToItemCenter: Boolean = False): Boolean;

The item location

RVData is a document (RichViewEdit.RVData, table cell, or cell inplace editor's RVData), ItemNo is an index of item in this document.

Moving the caret

If SetCaret=True, the method not only scrolls the window, but also moves the caret to the specified item. The caret is moved either to the beginning of this item (if ToItemEnd=False) or to the end of it (if ToItemEnd=True).

Scrolling

If ToItemCenter=False, the method scrolls so that the item top is shown at the top of the editor window,

If ToItemCenter=True, the method scrolls so that the item middle is shown at the middle of the editor window.

See also:

· ScrollToCaret, ScrollCaretToCenter


TSRichViewEdit.SelectAll

Selects the whole document.

procedure SelectAll;


TSRichViewEdit.Set*PropertyEd

TSRichViewEdit.SetIntPropertyEd, SetFloatPropertyEd

Editing-style methods for changing properties of the editor.

procedure SetIntPropertyEd(Prop: TSRVIntProperty; Value: Integer; AutoReformat: Boolean);

procedure SetFloatPropertyEd(Prop: TSRVFloatProperty; Value: TRVLength; AutoReformat: Boolean);

Parameters:

Prop identifies the property to change.

Value – new property value. If the property is a property of enumerated type, use Ord(). If the property is a boolean property, any non-zero value means True.

If AutoReformat=True, the editor is reformatted (if necessary), and RichViewEdit.Change is called. Normally, this method is called with AutoReformat=True if you change a single property. If you call these methods multiple times for changing multiple properties, reformat (if necessary) and call RichViewEdit.Change yourself.


TSRichViewEdit.SetMargin

Assigns margins.

procedure SetMargin(MarginLeft, MarginTop, MarginRight, MarginBottom: Integer);

MarginLeft, MarginTop, MarginRight, MarginBottom are new values of margins, measured in pixels.

Before assigning, OnMarginsChanged occurs.

Only parameters <> -1 are assigned.

This method changes:

· PageProperty's LeftMargin, TopMargin, RightMargin, BottomMargin
· LeftMarginPix, TopMarginPix, RightMarginPix, BottomMarginPix

See also:

· SetMarginMM
· SetMarginUnit
· SetRVMargins


TSRichViewEdit.SetMarginMM

Assigns margins.

procedure SetMarginMM(MarginLeftMM, MarginTopMM, MarginRightMM, MarginBottomMM : Extended);

MarginLeftMM, MarginTopMM, MarginRightMM, MarginBottomMM are new values of margins, measured in millimeters.

Before assigning, OnMarginsChanged occurs.

Only parameters <> -1 are assigned.

This method changes:

· PageProperty's LeftMargin, TopMargin, RightMargin, BottomMargin
· LeftMarginPix, TopMarginPix, RightMarginPix, BottomMarginPix

See also:

· SetMargin
· SetMarginUnit
· SetRVMargins


TSRichViewEdit.SetMarginUnit

Assigns margins.

procedure SetMarginUnit(MarginLeft, MarginTop, MarginRight, MarginBottom: TRVLength);

MarginLeft, MarginTop, MarginRight, MarginBottom are new values of margins, measured in UnitsProgram.

Before assigning, OnMarginsChanged occurs.

Only parameters <> -1 are assigned.

This method changes:

· PageProperty's LeftMargin, TopMargin, RightMargin, BottomMargin
· LeftMarginPix, TopMarginPix, RightMarginPix, BottomMarginPix

See also:

· SetMarginMM
· SetMargin
· SetRVMargins


TSRichViewEdit.SetRVMargins

Assigns page properties from RichViewEdit.DocParameters to PageProperty, formats the editor.

procedure SetRVMargins(CompleteFormat: Boolean = True);

It's highly recommended to call call Format or Reformat instead of this method!

This method does the following work:

· copies page properties from RichViewEdit.DocParameters to PageProperty
· resets formatting for notes and text boxes (so that they will be reformatted on the next pagination)
· formats headers and footers (if CompleteFormat=False, the caret position is kept in RVHeader and RVFooter)
· formats RichViewEdit (if CompleteFormat=False, the caret position is kept)
· (if RVNote<>nil) formats RVNote (if CompleteFormat=False, the caret position is kept)


TSRichViewEdit.StartEditing

Begins editing the specified subdocument.

type

TSRVRichViewEditType = (srvrveMain, srvrveHeader, srvrveFooter);

function StartEditing(Editor: TSRVRichViewEditType): Boolean;

Editor | Begins editing...
srvrveMain | RichViewEdit (main document)
srvrveHeader | RVHeader (page header for the current page)
srvrveFooter | RVFooter (page footer for the current page)

This method changes value of ActiveEditor property.

See also:

· StartEditNote


TSRichViewEdit.StartEditNote

Begins editing the Document of the specified note or a text box item.

function StartEditNote(RVData: TCustomRVFormattedData;

ItemNo: Integer; ScrollToNote: Boolean = True): TRichViewEdit;

RVData and ItemNo must define the location of a note item. The following item types are supported:

· footnotes (TRVFootnoteItemInfo)
· endnotes (TRVEndnoteItemInfo)
· sidenotes (TRVSidenoteItemInfo)
· text box items (TRVTextBoxItemInfo)

This method changes value of ActiveEditor property (it becomes equal to RVNote).

If ScrollToNote=True, the method scrolls the control to show the edited note.

Return value:

ActiveEditor if succeed. Nil if RVData and ItemNo do not define a location of a note or a text box item.

See also:

· StartEditing
· ReturnToNote
· Footnotes and endnotes


TSRichViewEdit.UnitsPerInchH

Converts one inch to the specified units. Used for horizontal distances.

function UnitsPerInchH(Units: TRVUnits): TRVLength;

Since in ScaleRichView both vertical and horizontal resolution are assumed equal to 96 dpi, this function returns the same value as UnitsPerInchH.

This function can be used to convert one units to another, for example:

// converting horizontal size from millimeters to UnitsProgram

Size := SizeMM * UnitsPerInchH(UnitsProgram) / UnitsPerInchH(rvuMillimeters)


TSRichViewEdit.UnitsPerInchV

Converts one inch to the specified units. Used for vertical distances.

function UnitsPerInchV(Units: TRVUnits): TRVLength;

Since in ScaleRichView both vertical and horizontal resolution are assumed equal to 96 dpi, this function returns the same value as UnitsPerInchH.

This function can be used to convert one units to another, for example:

// converting vertical size from millimeters to UnitsProgram

Size := SizeMM * UnitsPerInchV(UnitsProgram) / UnitsPerInchV(rvuMillimeters)


TSRichViewEdit.UpdateBuffer

TSRichViewEdit.UpdateBuffer, UpdateBufferAt

These methods redraw the internal buffer or its area.

procedure UpdateBuffer;

procedure UpdateBufferAt(PaintRect: TRect);

When drawing on the screen, TSRichViewEdit control uses an internal buffer (a bitmap). When you call Invalidate or Repaint method, the control simply copies from this buffer to the screen.

These methods update this buffer (or the area PaintRect specified in the client coordinates) and the corresponding area on the screen.

Normally, the buffer is updated when document is changed, so you do not need to call these methods. However, if you want to update some drawing made in OnPaintPage, use these methods.


TSRichViewEdit.ZoomCanvas

TSRichViewEdit.ZoomCanvas, RestoreCanvasZoom

Applies and restores zooming to the Canvas.

function ZoomCanvas(Canvas : TCanvas; ScaleX, ScaleY : Single) : TSRVZoomInfo;

procedure RestoreCanvasZoom(Canvas : TCanvas; OldInfo : TSRVZoomInfo);

type

TSRVZoomInfo = record ...

After calling ZoomCanvas, all subsequent drawing on Canvas will be scaled by ScaleX horizontally and by ScaleY vertically. Store the returned value and then call RestoreCanvasZoom to restore the original zooming.

These methods may be useful in OnPaint event, if you want to draw something in the same zooming ratio as pages (use ViewProperty.ZoomPercent * 0.01 as ScaleX and ScaleY parameters).


TSRichViewEdit.ZoomRectInOut

TSRichViewEdit.ZoomRectIn, ZoomRectOut

Returns a scaled rectangle.

function ZoomRectIn(r: TRect; Ratio: Single): TRect;

function ZoomRectOut(r: TRect; Ratio: Single): TRect;

ZoomRectIn returns the rectangle r zoomed in by Ratio.

ZoomRectOut returns the rectangle r zoomed in by 1/Ratio.


TSRichViewEdit.ZoomToFullPages

Changes zooming (ViewProperty.ZoomPercent) to display pages in ColCount columns, if possible.

procedure ZoomToFullPages(ColCount: Integer);

The procedure changes ViewProperty.ZoomPercent to display ColCount pages horizontally. It may not always be possible, because zooming must be in the range ViewProperty.ZoomMin..ZoomMax


TSRichViewEdit.OnCaretGetOut

Occurs when user presses arrow keys at the beginning/end of document in "outside" direction.

property OnCaretGetOut : TRVOnCaretGetOutEvent;

See the event of the same name in the RichView help file (event of TCustomRichViewEdit).

See also:

· ActiveEditor


TSRichViewEdit.OnCaretMove, OnCaretMoving

The events occur when the caret is moved to the another position within the document (TCustomRichViewEdit(Sender)).

property OnCaretMove: TNotifyEvent;

property OnCaretMoving: TNotifyEvent;

OnCaretMoving occurs before TSRichViewEdit processes a caret movement (and scrolls to move the caret visible).

OnCaretMove occurs after that.

See "OnCaretMove" in the TRichView help file (event of TCustomRichViewEdit).


TSRichViewEdit.OnChange

Occurs when document is changed.

property OnChange: TNotifyEvent;

See the event of the same name in the RichView help file (event of TCustomRichViewEdit).


TSRichViewEdit.OnChangeActiveEditor

Occurs when value of ActiveEditor property is changed.

type

TSRVChangeActiveEditorEvent = procedure(Sender: TSRichViewEdit;

ActiveEditor: TRichViewEdit) of object;

property OnChangeActiveEditor : TSRVChangeActiveEditorEvent;


TSRichViewEdit.OnChangeCurrentControl

Occurs when value of CurControl property is changed.

type

TSRVChangeCurrentControlEvent = procedure(Sender: TSRichViewEdit;

AControl: TControl) of object;

property OnChangeCurrentControl : TSRVChangeCurrentControlEvent;


TSRichViewEdit.OnChangeViewModeAfter

The event occurs after changing a viewing mode (ViewProperty.ViewMode).

type

TSRVChangeViewModeEvent = procedure(Sender: TSRichViewEdit;

Value: TSRVViewMode) of object;

property OnChangeViewModeAfter: TSRVChangeViewModeEvent;

Value is a new value of ViewMode.

See also:

· OnChangeViewModeBefore


TSRichViewEdit.OnChangeViewModeBefore

The event occurs before changing a viewing mode (ViewProperty.ViewMode).

type

TSRVChangeViewModeEvent = procedure(Sender: TSRichViewEdit;

Value: TSRVViewMode) of object;

property OnChangeViewModeBefore: TSRVChangeViewModeEvent;

Value is a new value of ViewMode.

See also:

· OnChangeViewModeAfter


TSRichViewEdit.OnChanging

Occurs before editing operations, allows preventing editing.

property OnChanging: TRVChangingEvent;

See the event of the same name in the RichView help file (event of TCustomRichViewEdit).


TSRichViewEdit.OnCheckControl

This event is called by ProcessControls method.

type

TSRVCheckControl = procedure(Sender: TSRichViewEdit; AControl : TControl) of object;

property OnCheckControl: TSRVCheckControl;

This event is called for each control (AControl) inserted in the current document.


TSRichViewEdit.OnCheckpointVisible

Occurs when checkpoint (with RaiseEvent flag = True) becomes visible as a result of vertical scrolling.

type

TSRVCheckpointVisibleEvent = procedure(Sender: TSRichViewEdit;

RVData: TCustomRVData; ItemNo: Integer) of object;

property OnCheckpointVisible: TSRVCheckpointVisibleEvent;

See the event of the same name in the RichView help file (event of TCustomRichView).

This event has different parameters comparing with the event of TCustomRichView: instead of CheckpointData: TCheckpointData, there are two parameters defining the location of the checkpoint: RVData and ItemNo. You can get the checkpoint as RVData.GetItemCheckpoint(ItemNo).


TSRichViewEdit.OnClickPage

Occurs when the user clicked on a page.

property OnClickPage: TSRVMouseEvent;


TSRichViewEdit.OnContextPopup

Occurs when the user right-clicks the control or otherwise invokes the popup menu (such as using the keyboard).

property OnContextPopup: TContextPopupEvent;


TSRichViewEdit.OnControlAction

Occurs when some important operation is performed on control inserted in Sender.

property OnControlAction: TRVControlActionEvent;

See the event of the same name in the RichView help file (event of TCustomRichView).


TSRichViewEdit.OnCopy

Occurs when copying to the Clipboard

property OnCopy: TNotifyEvent;

This event allows copying to the Clipboard in your own formats (occurs between Clipboard.Open and Clipboard.Close).

See the event of the same name in the RichView help file (event of TCustomRichView).

See also:

· ActiveEditor


TSRichViewEdit.OnCurParaStyleChanged

Occurs when the index of current paragraph style (value of TCustomRichViewEdit(Sender).CurParaStyleNo property) is changed.

property OnCurParaStyleChanged: TNotifyEvent;

See the event of the same name in the RichView help file (event of TCustomRichViewEdit).


TSRichViewEdit.OnCurrentPageChange

Occurs when the caret is moved to another page

property OnCurrentPageChange: TNotifyEvent;

This event occurs after CurrentPage property is changed.

See also:

· OnPageCountChanged
· OnPageScrolled


TSRichViewEdit.OnCurTextStyleChanged

Occurs when the index of current text style (value of TCustomRichViewEdit(Sender).CurTextStyleNo property) is changed.

property OnCurTextStyleChanged: TNotifyEvent;

See the event of the same name in the RichView help file (event of TCustomRichViewEdit).


TSRichViewEdit.OnDrawHyperlink

Occurs when a hyperlink is drawn.

type

TSRVDataDrawHyperlinkEvent = procedure(Sender: TSRichViewEdit;

Canvas : TCanvas; RVData: TCustomRVData; PageNo, ItemNo: Integer;

RepaintRect, R: TRect) of object;

property OnDrawHyperlink : TSRVDataDrawHyperlinkEvent;

This event can be used for the following tasks:

· storing locations of hyperlinks when calling DrawPage or DrawMetafile
· custom drawing (see the demo Demos\Basic Demos\DrawHyperlink\)

Parameters:

Canvas – a canvas where the page is drawn.

PageNo – a page containing this hyperlink, from 1.

RVData, ItemNo – location of the hyperlink. RVData is a document (RichViewEdit.RVData, table cell, or cell inplace editor's RVData), ItemNo is an index of item in this document.

RepaintRect – page area (the same as returned by GetPageClientRect).

R – hyperlink area


TSRichViewEdit.OnDropFiles

Occurs when dropping files in the editor (as a result of drag&drop operation, for example from Windows Explorer)

property OnDropFiles: TRVDropFilesEvent;

See the event of the same name in the RichView help file (event of TCustomRichViewEdit).

(note: reserved for future use)


TSRichViewEdit.OnFullRedraw

Occurs when the component is completely repainted.

property OnFullRedraw: TNotifyEvent;

Mainly for internal use.


TSRichViewEdit.OnGetPagePos

Allows to define page position, size and Z-order. Occurs if ViewProperty.FreePosPage = True.

type

TSRVGetPagePosEvent = procedure(Sender: TSRichViewEdit; PageNo : Integer;

StartItemNo, EndItemNo, OffsetInStartItem,

StartTableRow, EndTableRow: Integer;

var Position : TPoint; var ZoomPercent : Single;

var ZOrder : Integer) of object;

property OnGetPagePos: TSRVGetPagePosEvent;

PageNo – page index (from 1).

StartItemNo – index of the first item on the page.

EndItemNo – index of the last item on the page.

OffsetInStartItem – offset in the first item (for non-text items: 0; for text items: index of the first character on this page, from 1).

StartTableRow – index of the first table row on the page, if the table is the first item on the page; -1 otherwise.

EndTableRow – index of the last table row on the page, if the table is the last item on the page; -1 otherwise.

Position – page position, coordinates of the top left page corner. By default, it is calculated by adding offset to the previous page. The default coordinates for the first page: X is calculated so that the page is in the center, Y is equal to PageProperty.PageBreakHeight. The coordinates are relative to the top left corner of a scrollable area in TSRichViewEdit's window.

ZoomPercent – page zooming. By default, it is equal to zoom percent for the previous page. For the first page, it is equal to ViewProperty.ZoomPercent.

ZOrder – the page's Z-order. By default it is the same as for the previous page. For the first page, it is 0. Pages having the same Z-order value are drawn in the order of their numeration. Pages with larger Z-order value are drawn above the pages with smaller Z-order values. If PageProperty.UsePageOrders = False, this parameter is ignored.

See also:

· CalculatePagePosition
· CalculateAllPagePositions

Example:

// Arranging pages in 4 columns, 10 pixels between rows, 30 pixels between columns

procedure TFColumns.SRichViewEdit1GetPagePos(Sender: TSRichViewEdit; PageNo : Integer;

StartItemNo, EndItemNo, OffsetInStartItem,

StartTableRow, EndTableRow: Integer;

var Position : TPoint; var ZoomPercent : Single;

var ZOrder : Integer);

begin

Position.X := 10 + ((PageNo - 1) mod 4) * (Sender.PageWidthPix + 30);

Position.Y := 10 + ((PageNo - 1) div 4) * (Sender.PageHeightPix + 10);

end;


TSRichViewEdit.OnHMenuClickButton

Occurs when the user clicks one of buttons of the horizontal menu (toolbar).

property OnHMenuClickButton: TSRVClickButtonEvent;

ToolButton – the clicked button (one of MenuHButtons), or nil, if the user clicked outside any button.

See also:

· OnVMenuClickButton
· OnHMenuEnterButton
· MenuHorizontal


TSRichViewEdit.OnHMenuEnterButton

The event occurs when the user moves the mouse pointer to one of the buttons of the horizontal menu.

property OnHMenuEnterButton: TSRVClickButtonEvent;

ToolButton – the button under the mouse pointer, one of MenuHButtons.

See also:

· OnVMenuEnterButton
· OnHMenuClickButton
· MenuHorizontal


TSRichViewEdit.OnHScrolled

Occurs on changing position of horizontal scrollbar.

property OnHScrolled: TNotifyEvent;

This event occurs when the user changes position of horizontal scrollbar, or when new value is assigned to HScrollPos property.

See also:

· OnVScrolled


TSRichViewEdit.OnHTMLSaveImage

Occurs when RichViewEdit saves item containing image to HTML file or stream. This event allows to modify saving procedure for all (or some) images.

property OnHTMLSaveImage: TRVHTMLSaveImageEvent;

See the event of the same name in the RichView help file (event of TCustomRichView).

See also:

· OnSaveImage2


TSRichViewEdit.OnImportPicture

Occurs when loading RTF file or stream containing links to image files. This event also can be used by TRVHtmlImporter.

property OnImportPicture: TRVImportPictureEvent;

See the event of the same name in the RichView help file (event of TCustomRichView).


TSRichViewEdit.OnItemAction

Occurs on insertion, deletion and some other modifications of item in Sender's document.

property OnItemAction: TRVItemActionEvent;

See the event of the same name in the RichView help file (event of TCustomRichView).


TSRichViewEdit.OnItemHint

Allows to define custom popup hints for items in Sender's document.

property OnItemHint: TRVItemHintEvent;

See the event of the same name in the RichView help file (event of TCustomRichView).


TSRichViewEdit.OnItemResize

Occurs after resizing image, control or table with the mouse.

property OnItemResize : TRVItemResizeEvent;

See the event of the same name in the RichView help file (event of TCustomRichViewEdit).


TSRichViewEdit.OnItemTextEdit

Occurs when text item's text is changed as a result of editing operation.

property OnItemTextEdit: TRVItemTextEditEvent;

See the event of the same name in the RichView help file (event of TCustomRichViewEdit).


TSRichViewEdit.OnJump

Occurs when the user clicks on hypertext item.

property OnJump: TJumpEvent;

See the event of the same name in the RichView help file (event of TCustomRichView).

See also:

· OnRVMouseMove


TSRichViewEdit.OnMarginsChanged

Occurs before margins are changed.

type

TSRVMarginsChanged = procedure(Sender: TSRichViewEdit;

var NewLeft, NewTop, NewRight, NewBottom : Integer;

OldLeft, OldTop, OldRight, OldBottom : Integer) of object;

property OnMarginsChanged : TSRVMarginsChanged;

NewLeft, NewTop, NewRight, NewBottom – new margins, pixels.

OldLeft, OldTop, OldRight, OldBottom – old margins, pixels.

Unlike values of LeftMarginPix, TopMarginPix, RightMarginPix, BottomMarginPix properties, these parameters contain unscaled values (as if ViewProperty.ZoomPercent=100).

If one of Old*** parameters is equal to -1, this margin was not changed; the corresponding New*** parameter must be ignored.

If you assign -1 to one of New*** parameters, this margin will not be changed.

This event occurs:

· when assigning new values to LeftMargin, RightMargin, TopMargin, BottomMargin properties of PageProperty, or
· when calling SetMargin, SetMarginMM or SetMarginUnit methods.

Example:

// SRVPrint: TSRVPrint is placed on the form

procedure TForm1.SRichViewEdit1MarginsChanged(

Sender: TSRichViewEdit; var NewLeft, NewTop, NewRight,

NewBottom: Integer; OldLeft, OldTop, OldRight, OldBottom: Integer);

var

ValueLeft, ValueRight, ValueTop, ValueBottom : Integer;

begin

if SRVPrint1.CheckMargin(ValueLeft, ValueTop, ValueRight, ValueBottom,

NewLeft, NewTop, NewRight, NewBottom) then begin

NewLeft := ValueLeft;

NewTop := ValueTop;

NewRight := ValueRight;

NewBottom := ValueBottom;

end;

end;


TSRichViewEdit.OnMessageControl

Occurs when a message from AControl is received.

type

TSRVMessageControl = procedure(Sender: TSRichViewEdit; AControl : TControl;

var Message: TMessage) of object;

property OnMessageControl : TSRVMessageControl;

AControl – the control that sent the message. This control was inserted in the editor.

Message – the message from the control.

You can use this method to process messages from controls inserted in the editor. This is an alternative way to using events of these controls.

Example:

procedure TForm1.SRichViewEdit1MessageControl(

Sender: TSRichViewEdit; AControl: TControl; var Message: TMessage);

begin

// if 'Ready' button is pressed

if (AControl.Name = 'Ready') and (Message.Msg = WM_LBUTTONUP) then

...

end;


TSRichViewEdit.OnOleDragEnter

OLE drag&drop event. It occurs when the user drags the mouse pointer into the editor. Indicates whether a drop can be accepted, and, if so, the effect of the drop.

property OnOleDragEnter : TRVOleDragEnterEvent;

(reserved for future use)


TSRichViewEdit.OnOleDragLeave

OLE drag&drop event. It occurs when the user drags the mouse cursor out of the editor or cancels the current drag&drop operation.

property OnOleDragLeave: TNotifyEvent;

(reserved for future use)


TSRichViewEdit.OnOleDragOver

OLE drag&drop event. It occurs when the user moves the mouse pointer over the editor. Called only if the dragging was accepted in OnOleDragEnter (or automatically by the editor).

property OnOleDragOver: TRVOleDragOverEvent;

(reserved for future use)


TSRichViewEdit.OnOleDrop

OLE drag&drop event. It occurs when the user completes drag&drop operation into the editor.This event allows you to insert data in your own format.

property OnOleDrop: TRVOleDropEvent;

(reserved for future use)


TSRichViewEdit.OnPageCountChanged

Occurs after PageCount is changed.

property OnPageCountChanged: TNotifyEvent;

See also:

· OnCurrentPageChange


TSRichViewEdit.OnPageFormatChanged

Occurs after PageProperty.PageFormat is changed.

property OnPageFormatChanged: TNotifyEvent;


TSRichViewEdit.OnPageScrolled

Occurs when a different page becomes visible.

property OnPageScrolled: TNotifyEvent;

The event may occur on changing position of vertical scrollbar. If a new page comes into the user's field of view (the middle of the screen), the event occurs. Index of this page is assigned to ScrolledPage.


TSRichViewEdit.OnPaint

Occurs on repainting.

type

TSRVPaintEvent = procedure(Sender: TSRichViewEdit; Canvas: TCanvas;

Prepaint: Boolean; PaintRect: TRect) of object;

property OnPaint: TSRVPaintEvent;

The event occurs after repainting. You can draw something on top of default drawing.

Canvas – canvas where to draw.

Prepaint reserved for future use. This event occurs when the document is already painted.

PaintRect specifies the area that needs to be repainted. You can use this parameter to optimize drawing.

See also:

OnPaintPage

OnPaintComponent


TSRichViewEdit.OnPaintComponent

Allows custom painting for controls inserted in the editor.

type

TSRVComponentEvent = procedure(Sender: TSRichViewEdit;

PaintMe: TControl; Canvas: TCanvas; ComponentRect: TRect;

var isPaint: Boolean) of object;

property OnPaintComponent: TSRVComponentEvent;

All controls are inserted in RichViewEdit . TSRichViewEdit component creates images of controls and uses them when it needs to display them.

Not all controls can be drawn by the default procedure. This event allows you to draw controls yourself.

PaintMe – control to paint.

Canvas – canvas where to paint.

ComponentRect – coordinates where to paint.

isPaint - set to True if you drew this control (otherwise it will be drawn by the default procedure).


TSRichViewEdit.OnPaintPage

Occurs before and after the page is drawn.

type

TSRVPaintPage = procedure(Sender: TObject; PageNo: Integer;

PageRect, R: TRect; Canvas: TCanvas; Prepaint, Printing: Boolean) of object;

property OnPaintPage: TSRVPaintPage;

You can draw something on below or above the default drawing.

PageNo – index of the page, from 1.

PageRect – rectangle where to draw the page. Its size is the page size in 100% zooming.

R – client coordinates of area that needs to be repainted.

Canvas – canvas where to paint.

Prepaint is True if this event is called before the default drawing (to draw a background), and False otherwise.

Printing is True if this event is called for printing the page.

You should paint as if zooming is 100%. When drawing on the screen, all painting made in this event is automatically scaled according to ViewProperty.ZoomPercent.

Example: drawing page numbers

procedure TForm1.SRichVewEdit1PaintPage(Sender: TObject; PageNo: Integer;

PageRect, R: TRect; Canvas: TCanvas; Prepaint, Printing: Boolean);

var

H : Integer;

Text: String;

begin

if Prepaint then

exit;

Canvas.Brush.Style := bsClear;

Canvas.Font.Assign(SRichViewEdit1.RichViewEdit.Style.TextStyles[0]);

H := SRichViewEdit1.TopMargin100Pix;

Text := 'Page ' + IntToStr(PageNo);

Canvas.TextOut((PageRect.Left + PageRect.Right - Canvas.TextWidth(Text)) div 2,

PageRect.Top+H div 2, Text);

end;

See also:

OnPaint


TSRichViewEdit.OnParaStyleConversion

Occurs while executing ApplyParaStyleConversion method of RichViewEdit, RVHeader, RVFooter, or RVNote (these TRichViewEdit controls are specified in the Sender parameter)

property OnParaStyleConversion: TRVStyleConversionEvent;

This event allows you to create custom conversion procedure for styles of the selected paragraphs. This event is called for all selected items allowing to change their paragraph style.

It can be useful for implementing commands like "change paragraph alignment", "change paragraph indents", etc.

See the event of the same name in the RichView help file (event of TCustomRichViewEdit).

See also:

· OnStyleConversion


TSRichViewEdit.OnPaste

Occurs when pasting from the Clipboard. Allows pasting data in custom formats.

property OnPaste: TRVPasteEvent;

See the event of the same name in the RichView help file (event of TCustomRichViewEdit).

See also:

· ActiveEditor


TSRichViewEdit.OnPrinting

Occurs on printing.

type

TSRVPrintingEvent = procedure(Sender: TSRichViewEdit;

PageCompleted: Integer; Step: TRVPrintingStep) of object;

property OnPrinting : TSRVPrintingProgressEvent;

This is the analog of TRVPrint.OnSendingToPrinter, see the RichView help file.

See also:

· TSRVPrint.OnSendingToPrinter


TSRichViewEdit.OnProgress

Occurs on long operations.

property OnProgress : TRVProgressEvent;

See the event of the same name in the RichView help file (event of TCustomRichView).


TSRichViewEdit.OnReadHyperlink

Occurs when reading hyperlinks from RTF, HTML, or when dragging hyperlink into the editor.

property OnReadHyperlink: TRVReadHyperlink;

See the event of the same name in the RichView help file (event of TCustomRichView).

See also:

· OnWriteHyperlink


TSRichViewEdit.OnResize, OnResizing

The events occur when the component is resized.

property OnResize: TNotifyEvent;

property OnResizing: TNotifyEvent;

OnResizing occurs before TSRichViewEdit processes resizing itself.

OnResize occurs after that.


TSRichViewEdit.OnResizeDoc

Occurs when RichViewEdit is resized.

property OnResizeDoc: TNotifyEvent;


TSRichViewEdit.OnRVDblClick

Occurs when user double-clicks the primary mouse button when the mouse pointer is above the item in RichView (or on single left-click, if rvsSingleClick is in RichViewEdit.Options)

property OnRVDblClick: TRVDblClickEvent;

See the event of the same name in the RichView help file (event of TCustomRichView).


TSRichViewEdit.OnRVFControlNeeded

Occurs when reading control (inserted in Sender) from RVF file or stream, and this control was saved without its "body".

property OnRVFControlNeeded : TRVFControlNeededEvent;

See the event of the same name in the RichView help file (event of TCustomRichView).


TSRichViewEdit.OnRVFImageListNeeded

Occurs when reading bullet, hotspot or list level with imagelist picture from RVF.

property OnRVFImageListNeeded : TRVFImageListNeededEvent;

See the event of the same name in the RichView help file (event of TCustomRichView).


TSRichViewEdit.OnRVFPictureNeeded

Occurs when reading picture or hot-picture from RVF file or stream, and this picture was saved without its "body"

property OnRVFPictureNeeded : TRVFPictureNeededEvent;

See the event of the same name in the RichView help file (event of TCustomRichView).


TSRichViewEdit.OnRVMouseDown

Occurs when the user presses a mouse button with the mouse pointer over the control.

property OnRVMouseDown : TRVMouseEvent;

X and Y parameters in this events are coordinates relative to RichViewEdit. If you need coordinates of this TSRichViewEdit control, use OnMouseDown event.

See the event of the same name in the RichView help file (event of TCustomRichView).

See also:

· ConvertRVToSRV
· OnRVMouseUp


TSRichViewEdit.OnRVMouseMove

Occurs when mouse pointer is moved to the area of hypertext link.

property OnRVMouseMove: TRVMouseMoveEvent;

See the event of the same name in the RichView help file (event of TCustomRichView).

See also:

· OnJump


TSRichViewEdit.OnRVMouseUp

Occurs when the user releases a mouse button that was pressed with the mouse pointer over the component.

property OnRVMouseUp : TRVMouseEvent;

X and Y parameters in this events are coordinates relative to RichViewEdit. If you need coordinates of this TSRichViewEdit control, use OnMouseUp event.

See the event of the same name in the RichView help file (event of TCustomRichView).

See also:

· ConvertRVToSRV
· OnRVMouseDown


TSRichViewEdit.OnRVRightClick

Occurs when the user releases the right mouse button over the RichView component.

property OnRVRightClick: TRVRightClickEvent;

X and Y parameters in this events are coordinates relative to RichViewEdit. If you need coordinates of this TSRichViewEdit control, use OnMouseUp event.

See the event of the same name in the RichView help file (event of TCustomRichView).


TSRichViewEdit.OnSaveComponentToFile

Occurs when RichViewEdit wants to save inserted control in text, RTF or HTML file.

property OnSaveComponentToFile: TRVSaveComponentToFileEvent;

See the event of the same name in the RichView help file (event of TCustomRichView).


TSRichViewEdit.OnSaveHTMLExtra

Allows saving additional information in HTML.

property OnSaveHTMLExtra: TRVSaveHTMLExtraEvent;

See the event of the same name in the RichView help file (event of TCustomRichView).


TSRichViewEdit.OnSaveImage2

Occurs when RichViewEdit saves image to HTML file or stream.

property OnSaveImage2 : TRVSaveImageEvent2;

See the event of the same name in the RichView help file (event of TCustomRichView).

See also:

· OnHTMLSaveImage


TSRichViewEdit.OnSaveItemToFile

Allows you to change how document items are saved in text, RTF or HTML file or stream.

property OnSaveItemToFile: TRVSaveItemToFileEvent;

See the event of the same name in the RichView help file (event of TCustomRichView).


TSRichViewEdit.OnSaveRTFExtra

Allows saving additional information in RTF.

property OnSaveRTFExtra: TRVSaveRTFExtraEvent;

See the event of the same name in the RichView help file (event of TCustomRichView).


TSRichViewEdit.OnSelect

Occurs when selection in the document was changed (not contents, but bounds)

property OnSelect: TNotifyEvent;

See the event of the same name in the RichView help file (event of TCustomRichView).


TSRichViewEdit.OnSmartPopupClick

Occurs when user clicks "smart popup" button.

property OnSmartPopupClick: TRVSmartPopupClickEvent;

This event allows implementing your own effect when clicking "smart popup" button (or on pressing its ShortCut). If you use menu, it's not necessary to process this event.

See also:

· SmartPopupProperties
· SmartPopupVisible


TSRichViewEdit.OnSpellingCheck

Allows to mark misspelled words.

property OnSpellingCheck: TRVSpellingCheckEvent;

See the event of the same name in the RichView help file (event of TCustomRichView).


TSRichViewEdit.OnStyleConversion

Occurs while executing ApplyStyleConversion method of RichViewEdit, RVHeader, RVFooter, or RVNote (these TRichViewEdit controls are specified in the Sender parameter)

property OnStyleConversion: TRVStyleConversionEvent;

This event allows you to create custom conversion procedure of text styles for the selected text. This event is called for all selected text items allowing to change their text style.

It can be useful to implement commands like "make bold", "apply font", "change text color", etc.

See the event of the same name in the RichView help file (event of TCustomRichViewEdit).

See also:

· OnParaStyleConversion


TSRichViewEdit.OnTableIconClick

Occurs when the user clicked a table "icon" (rectangle in the top left corner of table)

property OnTableIconClick: TSRVMouseEvent;

Table icon is displayed when the user moves the mouse pointer above the table, if ViewProperty.UseTableIcons=True.

This table is returned by GetTableIconItem. A document where this table is located is returned by GetTableIconRVData.


TSRichViewEdit.OnURLNeeded

An obsolete version of OnWriteHyperlink

property OnURLNeeded: TRVURLNeededEvent;

See the event of the same name in the RichView help file (event of TCustomRichView).


TSRichViewEdit.OnVMenuClickButton

Occurs when the user clicks one of buttons of the vertical menu (toolbar).

property OnVMenuClickButton: TSRVClickButtonEvent;

ToolButton – the clicked button (one of MenuVButtons), or nil, if the user clicked outside any button.

See also:

· OnHMenuClickButton
· OnVMenuEnterButton
· MenuVertical


TSRichViewEdit.OnVMenuEnterButton

The event occurs when the user moves the mouse pointer to one of the buttons of the vertical menu.

property OnVMenuEnterButton: TSRVClickButtonEvent;

ToolButton – the button under the mouse pointer, one of MenuVButtons.

See also:

· OnHMenuEnterButton
· OnVMenuClickButton
· MenuVertical


TSRichViewEdit.OnVScrolled

Occurs on changing position of vertical scrollbar.

property OnVScrolled: TNotifyEvent;

This event occurs when the user changes position of vertical scrollbar, or when new value is assigned to HScrollPos property.

See also:

· OnHScrolled


TSRichViewEdit.OnWriteHyperlink

Occurs when RichViewEdit wants to save hypertext link to HTML or RTF file

property OnWriteHyperlink: TRVWriteHyperlink;

See the event of the same name in the RichView help file (event of TCustomRichView).


TSRichViewEdit.OnZoomChanged

Occurs after ViewProperty.ZoomPercent or .ZoomMode are changed.

property OnZoomChanged: TNotifyEvent;

See also:

· OnZoomViewChanged


TSRichViewEdit.OnZoomViewChanged

Occurs when zooming properties are changed.

property OnZoomViewChanged: TNotifyEvent;

This even occurs when one of the following properties of ViewProperty is changed:

· ZoomPercentEdit
· ZoomModeEdit
· ZoomPercentIN
· ZoomModeIN
· ZoomPercentOUT
· ZoomModeOUT

See also:

· OnZoomChanged


TSRVBackgroundProperty

Properties

TSRVBackgroundProperty is the class for TSRichViewEdit.BackgroundProperty property.

Unit SclRView.

Syntax

TSRVBackgroundProperty = class(TPersistent)

Hierarchy

TObject

TPersistent

Properties for area around pages

This class defines properties for an advanced background filling. An advanced background is a combination of a gradient filling and a picture. It is activated if Visible=True.

A gradient is defined in FillType, ColorBegin, ColorMiddle, ColorEnd, PercentMiddle properties.

A picture is defined in Picture, PicturePosition, and TransparentColor properties.

Properties for pages

GlobalPageBackgroundColor allows changing color of pages.


TSRVBackgroundProperty.ColorBegin

Specifies the initial color of gradient filling.

property ColorBegin: TColor;

If FillType = srvtfFlat, this property defines a background color.

Default value:

$00E7BE9F


TSRVBackgroundProperty.ColorEnd

Specifies the ending color of gradient filling

property ColorEnd: TColor;

If FillType = srvtfFlat, this property is not used.

Default value:

$00CD9165


TSRVBackgroundProperty.ColorMiddle

Specifies the middle color of gradient filling

property ColorMiddle : TColor;

If FillType = srvtfFlat, this property is not used.

Default value:

$00BD865D

See also:

· PercentMiddle


TSRVBackgroundProperty.FillType

Specifies the background filling mode.

type

TSRVFillType = (srvtfFlat, srvtfGradientH, srvtfGradientV);

property FillType : TSRVFillType;

Value | Meaning
srvtfFlat | A plain colored background, the color is ColorBegin.
srvtfGradientH | A horizontal gradient, the background is filled with horizontal gradient using three colors: from ColorBegin through ColorMiddle to ColorEnd.
srvtfGradientV | A vertical gradient, the background is filled with vertical gradient using three colors: from ColorBegin through ColorMiddle to ColorEnd.

ColorMiddle is shifted by the percent specified in PercentMiddle.

Default value:

srvtfFlat


TSRVBackgroundProperty.GlobalPageBackgroundColor

Specifies a page background color.

property GlobalPageBackgroundColor: TColor;

Unlike all other properties of BackgroundProperty, this property affects pages, not the area around them.

This property (if not equal to clNone) overrides the value of RichViewEdit.Color. Unlike RichViewEdit.Color, this property is not stored in RVF files.

Default value:

clNone


TSRVBackgroundProperty.PercentMiddle

Specifies the shift of the middle color, percent of the gradient width.

property PercentMiddle: Single;

This value defines the position where a gradient color becomes equal to ColorMiddle.

Default value:

50.0


TSRVBackgroundProperty.Picture

Specifies the picture to display above the gradient.

property Picture: TPicture;

The position of this picture is defined in PicturePosition.


TSRVBackgroundProperty.PicturePosition

Specifies the position of Picture.

type

TSRVPicturePosition = (srvtpNone, srvtpTopLeft, srvtpCenter, srvtpTile, srvtpStretch, srvtpScale);

property PicturePosition: TSRVPicturePosition;

Value | Meaning
srvtpNone | picture is not displayed
srvtpTopLeft | picture is in the top left corner
srvtpCenter | picture in the center
srvtpTile | picture is tiled
srvtpStretch | picture is stretched to the window size
srvtpScale | picture is stretched to the window size, proportionally

Default value:

srvtpNone


TSRVBackgroundProperty.TransparentColor

Specifies a color of Picture that will be transparent when it is drawn.

property ColorBegin: TColor;

This property is used only if Picture contains TBitmap.

Default value:

clNone (no transparency)


TSRVBackgroundProperty.Visible

Disables/enables background displaying.

property Visible : Boolean;

If the value is False, all properties of this class are ignored and background is filled with TSRichViewEdit.Color.

Default value:

False


TSRVCustomPropertyTB

Properties

TSRVCustomPropertyTB is the base class for TSRVPropertyTBH and TSRVPropertyTBV.

Unit SRVToolBar.

Syntax

TSRVCustomPropertyTB = class(TPersistent)

Hierarchy

TObject

TPersistent

Description

This class is not used directly. It is a base class for types of MenuHorizontal and MenuVertical properties of TSRichViewEdit.

This class defines properties of toolbars. All properties are protected.

Some of these properties make sense only for toolbars displayed in tool windows, these properties are not published in TSRVPropertyTBH and TSRVPropertyTBV.

Properties

This class contains almost the same set of properties as TSRVToolBar and TSRVToolWindow components, but a hint area is hidden.

Buttons are defined in Buttons collection (or in external collections, like in case of MenuHorizontal and MenuVertical properties). A size of buttons is defined in ButtonWidth and ButtonHeight properties. A spacing between buttons is specified in Spacer. A horizontal positions of buttons is defined by AlignButton and Indent properties.

The toolbar can have a border, its width is specified in BorderWidth.

The toolbar color is Color. Colors of disabled, pressed and highlighted buttons are specified in ColorDisable, ColorDown, and ColorSelect properties. A pen of frame around the toolbar is defined in PenFrame.


TSRVCustomPropertyTB.AlignButton

Defines the position of buttons in the toolbar window.

property AlignButton: TSRVAlignButton;

See also

Indent

Default value:

srvabCenter


TSRVCustomPropertyTB.BorderWidth

Specifies a width of the toolbar border (spacing around the toolbar)

property BorderWidth: Integer;

A border (see PenFrame) is drawn in this area. The rest of space (if BorderWidth>the pen's width) is painted with Color.

Default value:

1

See also:

· Spacer


TSRVCustomPropertyTB.ButtonHeight

Sets the height of tool buttons (TSRVToolButton), in pixels.

property ButtonHeight: Integer;

For horizontal menu of TSRichViewEdit, this property is not published (height is calculated automatically, it equals to the scrollbar height).

Default value:

26

See also:

· ButtonWidth


TSRVCustomPropertyTB.Buttons

Collection of tool buttons (TSRVToolButton).

property Buttons: TSRVButtonCollection;

For horizontal menu and vertical menu of TSRichViewEdit, this property is not published. For them, buttons are available in MenuHButtons and MenuVButtons properties of TSRichViewEdit.


TSRVCustomPropertyTB.ButtonWidth

Sets the width of tool buttons (TSRVToolButton), in pixels.

property ButtonWidth: Integer;

For vertical menu of TSRichViewEdit, this property is not published (width is calculated automatically, it equals to the scrollbar width).

Default value:

26

See also:

· ButtonHeight


TSRVCustomPropertyTB.Color

Specifies the toolbar background color.

property Color: TColor;

This color is used for background of:

· the border around the toolbar (see BorderWidth)
· area between the buttons (see Spacer)
· tool buttons (if the button is in a normal state, i.e. not highlighted, pressed or disabled).

Default value:

clWhite

See also:

· ColorDisable
· ColorDown
· ColorSelect


TSRVCustomPropertyTB.ColorDisable

Background color of disabled tool buttons.

property ColorDisable: TColor;

This color is used for buttons having Enabled=False.

Default value:

clSilver

See also:

· Color
· ColorDown
· ColorSelect


TSRVCustomPropertyTB.ColorDown

Background color of pressed tool buttons.

property ColorDown: TColor;

Default value:

$00EED2C1

See also:

· Color
· ColorDisable
· ColorSelect


TSRVCustomPropertyTB.ColorSelect

Background color of highlighted tool buttons (buttons under the mouse pointer).

property ColorSelect: TColor;

Default value:

$00E2B598

See also:

· Color
· ColorDisable
· ColorDown


TSRVCustomPropertyTB.ImageList

A reference to image list for images in tool buttons.

property ImageList: TImageList;

This image list must contain buttons glyphs for all buttons states (normal, pressed, disabled).


TSRVCustomPropertyTB.Indent

Changes the position of buttons in the toolbar window.

property Indent: Integer;

If AlignButton=srvabLeft, buttons are shifted by Indent to the right.

If AlignButton=srvabRight, buttons are shifted by Indent to the left.

If AlignButton=srvabCenter, buttons are shifted by Indent/2 to the left.

Default value:

0


TSRVCustomPropertyTB.PenFrame

Specifies a pen for drawing lines in the tool bar.

property PenFrame: TPen;

This pen is used for drawing border around the toolbar. The width of this border is defined as a pen's width, not in BorderWidth.

Default value:

Style=psSolid, Width=1, Color=$00C56A31;


TSRVCustomPropertyTB.Spacer

Specifies the distance between tool buttons.

property Spacer: Integer;

Default value:

0


TSRVCustomPropertyTB.SRVToolBar

Returns a reference to the toolbar.

SRVToolBar: TSRVToolBar;

This property can be used to get the toolbar position. Please do not modify properties of this toolbar.


TSRVPageProperty

Properties Methods

TSRVPageProperty is the class for TSRichViewEdit.PageProperty property.

Unit SclRView.

Syntax

TSRVPageProperty = class(TPersistent)

Hierarchy

TObject

TPersistent

Properties

Page sizes and margins

The following properties define the page size: PageFormat and Orientation.

PageWidth and PageHeight are usually calculated automatically, but they can define a page size if PageFormat=srvfmCustom.

The following properties define margins: LeftMargin, TopMargin, RightMargin, BottomMargin.

MirrorMargins allows switching left and right margins on even pages.

All sizes are measured in TSRichViewEdit.UnitsProgram.

Viewing modes

The following properties are used to implement different viewing modes: AutoWidth and PageViewMode.

Typical modes:

· "Normal mode" (one long page, width depends on PageWidth): AutoWidth=False, PageViewMode=False.
· "Web mode" (one long page, width depends on the window size): AutoWidth=True, PageViewMode=False.
· "Page View Mode": AutoWidth=False, PageViewMode=True.

In a page view mode, the following properties affect distance between pages: MaxPageBreakHeight, MinPageBreakHeight, PageBreakHeight.

For horizontal position, see BoundLeftRight (in all modes).

A border can be drawn around pages, see BorderPen. A printable area can be shown, see PrintableAreaPen (the current printer cannot print beyond this area).

The caret is drawn using CaretPen.

Page numbering

Page numbers are printed, if PageNoVisible=True. This is a simple option to display page numbering. The alternative (recommended) option is inserting "page number" field (TRVPageNumberItemInfo item) in a header or a footer.

They are printed at the top or the bottom of pages, depending on PageNoVAlign property. A horizontal alignment is specified in PageNoHAlign, font is specified in PageNoFont.

The numbering is started from PageNoFromNumber. You can omit page numbers on one or more first pages, using PageNoFirst.

PageNoFromNumber is also used as a starting value for "page number" fields.

Header and footer

Headers are displayed, if HeaderVisible=True. Headers position is defined in HeaderY.

Footers are displayed, if FooterVisible=True. Footers position is defined in FooterY.

If TitlePage=True, special headers are used for the first page. If FacingPages=True, special headers are used for even pages.

See also:

TSRVViewProperty.


TSRVPageProperty.AutoWidth

Specifies whether page width is automatically calculated depending on the editor's client width.

property AutoWidth: Boolean;

If this property is True, a document occupies all available width (except for the double BoundLeftRight), a horizontal scrollbar is never enabled.

This property may be used when implementing custom view modes, for example, "web mode".

Default value:

False


TSRVPageProperty.BorderPen

Specifies pen properties for drawing border around pages.

type

TSRVBorderPen = class (TPen);

property BorderPen: TSRVBorderPen;

To disable a page border drawing, assign BorderPen.Style = psClear.

Default value:

Color = $003E3E3E, Width = 1.


TSRVPageProperty.BottomMargin

Specifies a bottom margin of pages.

property BottomMargin: TRVLength;

This value is measured in UnitsProgram (mm by default).

This property can be changed as an editing (undoable) operation, see TSRichViewEdit.SetFloatPropertyEd.

Default value:

25


TSRVPageProperty.BoundLeftRight

Minimal (required) page left and right indent, pixels.

property BoundLeftRight: Integer;

This property is used only if ViewProperty.MaxPageColCount=1.

If the page is wider than the control, this property defines the distance from the right and the left sides.

This minimal distance is not scaled when TSRichViewEdit.ViewProperty.ZoomPercent is changed.

If page width + BoundLeftRight*2 is wider than the component client width, a horizontal scrollbar appears.

Default value:

20


TSRVPageProperty.CaretPen

Specifies pen properties for drawing the caret.

type

TSRVCaretPen = class (TPen)

property CaretPen: TSRVCaretPen;

Default value:

Color = clBlack, Width = 2.


TSRVPageProperty.FacingPages

Specifies whether special headers and footers are used for even pages.

property FacingPages: Boolean;

This property can be changed as an editing (undoable) operation, see TSRichViewEdit.SetIntPropertyEd.

A header for even pages is stored in SRichViewEdit.Subdocuments[srvhftEvenPagesHeader].

A footer for even pages is stored in SRichViewEdit.Subdocuments[srvhftEvenPagesFooter].

FacingPages turns on/off displaying headers and footers for even pages, but does not affect saving: headers and footers are loaded and saved regardless of this property.

Headers are shown only if HeaderVisible=True, footers are shown only if FooterVisible=True.

Default value:

False

See also:

· TitlePage
· MirrorMargins


TSRVPageProperty.FooterVisible

Shows or hides footers.

property FooterVisible: Boolean;

Footers are stored in TSRichViewEdit.Subdocuments and edited in TSRichViewEdit.RVFooter.

If FooterVisible=False, footers are not displayed, not loaded and not saved to files.

Default value:

True

See also:

· FooterY
· HeaderVisible
· TitlePage
· FacingPages


TSRVPageProperty.FooterY

Specifies a distance between the bottom of the page and the bottom of the footer.

property FooterY: TRVLength;

This value is measured in UnitsProgram (mm by default).

A footer is shown only if FooterVisible=True.

Footers are stored in TSRichViewEdit.Subdocuments and edited in TSRichViewEdit.RVFooter.

This value is used for all types of footers.

This property can be changed as an editing (undoable) operation, see TSRichViewEdit.SetFloatPropertyEd.

Default value:

10

See also

· HeaderY


TSRVPageProperty.HeaderVisible

Shows or hides headers.

property HeaderVisible: Boolean;

Headers are stored in TSRichViewEdit.Subdocuments and edited in TSRichViewEdit.RVHeader.

If HeaderVisible=False, headers are not displayed, not loaded and not saved to files.

Default value:

True

See also:

· HeaderY
· FooterVisible
· TitlePage
· FacingPages


TSRVPageProperty.HeaderY

Specifies a distance between the top of the page and the top of the header.

property HeaderY: TRVLength;

This value is measured in UnitsProgram (mm by default).

A header is shown only if HeaderVisible=True.

Headers are stored in TSRichViewEdit.Subdocuments and edited in TSRichViewEdit.RVHeader.

This value is used for all types of headers.

This property can be changed as an editing (undoable) operation, see TSRichViewEdit.SetFloatPropertyEd.

Default value:

10

See also

· FooterY


TSRVPageProperty.LeftMargin

Specifies a left margin of pages.

property LeftMargin: TRVLength;

This value is measured in UnitsProgram (mm by default).

This property can be changed as an editing (undoable) operation, see TSRichViewEdit.SetFloatPropertyEd.

Default value:

35


TSRVPageProperty.MaxPageBreakHeight

Specifies a maximal vertical distance between pages.

property MaxPageBreakHeight: Integer;

This property is used only if ViewProperty.MaxPageColCount=1.

A maximal distance between pages is necessary to limit a distance between pages when zooming.

This maximal distance is not scaled when TSRichViewEdit.ViewProperty.ZoomPercent is changed.

Default value:

25


TSRVPageProperty.MinPageBreakHeight

Specifies a minimal vertical distance between pages.

property MinPageBreakHeight: Integer;

This property is used only if ViewProperty.MaxPageColCount=1.

A minimal distance between pages is necessary to limit a distance between pages when zooming.

This minimal distance is not scaled when TSRichViewEdit.ViewProperty.ZoomPercent is changed.

Default value:

5


TSRVPageProperty.MirrorMargins

Instructs to exchange left and right margins on even pages.

property MirrorMargins: Boolean;

If MirrorMargins = True, then:

· for odd pages, LeftMargin defines the left margin, RightMargin defines the right margin; for even pages, LeftMargin defines the right margin, RightMargin defines the left margin;
· if page numbering is visible, left and right alignment of page numbers are exchanged on even pages.

This property can be changed as an editing (undoable) operation, see TSRichViewEdit.SetIntPropertyEd.

Default value:

False

See also:

· FacingPages


TSRVPageProperty.Orientation

Specifies a page orientation

property Orientation: TPrinterOrientation;

Portrait or landscape.

Assigning to this property sets the proper values to PageWidth and PageHeight properties, if PageFormat<>srvfmCustom.

This property can be changed as an editing (undoable) operation, see TSRichViewEdit.SetIntPropertyEd.

Default value:

poPortrait


TSRVPageProperty.PageBreakHeight

Specifies a vertical distance between pages, when scaling is 100%.

property PageBreakHeight: Integer;

This value is scaled according to TSRichViewEdit.ViewProperty.ZoomPercent,

If ViewProperty.MaxPageColCount=1, value of this property cannot exceed the values of MinPageBreakHeight and MaxPageBreakHeight properties.

This value also defines the distance from the top to the first page (even if PageViewMode=False), but it can be altered in TSRichViewEdit.ViewProperty.AlignPageV property.

Default value:

20


TSRVPageProperty.PageFormat

Specifies a page format (size).

property PageFormat: TSRVPageFormat;

Assigning to this property changes values of PageWidth and PageHeight properties as well (if the new value <> srvfmCustom). This change depends on Orientation property.

When this property is changed, OnPageFormatChanged occurs.

If this value is equal to srvfmCustom (user-defined paper format), page size is defined in PageWidth and PageHeight properties.

This property can be changed as an editing (undoable) operation, see TSRichViewEdit.SetIntPropertyEd.

Default value

srvfmA4

See also:

· ConvertPageFormatToPageSize
· ConvertPageSizeToPageFormat


TSRVPageProperty.PageHeight

Specifies a page height.

property PageHeight: TRVLength;

This value is measured in UnitsProgram (mm by default).

This property can be changed as an editing (undoable) operation, see TSRichViewEdit.SetFloatPropertyEd.

Default value:

297 (corresponds to A4 in portrait Orientation)

See also:

· PageWidth
· PageFormat
· ViewProperty.PageHeight


TSRVPageProperty.PageNoFirst

Specifies the index of the first page where page numbers are drawn, from 1.

property PageNoFirst: Integer;

Default value:

1 (all pages have page numbers, if PageNoVisible=True).


TSRVPageProperty.PageNoFont

Specifies the font for drawing page numbers.

type

TSRVPageNoFont = class (TFont)

property PageNoFont: TSRVPageNoFont;

Default value:

'Arial', 8

See also

· PageNoVisible


TSRVPageProperty.PageNoFromNumber

Specifies the number of the first page.

property PageNoFromNumber: Integer;

This is the starting value for page numbering.

It is used:

· for drawing page numbers, if PageNoVisible=True
· for "page number" fields (TRVPageNumberItemInfo items)

Default value:

1


TSRVPageProperty.PageNoHAlign

Specifies a horizontal alignment of page numbers.

type

TSRVHAlign = (srvhaLeft, srvhaCenter, srvhaRight);

property PageNoHAlign: TSRVHAlign;

If MirrorMargins = True, this property defines the alignment for odd pages; for even pages, left and right alignments are exchanged.

Default value:

srvhaCenter

See also

· PageNoVisible
· PageNoVAlign


TSRVPageProperty.PageNoVAlign

Specifies a vertical position of page numbers.

type

TSRVVAlign = (srvvaUp, srvvaDown);

property PageNoVAlign: TSRVVAlign;

Default value:

srvvaDown (bottom of pages)

See also

· PageNoVisible
· PageNoHAlign


TSRVPageProperty.PageNoVisible

Shows/hides page numbers.

property PageNoVisible: Boolean;

This is a simple option to display page numbering. These page numbers are not saved to RTF, RVF or DocX.

The alternative (recommended) option is inserting "page number field (TRVPageNumberItemInfo item) in a header or a footer.

Default value:

True

See also

· PageNoVAlign
· PageNoHAlign
· PageNoFirst
· PageNoFromNumber


TSRVPageProperty.PageViewMode

Disables/enables page-view mode.

property PageViewMode: Boolean;

If this property is False, documents are displayed without separation on pages. PageHeight is calculated to fit DocumentHeight of RichViewEdit component.

This property may be used when implementing custom view modes.

Default value:

True


TSRVPageProperty.PageWidth

Specifies a page width.

property PageWidth: TRVLength;

This value is measured in UnitsProgram (mm by default).

This property can be changed as an editing (undoable) operation, see TSRichViewEdit.SetFloatPropertyEd.

Default value:

210 (corresponds to A4 in portrait Orientation)

See also:

· PageHeight
· PageFormat
· ViewProperty.PageWidth


TSRVPageProperty.PrintableAreaPen

This pen is used for drawing a rectangle around the printable area on the page.

type

TSRVPAPen = class (TPen)

property PrintableAreaPen : TSRVPAPen;

Printer cannot print beyond the area shown on this rectangle, see WinAPI function GetDeviceCaps, PHYSICAL*** constants.

This property is similar to the property of TRVPrintPreview of the same name.

Default value:

Color=clRed, Style=psClear (rectangle is invisible)


TSRVPageProperty.RightMargin

Specifies a right margin of pages.

property RightMargin: TRVLength;

This value is measured in UnitsProgram (mm by default).

This property can be changed as an editing (undoable) operation, see TSRichViewEdit.SetFloatPropertyEd.

Default value:

15


TSRVPageProperty.TitlePage

Specifies whether special headers and footers are used for the first page.

property TitlePage: Boolean;

This property can be changed as an editing (undoable) operation, see TSRichViewEdit.SetIntPropertyEd.

A header for the first page is stored in SRichViewEdit.Subdocuments[srvhftFirstPageHeader].

A footer for the first page is stored in SRichViewEdit.Subdocuments[srvhftFirstPageFooter].

TitlePage turns on/off displaying headers and footers for the first page, but does not affect saving: headers and footers are loaded and saved regardless of this property.

Headers are shown only if HeaderVisible=True, footers are shown only if FooterVisible=True.

Default value:

False

See also:

· FacingPages


TSRVPageProperty.TopMargin

Specifies a top margin of pages.

property TopMargin: TRVLength;

This value is measured in UnitsProgram (mm by default).

This property can be changed as an editing (undoable) operation, see TSRichViewEdit.SetFloatPropertyEd.

Default value:

25


TSRVPageProperty.UsePageOrders

Specifies whether to use custom Z-order when drawing pages.

property UsePageOrders: Boolean;

Assigning True to this property calls CalculateAllPagePositions, if TSRichViewEdit.ViewProperty.FreePosPages=True.

Default value:

False


TSRVPageProperty.ConvertPageFormatToPageSize

Converts PageFormat to PaperWidth and PaperHeight, in portrait orientation.

procedure ConvertPageFormatToPageSize(PageFormat: TSRVPageFormat;

UnitsPaper: TRVUnits; var PaperWidth, PaperHeight: TRVLength);

PaperWidth and PaperHeight are measured in UnitsPaper ("pixels" assume 96 dpi).

If PageFormat=srvfmCustom, PageWidth and PageHeight are returned (always in landscape orientation)


TSRVPageProperty.ConvertPageSizeToPageFormat

Returns a page format by the specified values of PaperWidth and PaperHeight.

function ConvertPageSizeToPageFormat(UnitsPaper: TRVUnits;

PaperWidth, PaperHeight: TRVLength): TSRVPageFormat;

PaperWidth and PaperHeight must be specified in portrait orientation.

PaperWidth and PaperHeight are measured in UnitsPaper ("pixels" assume 96 dpi).

If a standard format of this size cannot be found, srvfmCustom is returned.


TSRVPropertyTBH

Properties

TSRVPropertyTBH is the class for MenuHorizontal property of TSRichViewEdit

Unit SclRView.

Syntax

TSRVPropertyTBH = class(TSRVCustomPropertyTB)

Hierarchy

TObject

TPersistent

TSRVCustomPropertyTB

Description

This class describes properties of "horizontal menu" (toolbar in the area of horizontal scrollbar).

For example, this toolbar can be used to define viewing modes ("Web mode", "Normal mode", "Print mode").

This toolbar can be placed to the left or to the right of the scrollbar, depending on Align property. It is shown only if Visible=True.

Since this is a toolbar, not a tool window, all properties related to a hint area are not available. A height of buttons is calculated automatically.

Buttons are defined in MenuHButtons property of TSRichViewEdit.

When the user moves the mouse to a button, TSRichViewEdit.OnHMenuEnterButton event occurs. When a button is clicked, TSRichViewEdit.OnHMenuClickButton event occurs.

See also:

· TSRVPropertyTBV


TSRVPropertyTBH.Align

Defines the position of the toolbar relative to the horizontal scrollbar.

type

TSRVTBAlignH = (srvtbaLeft, srvtbaRight);

property Align : TSRVTBAlignH;

Default value:

srvtbaLeft (to the left of the scrollbar)


TSRVPropertyTBH.Visible

Specifies whether the toolbar is visible.

property Visible: Boolean;

Default value:

False (the toolbar is hidden)


TSRVPropertyTBV

Properties

TSRVPropertyTBV is the class for MenuVertical property of TSRichViewEdit

Unit SclRView.

Syntax

TSRVPropertyTBV = class(TSRVCustomPropertyTB)

Hierarchy

TObject

TPersistent

TSRVCustomPropertyTB

Description

This class describes properties of "vertical menu" (toolbar in the area of vertical scrollbar).

For example, this toolbar can be used for searching in the document.

This toolbar can be placed above or below the scrollbar, depending on Align property. It is shown only if Visible=True.

Since this is a toolbar, not a tool window, all properties related to a hint area are not available. A width of buttons is calculated automatically.

Buttons are defined in MenuVButtons property of TSRichViewEdit.

When the user moves the mouse to a button, TSRichViewEdit.OnVMenuEnterButton event occurs. When a button is clicked, TSRichViewEdit.OnVMenuClickButton event occurs.

See also:

· TSRVPropertyTBVH


TSRVPropertyTBV.Align

Defines the position of the toolbar relative to the vertical scrollbar.

type

TSRVTBAlignV = (srvtbaTop, srvtbaBottom);

property Align : TSRVTBAlignV;

Default value:

srvtbaTop (above the the scrollbar)


TSRVPropertyTBV.Visible

Specifies whether the toolbar is visible.

property Visible: Boolean;

Default value:

False (the toolbar is hidden)


TSRVViewProperty

Properties

TSRVViewProperty is the class for TSRichViewEdit.ViewProperty property.

Unit SclRView.

Syntax

TSRVViewProperty = class(TPersistent)

Hierarchy

TObject

TPersistent

Description

Free page positioning mode

Free page positioning mode is activated in FreePosPage property. In this mode, you can define position, zooming and Z-order for specific pages.

Zooming and page arrangement

The current zooming is defined in ZoomMode and ZoomPercent properties.

In a preview mode (ViewMode=srvvmPreviewMode), clicking switches these properties between ZoomModeIN, ZoomPercentIN and ZoomModeOUT, ZoomPercentOUT.

When switching back to an editing mode (ViewMode=srvvmEditMode), they are set to ZoomModeEdit, ZoomPercentEdit.

The user can change zooming:

· using a mouse wheel, if MouseWheelZooming=True.
· using a special panel, if ZoomPanelVisible=True.

ZoomPercent can be assigned in the range ZoomMin..ZoomMax.

If zooming allows, pages may be arranged in columns, according to MaxPageColCount property.

Table icons

A table "icon" (a rectangle at the top left corner) is displayed when the user moves the mouse pointer inside a table (TRVTableItemInfo), if UseTableIcons=True.

Even when the user moves the mouse pointer outside a table, this icon is still visible for TableIconDelay.

When the user right-clicks this icon, TableIconPopupMenu is displayed. Besides, TSRichViewEdit.OnTableIconClick occurs on clicking.

The table for the displayed icon is returned by TSRichViewEdit.GetTableIconItem. A document where this table is located is returned by TSRichViewEdit.GetTableIconRVData.

Rectangle around the document area

You can display a rectangle between the document area and margins, if you set MarginsRectVisible=True. This rectangle is drawn using MarginsPen.

Hints on vertical scrolling

A hint appear on scrolling, if ShowScrollHint=True. This hint contains two lines describing the page at the scrolling position:

· HintPrefixText followed by the page number
· text from the beginning of page

This text is drawn with HintFont.

Header and footer

When the header is being edited, a line is shown above the main document. This line uses HeaderPen. Additionally, a label is displayed.

Header label

This label has text Texts.NormalPageHeader, font HeaderTitleFont, color HeaderTitleColor, border color HeaderPen.Color. If Texts.NormalPageHeader is empty, this label is not displayed.

A footers and the main document have similar properties. For the main document, a line and a label are invisible by default.

When a footer or a header is being edited, the main document can be shaded, if MainDocumentShade = True. When the main document is edited, a header and a footer can be shaded if HeaderFooterShade = True.

Page size

The page size, as it is shown on the screen, is returned in PageWidth and PageHeight properties.

They are measured in SRichViewEdit's UnitsProgram and do not depend on scaling. The same values in pixels are returned in PageWidth100Pix and PageHeight100Pix properties of SRichViewEdit.

However, these properties depend on viewing modes. If PageProperty.AutoWidth=False and PageProperty.PageViewMode=True, these properties return the same values as PageProperty's PageWidth and PageHeight. When AutoWidth or PageViewMode are changed, the screen view does not correspond to the paper size, and these properties become different.


TSRVViewProperty.AlignPageH

Specifies the horizontal alignment of page(s).

type

TSRVAlignPageH = (srvaphLeft, srvaphRight, srvaphCenter);

property AlignPageH : TSRVAlignPageH;

A minimal distance from the left and the right sides of the scrollable area to the page is specified in TSRichViewEdit.PageProperty.BoundLeftRight. If the page width is smaller than the rest of space, the page is aligned according to the value of this property.

If TSRichViewEdit.PageProperty.AutoWidth=True, the page occupies all available window width (excluding the double TSRichViewEdit.PageProperty.BoundLeftRight), so this alignment makes sense only if TSRichViewEdit.PageProperty.AutoWidth=False.

Default value:

srvaphCenter


TSRVViewProperty.AlignPageV

Specifies the vertical alignment of page(s).

type

TSRVAlignPageV = (srvapvTop, srvapvCenter);

property AlignPageV : TSRVAlignPageV;

If AlignPageV=srvapvCenter, a distance from the top of the scrollable area to the top of the first page is defined in TSRichViewEdit.PageProperty.PageBreakHeight. It is true even if TSRichViewEdit.PageProperty.PageViewMode=False (for a single page).

If AlignPageV=srvapvTop, all pages are shifted up by the scaled value of TSRichViewEdit.PageProperty.PageBreakHeight.


TSRVViewProperty.AutoVScrollBarPosition

Specifies where a vertical scrollbar is located if a right-to-left document is loaded

property AutoVScrollBarPosition: Boolean;

By default, if BiDiMode = rvbdRightToLeft, a vertical scrollbar is moved to the left side.

If you assign False to this property, this scrollbar will always be at the right side.

Default value:

True


TSRVViewProperty.FooterPen

A pen for drawing a line between the main document and the footer, when a footer (TSRichViewEdit.RVFooter) is being edited.

type

TSRVHeaderFooterPen = class (TPen);

property FooterPen: TSRVHeaderFooterPen;

The color of this pen is also used for drawing border around header label, see Texts.

In Delphi XE2 or newer, if a system color is specified for FooterPen.Color, and custom styles are applied, then a corresponding style color is used instead.

Default value:

1, psDot, $00CA784B

See also:

· HeaderPen
· MainPen


TSRVViewProperty.FooterTitleColor

A background color of label displayed when a footer (TSRichViewEdit.RVFooter) is being edited.

property FooterTitleColor: TColor;

A border around this label is drawn using FooterPen.Color.

A text of this label (Texts.NormalPageFooter, FirstPageFooter, EvenPageFooter, OddPageFooter) is drawn using FooterTitleFont.

In Delphi XE2 or newer, if a system color is specified for this property, and custom styles are applied, then a corresponding style color is used instead.

Default value:

$00F3E2D5

See also:

· HeaderTitleColor
· MainTitleColor


TSRVViewProperty.FooterTitleFont

A font of label title displayed when a footer (TSRichViewEdit.RVFooter) is being edited.

type

TSRVHeaderFooterFont = class (TFont);

property FooterTitleFont : TSRVHeaderFooterFont;

This font is used to draw a footer title (Texts.NormalPageFooter, FirstPageFooter, EvenPageFooter, OddPageFooter) on a background filled with FooterTitleColor.

In Delphi XE2 or newer, if a system color is specified for FooterTitleFont.Color, and custom styles are applied, then a corresponding style color is used instead.

Default value:

'Tahoma', 8, [], $009A480B

See also:

· HeaderTitleFont
· MainTitleFont


TSRVViewProperty.FreePosPage

Enables/disables free page positioning.

property FreePosPage: Boolean;

If False, positions, scaling and Z-order of all pages are calculated automatically.

If True, they are requested in OnGetPagePos event.

Default value:

False


TSRVViewProperty.HeaderFooterShade

Determines whether a header and a footer are shaded when the main document is being edited.

property HeaderFooterShade: Boolean;

Default value:

True

See also

· MainDocumentShade


TSRVViewProperty.HeaderPen

A pen for drawing a line between the main document and the header, when a header (TSRichViewEdit.RVHeader) is being edited.

type

TSRVHeaderFooterPen = class (TPen);

property HeaderPen: TSRVHeaderFooterPen;

The color of this pen is also used for drawing border around header label, see Texts.

In Delphi XE2 or newer, if a system color is specified for HeaderPen.Color, and custom styles are applied, then a corresponding style color is used instead.

Default value:

1, psDot, $00CA784B

See also:

· FooterPen
· MainPen


TSRVViewProperty.HeaderTitleColor

A background color of label displayed when a header (TSRichViewEdit.RVHeader) is being edited.

property HeaderTitleColor: TColor;

A border around this label is drawn using HeaderPen.Color.

A text of this label (Texts.NormalPageHeader, FirstPageHeader, EvenPageHeader, OddPageHeader) is drawn using HeaderTitleFont.

In Delphi XE2 or newer, if a system color is specified for this property, and custom styles are applied, then a corresponding style color is used instead.

Default value:

$00F3E2D5

See also:

· FooterTitleColor
· MainTitleColor


TSRVViewProperty.HeaderTitleFont

A font of label title displayed when a header (TSRichViewEdit.RVHeader) is being edited.

type

TSRVHeaderFooterFont = class (TFont);

property HeaderTitleFont : TSRVHeaderFooterFont;

This font is used to draw a header title (Texts.NormalPageHeader, FirstPageHeader, EvenPageHeader, OddPageHeader) on a background filled with HeaderTitleColor.

In Delphi XE2 or newer, if a system color is specified for HeaderTitleFont.Color, and custom styles are applied, then a corresponding style color is used instead.

Default value:

'Tahoma', 8, [], $009A480B

See also:

· FooterTitleFont
· MainTitleFont


TSRVViewProperty.HintFont

A font for hints appearing on vertical scrolling.

type
TSRVHintFont = class (TFont);
property HintFont: TSRVHintFont;

This hint appears if ShowScrollHint=True.

In Delphi XE2 or newer, if a system color is specified for HintFont.Color, and custom styles are applied, then a corresponding style color is used instead.

Default value:

'Arial', 10, clInfoText


TSRVViewProperty.HintPrefixText

Specifies the text for the first line of a popup hint appearing on vertical scrolling.

property HintPrefixText: string;

HintPrefixText is displayed before the page number.

This hint appears if ShowScrollHint=True.

Default value:

'Page '


TSRVViewProperty.IconStyle

Allows to choose an set of icons used in TSRichViewEdit control.

type

TSRVIconStyle = (srvisNormal, srvisFlat);

property IconStyle: TSRVIconStyle;

TSRichViewEdit allows choosing different icons for drawing in a zooming panel (if ZoomPanelVisible=True)

Value | Meaning
srvisNormal | Standard icons
srvisFlat | Simplified flat white icons

Default value:

srvisNormal


TSRVViewProperty.MainDocumentShade

Determines whether the main document is shaded when a header or a footer is being edited.

property MainDocumentShade: Boolean;

Default value:

False

See also

· HeaderFooterShade


TSRVViewProperty.MainPen

A pen for drawing lines between the main document and the header and the footer, when the main document (TSRichViewEdit.RichViewEdit) is being edited.

type

TSRVMainPen = class (TPen);

property MainPen: TSRVMainPen;

The color of this pen is also used for drawing border around the main document label, see Texts.

In Delphi XE2 or newer, if a system color is specified for MainPen.Color, and custom styles are applied, then a corresponding style color is used instead.

Default value:

1, psClear, $00CA784B (invisible line)

See also:

· HeaderPen
· FooterPen


TSRVViewProperty.MainTitleColor

A background color of a label displayed when the main document (TSRichViewEdit.RichViewEdit) is being edited.

property MainTitleColor: TColor;

A border around this label is drawn using MainPen.Color.

A text of this label (Texts.MainDocument) is drawn using MainTitleFont.

In Delphi XE2 or newer, if a system color is specified for this property, and custom styles are applied, then a corresponding style color is used instead.

Default value:

$00F3E2D5

See also:

· HeaderTitleColor
· FooterTitleColor


TSRVViewProperty.MainTitleFont

A font of label title displayed when the main document (TSRichViewEdit.RichViewEdit) is being edited.

type

TSRVHeaderFooterFont = class (TFont);

property MainTitleFont : TSRVHeaderFooterFont;

This font is used to draw Texts.MainDocument on a background filled with MainTitleColor.

In Delphi XE2 or newer, if a system color is specified for MainTitleFont.Color, and custom styles are applied, then a corresponding style color is used instead.

Default value:

'Tahoma', 8, [], $009A480B

See also:

· HeaderTitleFont
· FooterTitleFont


TSRVViewProperty.MarginsPen

Specifies a pen properties for drawing rectangle around the document area.

property BoundTextPen: TSRVMarginsPen;

This rectangle shows margins. It is drawn only if MarginsRectVisible=True.

In Delphi XE2 or newer, if a system color is specified for MarginsPen.Color, and custom styles are applied, then a corresponding style color is used instead.

Default value:

psDot, clSilver


TSRVViewProperty.MarginsRectVisible

Specifies whether the component draws a rectangle around the document area.

property MarginsRectVisible: Boolean;

This rectangle is drawn using MarginsPen.


TSRVViewProperty.MaxPageColCount

Specifies the maximal count of columns for page arrangement.

property MaxPageColCount: Integer;

If zooming allows, the editor tries to display several pages in a row. This value defines the maximal count of pages in a row (0 means unlimited).

Default value:

0


TSRVViewProperty.MouseWheelZoom

Specifies whether pages can be zoomed in/out using the mouse wheel (with pressed Ctrl key)

property MouseWheelZoom: Boolean;

If True, Ctrl +mouse wheel changes ZoomMode to rvzmCustom and increases/decreases ZoomPercent.

Default value:

True

See also:

· MouseWheelZoomMin, MouseWheelZoomMax, MouseWheelZoomSpeed global variables


TSRVViewProperty.PageHeight

TSRVViewProperty.PageHeight (read-only)

 Top Previous Next

Returns the page height as it is shown on the screen.

property PageHeight: TRVLength;

This property is measured in SRichViewEdit's UnitsProgram. The same value in pixels is returned in PageHeight100Pix property of SRichViewEdit.

This property does not depend on scaling, but depends on viewing modes (PageProperty.AutoWidth and PageProperty.PageViewMode). This property is equal to PageProperty.PageHeight only if AutoWidth=False and PageViewMode=True.


TSRVViewProperty.PageWidth

TSRVViewProperty.PageWidth (read-only)

 Top Previous Next

Returns the page width as it is shown on the screen.

property PageWidth: TRVLength;

This property is measured in SRichViewEdit's UnitsProgram. The same value in pixels is returned in PageWidth100Pix property of SRichViewEdit.

This property does not depend on scaling, but depends on viewing modes (PageProperty.AutoWidth and PageProperty.PageViewMode). This property is equal to PageProperty.PageWidth only if AutoWidth=False and PageViewMode=True.


TSRVViewProperty.ShowScrollHint

Specifies whether a popup hint appears on scrolling.

property ShowScrollHint: Boolean;

This hint displays on the first line: HintPrefixText, then the page number.

On the second line, a text from the beginning of this page is displayed.

HintFont is used.

Default value:

True


TSRVViewProperty.TableIconDelay

Specifies the period of time for which a table "icon" is still visible after the user moved the mouse pointer outside a table.

property TableIconDelay: LongWord;

A table "icon" (a rectangle at the top left corner) is displayed when the user moves the mouse pointer inside a table (TRVTableItemInfo), if UseTableIcons=True.

Even when the user moves the mouse pointer outside a table, this icon is still visible for this period of time.

This value is measured in milliseconds.

Default value:

3000

See also:

· TSRichViewEdit.OnTableIconClick
· TableIconPopupMenu


TSRVViewProperty.TableIconPopupMenu

A reference to the context menu of a table "icon".

property TableIconPopupMenu: TPopupMenu;

A table "icon" (a rectangle at the top left corner) is displayed when the user moves the mouse pointer inside a table (TRVTableItemInfo), if UseTableIcons=True.

See also:

· TSRichViewEdit.OnTableIconClick
· TableIconDelay


TSRVViewProperty.Texts

A list of text strings displayed in TSRichViewEdit.

type
TSRVTexts = class(TPersistent)
property Texts: TSRVTexts;

TSRVTexts has the properties listed in the table below.

Property | Meaning | Default Value | Related Properties of TSRVViewProperty
NormalPageHeader | Title for the normal header, if PageProperty.FacingPages=False | 'Header' | HeaderTitleFont, HeaderTitleColor, HeaderPen.Color
NormalPageFooter | Title for the normal footer, if FacingPages=False | 'Footer' | FooterTitleFont, FooterTitleColor, FooterPen.Color
FirstPageHeader | Title for the first page header | 'First Page Header' | HeaderTitleFont, HeaderTitleColor, HeaderPen.Color
FirstPageFooter | Title for the first page footer | 'First Page Footer' | FooterTitleFont, FooterTitleColor, FooterPen.Color
EvenPageHeader | Title for the even pages header | 'Even Page Header' | HeaderTitleFont, HeaderTitleColor, HeaderPen.Color
EvenPageFooter | Title for the even pages footer | 'Even Page Footer' | FooterTitleFont, FooterTitleColor, FooterPen.Color
OddPageHeader | Title for the normal header, if FacingPages=True | 'Odd Page Header' | HeaderTitleFont, HeaderTitleColor, HeaderPen.Color
OddPageFooter | Title for the normal footer, if FacingPages=True | 'Odd Page Footer' | FooterTitleFont, FooterTitleColor, FooterPen.Color
MainDocument | Title for the main document | '' | MainTitleFont, MainTitleColor, MainPen.Color

These strings are used to draw labels when editing a header, a footer, or a main document. If a string is empty, the corresponding label is not displayed.


TSRVViewProperty.UseTableIcons

Specifies whether table "icons" should be displayed for tables.

property UseTableIcons: Boolean;

A table "icon" (a rectangle at the top left corner) is displayed when the user moves the mouse pointer inside a table (TRVTableItemInfo), if UseTableIcons=True.

Even when the user moves the mouse pointer outside a table, this icon is still visible for TableIconDelay.

When the user right-clicks this icon, TableIconPopupMenu is displayed. Besides, TSRichViewEdit.OnTableIconClick occurs on clicking.

The table for the displayed icon is returned by TSRichViewEdit.GetTableIconItem. A document where this table is located is returned by TSRichViewEdit.GetTableIconRVData.

Default value:

True


TSRVViewProperty.ViewMode

Switches between editing and preview modes.

type

TSRVViewMode = (srvvmEditMode, srvvmPreviewMode);

property ViewMode: TSRVViewMode;

When this property is changed, TSRichViewEdit.OnChangeViewModeAfter and TSRichViewEdit.OnChangeViewModeBefore events occur.

Default value:

srvvmEditMode


TSRVViewProperty.WheelStep

Defines how much the document will be scrolled when the user turns a mouse wheel.

property WheelStep: Integer;

This property provides access to the property of the same name of TSRichViewEdit.RichViewEdit.

Default value:

3


TSRVViewProperty.WorkArea

Restricts the region available for drawing page content.

type

TSRVWorkArea = (srvwaTextRect, srvwaPageRect);

property WorkArea : TSRVWorkArea;

Value | Meaning
srvwaTextRect | The output area is limited by the document area (nothing can be drawn on margins)
srvwaPageRect | The output area is limited by the page area (nothing can be drawn beyond the page)

Default value:

srvwaPageRect


TSRVViewProperty.ZoomMenu

A reference to the popup menu shown when the user clicks on the text area of a zooming panel.

property ZoomMenu: TPopupMenu;

See also

· ZoomPanelVisible
· ZoomPanelFont
· TableIconMenu


TSRVViewProperty.ZoomMin, ZoomMax

The properties define the range of zooming.

property ZoomMin: Integer;

property ZoomMax: Integer;

ZoomPercent can be set to a value in this range.

Default value:

20..500


TSRVViewProperty.ZoomMode

The current zooming mode.

property ZoomMode: TRVZoomMode;

Full page / Page width / Custom. See also ZoomPercent.

This value is switched between ZoomModeIN, ZoomModeOUT, ZoomModeEdit.

When this property is changed, TSRichViewEdit.OnZoomChanged occurs.

Default value:

rvzmPageWidth


TSRVViewProperty.ZoomModeEdit

This value is assigned to ZoomMode when switching ViewMode to srvvmEditMode.

property ZoomModeEdit: TRVZoomMode;

If this property is equal to rvzmCustom, the corresponding zooming is defined in ZoomPercentEdit.

When this property is changed, TSRichViewEdit.OnZoomViewChanged event occurs.

Default value

rvzmPageWidth


TSRVViewProperty.ZoomModeIN

This value is assigned to ZoomMode when switching ViewMode to srvvmPreviewMode, or in preview mode when the user clicks the page and the cursor looks like "-" magnifier.

property ZoomModeIN: TRVZoomMode;

In preview mode the mouse pointer looks like a magnifier. On clicking, ZoomMode is switched between ZoomModeIN/ZoomModeOUT.

If this property is equal to rvzmCustom, the corresponding zooming is defined in ZoomPercentIN.

When this property is changed, TSRichViewEdit.OnZoomViewChanged event occurs.

Default value:

rvzmFullPage.


TSRVViewProperty.ZoomModeOUT

This value is assigned to ZoomMode in preview mode when the user clicks the page and the cursor looks like "+" magnifier.

property ZoomModeOUT: TRVZoomMode;

In preview mode the mouse pointer looks like a magnifier. On clicking, ZoomMode is switched between ZoomModeIN/ZoomModeOUT.

If this property is equal to rvzmCustom, the corresponding zooming is defined in ZoomPercentOUT.

When this property is changed, TSRichViewEdit.OnZoomViewChanged event occurs.

Default value:

rvzmCustom


TSRVViewProperty.ZoomPanelFont

A font for drawing text (zooming percent) in a zooming panel.

type
TSRVZoomPanelFont = (TFont)
property ZoomPanelFont: TSRVZoomPanelFont;

A zooming panel is shown if ZoomPanelVisible=True.

Default value:

'Tahoma', 8, clWindowText


TSRVViewProperty.ZoomPanelVisible

Shows/hides a zooming panel.

property ZoomPanelVisible: Boolean;

This panel is located in the bottom right corner, to the right of the horizontal scrollbar. It contains a track bar to change ZoomPercent in the range ZoomMin..ZoomMax.

If the parent TSRichViewEdit's BackgroundProperty.Visible=True, a background of this panel is drawn using the specified gradient colors. Otherwise,TSRichViewEdit.Color is used.

If ZoomMenu is assigned, it is displayed when the user clicks a text area of the panel. This text is drawn using ZoomPanelFont.

The appearance of the track bar depends on the value of IconStyle property.

Default value:

False

See also

· ZoomMenu
· ZoomPanelFont
· IconStyle


TSRVViewProperty.ZoomPercent

The page zooming percent.

property ZoomPercent: Single;

If ZoomMode = rvzmCustom, this value is assigned by the user. Otherwise it is calculated automatically.

Assigning to this property resets ZoomMode to rvzmCustom.

When this property is changed, TSRichViewEdit.OnZoomChanged occurs.

This property can be changed in the range ZoomMin..ZoomMax.

Default value:

100

See also:

· MouseWheelZoom
· ZoomPanelVisible


TSRVViewProperty.ZoomPercentEdit

This value is assigned to ZoomPercent when switching ViewMode to srvvmEditMode, if ZoomModeEdit = rvzmCustom.

property ZoomPercentEdit: Single;

When this property is changed, TSRichViewEdit.OnZoomViewChanged event occurs.

Default value:

100


TSRVViewProperty.ZoomPercentIN

This value is assigned to ZoomPercent when switching ViewMode to srvvmPreviewMode, or in preview mode when the user clicks the page and the cursor looks like "-" magnifier, if ZoomModeIN = rvzmCustom.

property ZoomPercentIN: Single;

When this property is changed, TSRichViewEdit.OnZoomViewChanged event occurs.

Default value:

100


TSRVViewProperty.ZoomPercentOUT

This value is assigned to ZoomPercent when the user clicks the page and the cursor looks like "+" magnifier, if ZoomModeOUT = rvzmCustom.

property ZoomPercentOUT: Single;

When this property is changed, TSRichViewEdit.OnZoomViewChanged event occurs.

Default value:

100


TDBSRichViewEdit

dbsrichviewedit TDBSRichViewEdit

Properties Methods Events | Overview

 Top Previous Next

TDBSRichViewEdit is a word processing component linked to a database field.

Unit DBSRVE.

Syntax

TDBSRichViewEdit = class(TSRichViewEdit);

Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TCustomControl

TSRichViewEdit

Description

Use a TDBSRichViewEdit object to enable users to edit a database field in a word processing control.

If the application doesn’t require the data-aware capabilities of TDBSRichViewEdit, use a TSRichViewEdit component instead, to conserve system resources.

Properties

TDBSRichViewEdit overrides RichViewEdit and ExternalRV properties of TSRichViewEdit. They have the same meaning, but TDBRichViewEdit type.

Other properties and events provide access to properties and events of RichViewEdit.


TDBSRichViewEdit.AutoDisplay

Determines whether to automatically display the contents of field in the TDBSRichViewEdit control.

property AutoDisplay: Boolean;

This property provides access to the RichViewEdit's property of the same name.

If AutoDisplay is True, the TDBSRichViewEdit control automatically displays new data when the underlying BLOB field changes (such as when moving to a new record).

If AutoDisplay is False, the control shows only the field name whenever the underlying BLOB field changes. To display the data, the user can double-click on the control.

The effect of AutoDisplay is not purely cosmetic. When AutoDisplay is False, if the data changes, the content of TDBSRichViewEdit document changes to the name of the field (written in the 0th text and paragraph style). Thus, if AutoDisplay is False, applications should be cautious about using the methods for saving contents to ascertain the value of the underlying field.

Calling the RichViewEdit.LoadField method causes component to update to the current value of the BLOB field. This change will also be reflected in the appearance of the control on screen.

Change the value of AutoDisplay to False if the automatic loading of BLOB fields seems to take too long.


TDBSRichViewEdit.DataField

Specifies the field from which the TDBSRichViewEdit control displays data.

property DataField: string;

This property provides access to the RichViewEdit's property of the same name.

Use DataField to bind the TDBSRichViewEdit control to the field in the dataset. To fully specify database field, both the dataset and the field within that dataset must be defined. The DataSource property of the TDBSRichViewEdi control specifies the dataset which contains the DataField.


TDBSRichViewEdit.DataSource

Links the TDBSRichViewEdit control to the dataset that contains the field it represents.

property DataSource : TDataSource;

This property provides access to the RichViewEdit's property of the same name.

Use DataSource to link the TDBSRichViewEdit control to the dataset in which the data can be found. To fully specify database field for the TDBSRichViewEdit control, both the dataset and the field within that dataset must be defined. Use the DataField property to specify the particular field within the dataset.


TDBSRichViewEdit.ExternalRV

Reference to an external TDBRichViewEdit component used to render documents in this TSRichViewEdit component.

property ExternalRV: TDBRichViewEdit;

Nil by default (invisible internal RichViewEdit is used).


TDBSRichViewEdit.FieldFormat

Format for saving data in the database field

property FieldFormat: TRVDBFieldFormat;

This property allows changing the field saving format to RTF or plain text.

This property provides access to the RichViewEdit's property of the same name.

Default value:

rvdbRVF


TDBSRichViewEdit.IgnoreEscape

Disallows processing of Escape key

property IgnoreEscape: Boolean;

This property provides access to the RichViewEdit's property of the same name.

By default, Escape cancels editing in TDBSRichViewEdit.

If you set this property to True, Escape will do nothing.

Default value:

False


TDBSRichViewEdit.RichViewEdit

Returns TDBRichViewEdit component used to render documents.

property RichViewEdit: TDBRichViewEdit;

TDBSRichViewEdit can use two types of TDBRichViewEdit:

· internal: TDBRichViewEdit component is created inside TDBSRichViewEdit. Users cannot see it, it is responsible only for document rendering.
· external: refers to external TDBRichViewEdit component (ExternalRV). Take a note that width and height of this DBRichViewEdit are set by TDBSRichViewEdit.


TDBSRichViewEdit.OnLoadCustomFormat

This event allows loading data from field in your own format.

type

TDBSRVCustomFormatEvent = procedure (Sender: TDBSRichViewEdit;

Stream: TStream; var DoDefault: Boolean) of object;

property OnLoadCustomFormat: TDBSRVCustomFormatEvent;

See the event of the same name in the RichView help file (event of TDBRichViewEdit).

See also:

· OnSaveCustomFormat


TDBSRichViewEdit.OnLoadDocument

Occurs after loading document from the database field

property OnLoadDocument: TNotifyEvent;

See the event of the same name in the RichView help file (event of TDBRichViewEdit).

This event allows to preprocess the loaded document before displaying.

See also:

· OnNewDocument


TDBSRichViewEdit.OnNewDocument

Occurs when creating or before loading document

property OnNewDocument: TNotifyEvent;

See the event of the same name in the RichView help file (event of TDBRichViewEdit).

Occurs:

· on creating new document (before displaying field from newly added record);
· before loading document from the field.

Use this event to assign default values to properties (such as background, margins, styles).

See also:

· OnLoadDocument.


TDBSRichViewEdit.OnSaveCustomFormat

This event allows saving data to field in your own format.

type

TDBSRVCustomFormatEvent = procedure (Sender: TDBSRichViewEdit;

Stream: TStream; var DoDefault: Boolean) of object;

property OnSaveCustomFormat: TDBSRVCustomFormatEvent;

See the event of the same name in the RichView help file (event of TDBRichViewEdit).

See also:

· OnLoadCustomFormat


TSRVPageScroll

srvpagescroll TSRVPageScroll

Properties Methods Events | Overview

 Top Previous Next

TSRVPageScroll a s component for displaying thumbnails of pages for a document from TSRichViewEdit component.

Unit SRVPageScroll.

Syntax

TSRVPageScroll = class(TRVScroller)

Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TCustomControl

TRVScroller

Description

The source document is specified in SRichViewEdit.

Thumbnails are arranged vertically or horizontally, depending on ScrollType. A number of columns (or rows) is specified in Columns.

A size of thumbnails is defined in PageWidth, PageHeight, and PageProportions properties.

Distances between and around thumbnails are specified in PageBreakHeight, PageBreakWidth, MarginVertical, MarginHorizontal properties.

In addition to thumbnails, the component can display rectangles containing page numbers. They are displayed if PageNoVisible=True. Their properties are AlignText, BackgroundTextColor, PageNoFont.

A background is filled with Color. Thumbnails have borders drawn using PageBorderColor and SelectColor. A shadow can be displayed using the properties ShadowColor and ShadowWidth.


TSRVPageScroll.AlignText

Specifies the position of page number relative to the page.

type

TPSAlignText = (psatLeft, psatRight, psatTop, psatBottom);

property AlignText : TPSAlignText ;

Page numbers are displayed if PageNoVisible=True.

Default value:

psatBottom (below pages)

See also:

· BackgroundTextColor
· PageNoFont
· OnDrawPageNumber


TSRVPageScroll.AutoScrolled

Specifies whether the component should be scrolled when another page becomes visible in SRichViewEdit.

property AutoScrolled: Boolean;

If True, the component is scrolled to make SRichViewEdit.ScrolledPage visible.

Default value:

True


TSRVPageScroll.AutoUpdate

Enables/disables automatic update of thumbnails when the content of SRichViewEdit is changed.

property AutoUpdate: Boolean;

Assign False to this value is you know that the content of SRichViewEdit cannot be changed, or to make editing is SRichViewEdit faster.

If False, call UpdateCache to update thumbnails.

Default value:

True


TSRVPageScroll.BackgroundTextColor

Specifies the background color below page numbers.

property BackgroundTextColor : TColor;

Page numbers are displayed if PageNoVisible=True.

Default value:

clBtnFace

See also:

· AlignText
· PageNoFont
· OnDrawPageNumber


TSRVPageScroll.Columns

Specifies the number of columns (if ScrollType=psstVertical) or rows (if ScrollType=psstHorizontal),

property Columns: Integer;

For example, if SRichViewEdit.PageCount=5 and Columns=2, thumbnails are displayed in the order shown below.

If ScrollType=psstVertical:

1 2

3 4

5

If ScrollType=psstHorizontal:

1 3 5

2 4

A distance between columns is defined in PageBreakWidth, a distance between rows is defined in PageBreakHeight.

Default value:

1


TSRVPageScroll.CachedPagesCount

Specifies the maximal page cache size.

property CachedPagesCount: Integer;

The cache stores page images. If the cache is large, more memory is used, but drawing is faster.

Default value:

10

See also:

· CacheScrollLimit


TSRVPageScroll.CacheScrollLimit

Specifies how the page cache is updated when the component is scrolled.

property CacheScrollLimit: Integer;

When the cache is completely filled (see CachedPageCount), it is updated when the component is scrolled by at least CacheScrollLimit number of pages.

Default value:

1


TSRVPageScroll.MarginHorizontal

Specifies the left and the right margins.

property MarginHorizontal : Integer;

This is a distance from the left and from the right sides of the scrollable area to thumbnails.

Default value:

15

See also:

MarginVertical

PageBreakWidth


TSRVPageScroll.MarginVertical

Specifies the top and the bottom margins.

property MarginVertical: Integer;

This is a distance from the top and from the bottom sides of the scrollable area to thumbnails.

Default value:

15

See also:

MarginHorizontal

PageBreakHeight


TSRVPageScroll.PageBorderColor

Defines the page border color.

property PageBorderColor: TColor;

This is a border color for all thumbnails, except for SRichViewEdit.CurrentPage. For this page, SelectColor is used.

You can draw this border yourself, using OnDrawPageBorder event.


TSRVPageScroll.PageBreakHeight

Specifies the vertical distance between page thumbnails.

property PageBreakHeight: Integer;

Thumbnails are displayed in several rows in the following cases:

· ScrollType=psstVertical, or
· ScrollType=pssHorizontal and Columns>1

Default value:

20

See also:

· PageBreakWidth
· MarginVertical


TSRVPageScroll.PageBreakWidth

Specifies the horizontal distance between page thumbnails.

property PageBreakWidth: Integer;

Thumbnails are displayed in several columns in the following cases:

· ScrollType=pssHorizontal, or
· ScrollType=psstVertical and Columns>1

Default value:

25

See also:

· PageBreakHeight
· MarginHorizontal


TSRVPageScroll.PageHeight

Specifies the [maximal] height of page thumbnails.

property PageHeight: Integer;

If PageProportions=False, all thumbnails are created with the following size: PageWidth x PageHeight.

If PageProportions=True, thumbnails have the proportions of the original pages:

· ScrollType=pssHorizontal, thumbnails' width is calculated automatically by PageHeight;
· ScrollType=psstVertical, thumbnails' height is calculated automatically by PageWidth .

Default value

200


TSRVPageScroll.PageNoFont

Specifies the font for displaying page numbers.

type
TSRVPageNoFont = class (TFont)
property PageNoFont: TSRVPageNoFont;

Page numbers are displayed if PageNoVisible=True.

Default value:

'Arial', 8

See also:

· BackgroundTextColor
· AlignText
· OnDrawPageNumber


TSRVPageScroll.PageNoVisible

Shows or hides page numbers

property PageNoVisible: Boolean;

Default value:

True

See also:

· BackgroundTextColor
· PageNoFont
· AlignText
· OnDrawPageNumber


TSRVPageScroll.PageProportions

Specifies whether thumbnails keep proportions of the original pages.

property PageProportions : Boolean;

Default value:

True

See also:

· PageWidth
· PageHeight


TSRVPageScroll.PageWidth

Specifies the [maximal] width of page thumbnails.

property PageWidth: Integer;

If PageProportions=False, all thumbnails are created with the following size: PageWidth x PageHeight.

If PageProportions=True, thumbnails have the proportions of the original pages:

· ScrollType=pssHorizontal, thumbnails' width is calculated automatically by PageHeight ;
· ScrollType=psstVertical, thumbnails' height is calculated automatically by PageWidth.

Default value

150


TSRVPageScroll.ScrollType

Specifies how page thumbnails are arranged.

type

TPSScrollType = (psstHorizontal, psstVertical);

property ScrollType: TPSScrollType;

Mode | Meaning
psstHorizontal | Thumbnails are displayed in columns, each column has Columns rows
psstVertical | Thumbnails are displayed in rows, each row has Columns columns

Default value:

psstVertical


TSRVPageScroll.SelectColor

Defines the border color for the first visible page in SRichViewEdit.

property SelectColor: TColor;

This is a border color for SRichViewEdit.CurrentPage. Other pages use PageBorderColor.

Default value:

clRed

See also:

· AutoScrolled


TSRVPageScroll.ShadowColor

Specifies the color of shadow cast by page thumbnails.

property ShadowColor: TColor ;

A shadow is displayed if ShadowWidth>0.

Default value:

$0099A8AC


TSRVPageScroll.ShadowWidth

Specifies the width of shadow cast by page thumbnails.

property ShadowWidth: Integer;

A shadow color is ShadowColor.

Default value:

3


TSRVPageScroll.SRichViewEdit

Specifies the link to the editor containing the source document.

property SRichViewEdit: TSRichViewEdit;

Thumbnails can be displayed only if this property is assigned.


TSRVPageScroll.BeginUpdate

Disables repainting until EndUpdate is called.

procedure BeginUpdate;

Calls to BeginUpdate and EndUpdate may be nested.

Call BeginUpdate before multiple changes in SRichViewEdit to make them faster.


TSRVPageScroll.EndUpdate

Enables repainting blocked by BeginUpdate.

procedure EndUpdate;


TSRVPageScroll.First

Moves to the first page.

procedure First;

This method changes SRichViewEdit.CurrentPage. This page becomes highlighted in this component, but not necessary the component is scrolled to this page (because it scrolls to show SRichViewEdit.ScrolledPage, not SRichViewEdit.CurrentPage). Call ScrollToPage(SRichViewEdit.CurrentPage) to scroll to the page containing the caret.

See also:

· Prev
· Next
· Last


TSRVPageScroll.GetPageAt

Returns the index of page displayed at the specified position.

function GetPageAt(X, Y: Integer; isNearest : Boolean) : Integer;

X, Y – client coordinates (relative to the top left corner of the client area of the component's window).

if isNearest=False, the method returns the index of page at the specified coordinates (from 1), or 0 if these coordinates are outside of any page.

if isNearest=True, the method returns the index of the nearest page to the specified coordinates (from 1).


TSRVPageScroll.Last

Moves to the last page.

procedure Last;

This method changes SRichViewEdit.CurrentPage. This page becomes highlighted in this component, but not necessary the component is scrolled to this page (because it scrolls to show SRichViewEdit.ScrolledPage, not SRichViewEdit.CurrentPage). Call ScrollToPage(SRichViewEdit.CurrentPage) to scroll to the page containing the caret.

See also:

· First
· Prev
· Next


TSRVPageScroll.Next

Moves to the next page.

procedure Next;

This method changes SRichViewEdit.CurrentPage. This page becomes highlighted in this component, but not necessary the component is scrolled to this page (because it scrolls to show SRichViewEdit.ScrolledPage, not SRichViewEdit.CurrentPage). Call ScrollToPage(SRichViewEdit.CurrentPage) to scroll to the page containing the caret.

See also:

· First
· Prev
· Last


TSRVPageScroll.Prev

Moves to the previous page.

procedure Prev;

This method changes SRichViewEdit.CurrentPage. This page becomes highlighted in this component, but not necessary the component is scrolled to this page (because it scrolls to show SRichViewEdit.ScrolledPage, not SRichViewEdit.CurrentPage). Call ScrollToPage(SRichViewEdit.CurrentPage) to scroll to the page containing the caret.

See also:

· First
· Next
· Last


TSRVPageScroll.ScrollToPage

Scrolls to the specified page.

procedure ScrollToPage(PageNo : Integer);

This method scrolls this component, without scrolling SRichViewEdit.


TSRVPageScroll.UpdateCache

Updates the cached images of page thumbnails.

procedure UpdateCache;

Normally, the cache is updated automatically. This method is useful if AutoUpdate=False.


TSRVPageScroll.OnDrawPageBorder

Allows a custom drawing of borders of page thumbnails.

type

TPSDrawPageBorderEvent = procedure (Sender: TObject; Canvas: TCanvas;

const R: TRect; PageNo: Integer) of object;

property OnDrawPageBorder : TPSDrawPageBorderEvent ;

Canvas – canvas where to draw.

R – location of the page thumbnail.

PagNo – index of the thumbnails' page, from 1.

By default, all thumbnails have a border of PageBorderColor color. If this event is assigned, a default border is not drawn. But the selected page is still highlighted with SelectColor color, use OnDrawSelectedPage to override it.


TSRVPageScroll.OnDrawPageNumber

Allows a custom drawing of page numbers.

type

TPSDrawPageNumberEvent = procedure (Sender: TObject; Canvas: TCanvas;

const R: TRect; PageNo : Integer; isSelect : Boolean) of object;

property OnDrawPageNumber: TPSDrawPageNumberEvent;

By default, page numbers are displayed if PageNoVisible=True.

They are displayed in the location specified in AlignText, drawing using BackgroundTextColor and PageNoFont properties.

If this event is assigned, the default drawing is not performed.

Canvas – canvas where to draw.

R – location of the page number, calculated according to AlignText and PageNoFont.

PagNo – page number to draw.

isSelect specifies whether this page is highlighted.


TSRVPageScroll.OnDrawSelectedPage

Allows a custom drawing of highlighting of the selected thumbnail.

type

TPSDrawSelectedPageEvent = procedure (Sender: TObject; Canvas: TCanvas;

const R: TRect; PageNo: Integer) of object;

property OnDrawSelectedPage: TPSDrawSelectedPageEvent;

Canvas – canvas where to draw.

R – location of the page thumbnail.

PagNo – index of the thumbnails' page, from 1.

This drawing occurs after drawing the default page border, see OnDrawPageBorder.

By default, highlighted page have a border of SelectColor color. If this event is assigned, this default border is not drawn


TSclRVRuler

scrlrvruler TSclRVRuler

Properties Methods Events | Overview

 Top Previous Next

TSclRVRuler is a horizontal or vertical ruler.

Unit SclRVRuler.

Syntax

TSclRVRuler = class(TRVRuler);

Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TCustomControl

TCustomRuler

TRuler

TRVRuler

Description

The class is based on the TRVRuler class and adapts the ruler for work with TSRichViewEdit.

It introduces new properties and methods for work as a vertical ruler and for assigning margins.

TRVRuler is included in RichViewActions.

The ruler works with the editor specified in SRichViewEdit property.


TSclRVRuler Events

Properties Methods Events | Legend

In TSclRVRuler

Published OnAfterMarginChanged

Derived from TRVRuler

...


TSclRVRuler Methods

Properties Methods Events | Legend

In TSclRVRuler

GetPageProperties

Scrolled

SetPageProperties

Derived from TRVRuler

...


TSclRVRuler Properties

Properties Methods Events | Legend

In TSclRVRuler

Published SRichViewEdit

Derived from TRVRuler

...


TSclRVRuler.SRichViewEdit

A reference to the editor.

property SRichViewEdit: TSRichViewEdit;

The ruler works with this editor.


TSclRVRuler.CheckMargins

Assigns the ruler properties from the linked SRichViewEdit.

procedure CheckMargins;


TSclRVRuler.GetPageProperties

The procedure returns margins and page size in the specified units. The returned values depend on the ruler type (horizontal/vertical).

procedure GetPageProperties(Units: TRulerUnits;

var AMargin1, AMargin2, APageWidth: Extended);

Input parameters

Units – type of units: centimeters, millimeters, pixels etc. The output parameters are measured in these units.

Output parameters

AMargin1 – left margin (LeftMargin) for horizontal ruler, or top margin (TopMargin) for vertical ruler.

AMargin2 – right margin (RightMargin) for horizontal ruler, bottom margin (BottonMargin) for vertical ruler.

APageWidth – page width (PageWidth) for horizontal ruler, page height (PageHeight) for vertical ruler.


TSclRVRuler.Scrolled

Updates the ruler's margins.

procedure Scrolled;

This method must be called if SRichViewEdit.CanUpdate=False. Otherwise, margins are updated automatically.


TSclRVRuler.SetPageProperties

The procedure changes margins and page size. The changed properties depend on the ruler type (horizontal/vertical).

procedure SetPageProperties(Units: TRulerUnits;

AMargin1, AMargin2, APageWidth: Extended);

Units – type of units: centimeters, millimeters, pixels etc. Other parameters are measured in these units.

AMargin1 – left margin (LeftMargin) for horizontal ruler, or top margin (TopMargin) for vertical ruler.

AMargin2 – right margin (RightMargin) for horizontal ruler, bottom margin (BottonMargin) for vertical ruler.

APageWidth – page width (PageWidth) for horizontal ruler, page height (PageHeight) for vertical ruler.


TSclRVRuler.OnAfterMarginChanged

Occurs after the ruler's margins are changed.

property OnAfterMarginChanged: TNotifyEvent;


TSRVToolBar

srvtoolbar TSRVToolBar

Properties Events | Overview

 Top Previous Next

TSRVToolBar is a simple toolbar component.

Unit SRVToolBar.

Syntax

TSRVToolBar = class(TCustomControl)

Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TCustomControl

Description

TSRVToolbar is a container for buttons (TSRVToolButton).

The main features:

· all buttons in the toolbar have the same height and width;
· buttons are arranged in rows and columns;
· buttons can have different images for different states (normal, highlighted, disabled);
· button captions can be displayed in the bottom or the top part of the toolbar.

This component can be used directly, or inside a floating tool window (TSRVToolWindow), or inside a scrollbar area of TSRichViewEdit component (see TSRVPropertyTBH and TSRVPropertyTBV).

Properties

This class contains almost the same set of properties as TSRVCustomPropertyTB class and TSRVToolWindow component.

A toolbar consists of buttons and a hint area.

The hint area can be placed at the top or at the bottom of the toolbar, depending on AlignText property. A height of this area is defined in HintHeight property. This area can work as a "Cancel" button. When none of buttons is highlighted, it displays HintCancel. Otherwise, it displays Caption of tool button. A font for text displayed in this area is specified in HintFont.

Buttons are defined in Buttons collection. Buttons are arranged in rows and columns, the number of columns is specified in ButtonsCol. A size of buttons is defined in ButtonWidth and ButtonHeight properties. A spacing between buttons is specified in Spacer. A horizontal positions of buttons is defined by AlignButton and Indent properties.

The toolbar can have a border, its width is specified in BorderWidth.

The toolbar color is Color. Colors of disabled, pressed and highlighted buttons are specified in ColorDisable, ColorDown, and ColorSelect properties. A pen of frame around the toolbar is defined in PenFrame.


TSRVToolBar.AlignButton

Defines the position of buttons in the toolbar window.

property AlignButton: TSRVAlignButton;

See also

Indent

Default value:

srvabCenter


TSRVToolBar.AlignText

Defines the position of text with the captions of the highlighted button (button below the mouse pointer)

property AlignText: TSRVAlignText;

When none of the buttons are highlighted, HintCancel is displayed in this area.

Default value:

srvatBottom


TSRVToolBar.AutoSize

Allows autocalculation of the toolbar size.

property AutoSize: Boolean;

Default value:

False


TSRVToolBar.BorderWidth

Specifies a width of the toolbar border (spacing around the toolbar)

property BorderWidth : Integer;

A border (see PenFrame) is drawn in this area. The rest of space (if BorderWidth>the pen's width) is painted with Color.

Default value:

1

See also:

· Spacer
· HintHeight


TSRVToolBar.ButtonCol

Specifies the maximal number of columns.

property ButtonCol: Integer;

ButtonCol specifies the number of buttons what may be placed in a line.

Default value:

-1 (unlimited)


TSRVToolBar.ButtonHeight

Sets the height of tool buttons (TSRVToolButton), in pixels.

property ButtonHeight: Integer;

Default value:

26

See also:

· ButtonWidth


TSRVToolBar.Buttons

Collection of tool buttons (TSRVToolButton).

property Buttons: TSRVButtonCollection;


TSRVToolBar.ButtonWidth

Sets the width of tool buttons (TSRVToolButton), in pixels.

property ButtonWidth: Integer;

Default value:

26

See also:

· ButtonHeight


TSRVToolBar.Color

Specifies the toolbar background color.

property Color: TColor;

This color is used for background of:

· the border around the toolbar (see BorderWidth)
· area between the buttons (see Spacer)
· hint area (see HintHeight)
· tool buttons (if the button is in a normal state, i.e. not highlighted, pressed or disabled).

Default value:

clWindow

See also:

· ColorDisable
· ColorDown
· ColorSelect


TSRVToolBar.ColorDisable

Background color of disabled tool buttons.

property ColorDisable: TColor;

This color is used for buttons having Enabled=False.

Default value:

clSilver

See also:

· Color
· ColorDown
· ColorSelect


TSRVToolBar.ColorDown

Background color of pressed tool buttons.

property ColorDown: TColor;

Default value:

$00EED2C1

See also:

· Color
· ColorDisable
· ColorSelect


TSRVToolBar.ColorSelect

Background color of highlighted tool buttons (buttons under the mouse pointer).

property ColorSelect: TColor;

Default value:

$00E2B598

See also:

· Color
· ColorDisable
· ColorDown


TSRVToolBar.HintCancel

Specifies the text to display in the hint area when none of the buttons is highlighted.

property HintCancel: String;

When this text is displayed, clicking on the hint area closes the tool window (and OnClickButton occurs with nil parameter).

Default value:

'Cancel'


TSRVToolBar.HintFont

Specifies the font for the hint area.

type
TSRVTBFont = class(TFont);

property HintFont: TSRVTBFont;

This font is used for captions of tool buttons and HintCancel.

Default value:

default properties of TFont

See also:

· HintHeight


TSRVToolBar.HintHeight

Specifies the height of the hint area.

property HintHeight: Integer;

See also:

· AlignText
· HintFont


TSRVToolBar.ImageList

A reference to image list for images in tool buttons.

property ImageList: TImageList;

This image list must contain buttons glyphs for all buttons states (normal, pressed, disabled).


TSRVToolBar.Indent

Changes the position of buttons in the toolbar window.

property Indent: Integer;

If AlignButton=srvabLeft, buttons are shifted by Indent to the right.

If AlignButton=srvabRight, buttons are shifted by Indent to the left.

If AlignButton=srvabCenter, buttons are shifted by Indent/2 to the left.

Default value:

0


TSRVToolBar.PenFrame

Specifies a pen for drawing lines in the tool bar.

property PenFrame: TPen;

This pen is used for drawing border around the toolbar. The width of this border is defined as a pen's width, not in BorderWidth.

Default value:

Style=psSolid, Width=1, Color=$00C56A31;


TSRVToolBar.Spacer

Specifies the distance between tool buttons.

property Spacer: Integer;

Default value:

0


TSRVToolBar.OnClickButton

Occurs when user clicks inside the toolbar.

property OnClickButton: TSRVClickButtonEvent;

ToolButton – the clicked button (one of Buttons), or nil, if the user clicked outside any button (for example, in a hint area).


TSRVToolBar.OnEnter

Occurs when user moves the mouse pointer into the toolbar area.

property OnEnter: TNotifyEvent;

See also:

· OnLeave


TSRVToolBar.OnEnterButton

Occurs when user moves the mouse pointer into the button area.

property OnEnterButton: TSRVClickButtonEvent;

ToolButton – the button below the mouse pointer, one of Buttons.


TSRVToolBar.OnLeave

Occurs when user moves the mouse pointer out of the toolbar area.

property OnLeave: TNotifyEvent;

See also:

· OnEnter


TSRVToolWindow

srvtoolwindow TSRVToolWindow

Properties Methods Events | Overview

 Top Previous Next

TSRVToolWindow shows a toolbar inside a popup window.

Unit SRVToolWindow.

Syntax

TSRVToolWindow = class(TComponent)

Hierarchy

TObject

TPersistent

TComponent

Description

TSRVToolWindow shows a toolbar inside a popup window, when you call Execute method. The window is closed without any action when it loses focus or when user clicks outside any button on the toolbar

TSRVToolWindow uses TSRVToolbar inside.

Usually TSRVToolWindow is used as a submenu for buttons in TSRichViewEdit's MenuVertical.

Properties

This class contains almost the same set of properties as TSRVCustomPropertyTB class and TSRVToolBar component.

A toolbar consists of buttons and a hint area.

The hint area can be placed at the top or at the bottom of the toolbar, depending on AlignText property. A height of this area is defined in HintHeight property. This area can work as a "Cancel" button. When none of buttons is highlighted, it displays HintCancel. Otherwise, it displays Caption of tool button. A font for text displayed in this area is specified in HintFont.

Buttons are defined in Buttons collection. Buttons are arranged in rows and columns, the number of columns is specified in ButtonsCol. A size of buttons is defined in ButtonWidth and ButtonHeight properties. A spacing between buttons is specified in Spacer.

The toolbar can have a border, its width is specified in BorderWidth.

The toolbar color is Color. Colors of disabled, pressed and highlighted buttons are specified in ColorDisable, ColorDown, and ColorSelect properties. A pen of frame around the toolbar is defined in PenFrame.


TSRVToolWindow.AlignText

Defines the position of text with the captions of the highlighted button (button below the mouse pointer)

property AlignText: TSRVAlignText;

When none of the buttons are highlighted, HintCancel is displayed in this area.

Default value:

srvatBottom


TSRVToolWindow.BorderWidth

Specifies a width of the toolbar border (spacing around the toolbar)

property BorderWidth : Integer;

A border (see PenFrame) is drawn in this area. The rest of space (if BorderWidth>the pen's width) is painted with Color.

Default value:

1

See also:

· Spacer
· HintHeight


TSRVToolWindow.ButtonCol

Specifies the maximal number of columns.

property ButtonCol: Integer;

ButtonCol specifies the number of buttons what may be placed in a line.

Default value:

-1 (unlimited)


TSRVToolWindow.ButtonHeight

Sets the height of tool buttons (TSRVToolButton), in pixels.

property ButtonHeight: Integer;

Default value:

26

See also:

· ButtonWidth


TSRVToolWindow.Buttons

Collection of tool buttons (TSRVToolButton).

property Buttons: TSRVButtonCollection;


TSRVToolWindow.ButtonWidth

Sets the width of tool buttons (TSRVToolButton), in pixels.

property ButtonWidth: Integer;

Default value:

26

See also:

· ButtonHeight


TSRVToolWindow.Color

Specifies the toolbar background color.

property Color: TColor;

This color is used for background of:

· the border around the toolbar (see BorderWidth)
· area between the buttons (see Spacer)
· hint area (see HintHeight)
· tool buttons (if the button is in a normal state, i.e. not highlighted, pressed or disabled).

Default value:

clWindow

See also:

· ColorDisable
· ColorDown
· ColorSelect


TSRVToolWindow.ColorDisable

Background color of disabled tool buttons.

property ColorDisable: TColor;

This color is used for buttons having Enabled=False.

Default value:

clSilver

See also:

· Color
· ColorDown
· ColorSelect


TSRVToolWindow.ColorDown

Background color of pressed tool buttons.

property ColorDown: TColor;

Default value:

$00EED2C1

See also:

· Color
· ColorDisable
· ColorSelect


TSRVToolWindow.ColorSelect

Background color of highlighted tool buttons (buttons under the mouse pointer).

property ColorSelect: TColor;

Default value:

$00E2B598

See also:

· Color
· ColorDisable
· ColorDown


TSRVToolWindow.HintCancel

Specifies the text to display in the hint area when none of the buttons is highlighted.

property HintCancel: String;

When this text is displayed, clicking on the hint area closes the tool window (and OnClickButton occurs with nil parameter).

Default value:

'Cancel'


TSRVToolWindow.HintFont

Specifies the font for the hint area.

type
TSRVTBFont = class(TFont);

property HintFont: TSRVTBFont;

This font is used for captions of tool buttons and HintCancel.

Default value:

default properties of TFont

See also:

· HintHeight


TSRVToolWindow.HintHeight

Specifies the height of the hint area.

property HintHeight: Integer;

See also:

· AlignText
· HintFont


TSRVToolWindow.ImageList

A reference to image list for images in tool buttons.

property ImageList: TImageList;

This image list must contain buttons glyphs for all buttons states (normal, pressed, disabled).


TSRVToolWindow.PenFrame

Specifies a pen for drawing lines in the tool bar.

property PenFrame: TPen;

This pen is used for drawing border around the toolbar. The width of this border is defined as a pen's width, not in BorderWidth.

Default value:

Style=psSolid, Width=1, Color=$00C56A31;


TSRVToolWindow.Spacer

Specifies the distance between tool buttons.

property Spacer: Integer;

Default value:

0


TSRVToolWindow.Execute

The methods show a window with a toolbar.

procedure Execute(X, Y : Integer); overload;

procedure Execute(R : TRect); overload;

The window remains open until it loses focus or one of buttons is clicked.

X,Y – screen coordinates of the top left corner of the window. The window will be shown exactly at these coordinates.

R – screen coordinates specifying a rectangle of the button which called this window. The window will be positioned close to this button without overlapping it, and without going beyond the screen. This method sets AlignText property depending on the window position.


TSRVToolWindow.OnClickButton

Occurs when user clicks inside the toolbar.

property OnClickButton: TSRVClickButtonEvent;

ToolButton – the clicked button (one of Buttons), or nil, if the user clicked outside any button (for example, in a hint area).


TSRVToolWindow.OnEnter

Occurs when user moves the mouse pointer into the toolbar area.

property OnEnter: TNotifyEvent;

See also:

· OnLeave


TSRVToolWindow.OnEnterButton

Occurs when user moves the mouse pointer into the button area.

property OnEnterButton: TSRVClickButtonEvent;

ToolButton – the button below the mouse pointer, one of Buttons.


TSRVToolWindow.OnLeave

Occurs when user moves the mouse pointer out of the toolbar area.

property OnLeave: TNotifyEvent;

See also:

· OnEnter


TSRVToolWindow.OnSelectEvent

Occurs when user clicked a tool button or closed the window.

property OnSelectEvent: TSRVClickButtonEvent;

The window is closed (and the action is canceled) when the user clicks on the window outside any button, or when it loses the input focus.


TSRVPrint

srvprint TSRVPrint

Properties Methods Events | Overview

 Top Previous Next

TSRVPrint allows printing documents from TSRichViewEdit in several modes, including posters.

Unit SRVPrint.

Syntax

TSRVPrint = class(TComponent)

Hierarchy

TObject

TPersistent

TComponent

Description

The main property of TRVPrint is PrintMode. It defines how the document in SRichViewEdit is printed.

· srvpAuto – the printer paper size and orientation are set automatically;
· srvpStretchToFit – the current printer paper size and orientation are used;
· srvpStretchIfLarger is like srvpStretchToFit if the document page size is larger than the printer paper size. Otherwise, the document is printed at the top left corner of paper.
· srvpTiles – if possible, prints several copies of the document page on the same paper sheet;
· srvpPoster – allows printing posters: each page can be printed on several paper sheets; this is the most complex mode, it is described below.
· srvpGrid – allows printing several document pages on the same paper sheet.

The component uses the current printer (specified in Printer.PrinterIndex, where Printer is a function defined in the Printers unit). When the parameters of the current printer are changed, or the current printer is changed, call Update to recalculate properties according to the printer.

Posters

Sizes

A document is prepared in TSRichViewEdit component . Its size is defined in TSRichViewEdit's page properties.

Each page of this document is scaled to RealWidth x RealHeight (see below how they are calculated).

Each page of this document is printed as a poster. The poster consists of frames. Frame is one paper sheet, it has size of the printer's paper (FrameWidthPix x FrameHeightPix, orientation Orientation).

The poster consists of Ceil(FrameCountX) x Ceil(FrameCountY) frames (so, each page of the original document will be printed on Ceil(FrameCountX)*Ceil(

FrameCountY) printer pages).

The poster size in pixels is PageWidthPix x PageHeightPix (i.e. Ceil(FrameCountX)*FrameWidthPix x Ceil(FrameCountY)*FrameHeightPix).

FrameCountX and FrameCountY can be fractional values (if IntegerCount = False), it affects calculation of RealWidth and RealHeight (see below).

Sizes in posters

Sizes in posters

How the document page is scaled

As it was said above, each page of the original document is scaled to RealWidth x RealHeight.

If ScaleImage = True, pages are scaled to the full poster size (RealWidth = PageWidthPix , RealHeight = PageHeightPix), without keeping the original proportions.

If ScaleImage = False, pages are scaled proportionally to the maximal size that fits in TotalFrameWPix x TotalFrameHPix (so RealWidth<=TotalFrameWPix, RealHeight<=TotalFrameHPix).

TotalFrameWPix and TotalFrameHPix are similar to PageWidthPix and PageHeightPix, but calculated without rounding, i.e. they are equal to FrameCountX*FrameWidthPix x FrameCountY*FrameHeightPix.

If ScaleImage = False, the document page can be printed in the top left corner or in the center of the poster, depending on the Center property.

See also: UsePhysicalOffsets.

Printing and previewing

The main printing methods are Print and PrintPages. See also PrintFrame, PrintFrames, PrintFramesEx.

A print preview is displayed by TSRVPreview component.

You can provide a visual indication of printing progress using OnSendingToPrinter event.


TSRVPrint.AutoUpdate

Enables an autoupdate mode.

property AutoUpdate: Boolean;

If True, TSRVPrint recalculates its parameters when the content of SRichViewEdit is changed. Recalculation occurs on OnChange and OnPageCountChanged events.

If the document was changed when AutoUpdate=False, call Update.

Default value:

False


TSRVPrint.Center

In the poster mode: the property places the document image in the center relative to the poster.

In the grid mode: the property places the document pages in the center of the paper sheet.

property Center: Boolean;

A posters is printed if PrintMode = srvpPoster. For posters, this property makes sense only if ScaleImage = False.

A grid is printed if PrintMode = srvpGrid.

Default value:

True


TSRVPrint.ClipMargins

Restricts the output area.

property ClipMargins: Boolean;

If this property is True, printing on margins is not allowed (clipped).

Default value:

True


TSRVPrint.FrameCountX

Count of frames in a poster, horizontally.

property FrameCountX: Extended;

Posters are printed if PrintMode = srvpPoster.

Assigning to this property changes the poster width (PageWidthPix) and may change RealWidth and RealHeight.

Assigning to this property resets PageFormat to srvfmCustom and IntegerCount to False (value may be fractional).

Frame Count


TSRVPrint.FrameCountY

Count of frames in a poster, vertically.

property FrameCountY: Extended;

Posters are printed if PrintMode = srvpPoster.

Assigning to this property changes the poster height (PageHeightPix) and may change RealWidth and RealHeight.

Assigning to this property resets PageFormat to srvfmCustom and IntegerCount to False (value may be fractional).

Frame Count


TSRVPrint.FrameHeightPix

Returns the height of one frame of a poster, in pixels.

property FrameHeightPix: Integer;

Posters are printed if PrintMode = srvpPoster.

Each page of a poster is printed as several frames.

If the default printer is set, the printer paper height is used.

Default value:

1

See also:

· FrameWidthPix
· the picture in the topic about TSRVPrint


TSRVPrint.FrameWidthPix

Returns the height of one frame of a poster, in pixels.

property FrameWidthPix : Integer;

Posters are printed if PrintMode = srvpPoster.

Each page of a poster is printed as several frames.

If the default printer is set, the printer paper width is used.

Default value:

1

See also:

· FrameHeightPix
· the picture in the topic about TSRVPrint


TSRVPrint.IntegerCount

Specifies whether to round values of FrameCountX and FrameCountY up.

property IntegerCount: Boolean;

Posters are printed if PrintMode = srvpPoster.

This property allows to use integer numbers of frame counts for a poster.

IntegerCount Example

Default value:

False


TSRVPrint.OffXPix

Returns the horizontal shift of the document page on the poster, pixels.

property OffXPix: Extended;

Posters are printed if PrintMode = srvpPoster.

The shift is nonzero if

· the document page is not scaled to the full poster size (ScaleImage=False) and
· the page is printed at the center of the poster (Center =True) and
· the page width (RealWidth) is smaller than the poster width (PageWidthPix).
OffXPix and OffYPix

OffXPix and OffYPix


TSRVPrint.OffYPix

Returns the vertical shift of the document page on the poster, pixels.

property OffYPix: Extended;

Posters are printed if PrintMode = srvpPoster.

The shift is nonzero if

· the document page is not scaled to the full poster size (ScaleImage=False) and
· the page is printed at the center of the poster (Center =True) and
· the page height (RealHeight) is smaller than the poster height (PageHeightPix).
OffXPix and OffYPix

OffXPix and OffYPix


TSRVPrint.Orientation

Specifies the orientation of frames in a poster.

property Orientation: TPrinterOrientation;

Posters are printed if PrintMode = srvpPoster.

Default value:

poPortrait


TSRVPrint.PageColCount

Number of document pages on one paper sheet in horizontal direction, in srvpGrid mode.

property PageCount: Integer;

This property is used if PrintMode = srvpGrid.

In this mode, PageRowCount x PageColCount document pages are printed on a single paper sheet.

Default value:

1

See also:

Center


TSRVPrint.PageFormat

The poster's page format.

property PageFormat: TSRVPageFormat;

Posters are printed if PrintMode = srvpPoster.

The poster consists of frames, each frame has size of the printer paper.

This is the page format as of the whole poster, containing all frames.

Assigning to this property changes PageWidthPix and PageHeightPix. Values of FrameCountX and FrameCountY are recalculated to fit the given format (taking the printer's paper size into account). If IntegerCount=True, they are calculated as integer values. This calculation depends on UsePhysicalOffsets property.

When you assign value to FrameCountX, FrameCountY, PageWidthPix, or PageHeightPix, this property is reset to srvfmCustom.

Default value:

srvfmA4


TSRVPrint.PageHeightPix

The poster height, pixels

property PageHeightPix: Extended;

Posters are printed if PrintMode = srvpPoster.

A value of this property can be assigned or calculated. The formula PageHeightPix = Ceil(FrameCountY)*FrameHeightPix is used.

Assigning to this property resets PageFormat to srvfmCustom.

Assigning any value (except for srvfmCustom) to PageFormat changes a value of this property.

Assigning to FrameCountY changes value of this property.

See also:

· PageWidthPix
· the picture in the topic about TSRVPrint


TSRVPrint.PageRowCount

Number of document pages on one paper sheet in vertical direction, in srvpGrid mode.

property PageCount: Integer;

This property is used if PrintMode = srvpGrid.

In this mode, PageRowCount x PageColCount document pages are printed on a single paper sheet.

Default value:

1

See also:

Center


TSRVPrint.PageWidthPix

The poster height, pixels

property PageWidthPix: Extended;

Posters are printed if PrintMode = srvpPoster.

A value of this property can be assigned or calculated. The formula PageWidthPix = Ceil(FrameCountX)*FrameWidthPix is used.

Assigning to this property resets PageFormat to srvfmCustom.

Assigning any value (except for srvfmCustom) to PageFormat changes a value of this property.

Assigning to FrameCountX changes value of this property.

See also:

· PageHeightPix
· the picture in the topic about TSRVPrint


TSRVPrint.PrintMode

Specifies how the document from SRichViewEdit will be printed.

type

TSRVPrintMode = (srvpAuto, srvpStretchToFit, srvpStretchIfLarger, srvpTiles,

srvpPoster, srvpGrid);

property PrintMode: TSRVPrintMode;

Value | Meaning
srvpAuto | A printer paper size and orientation are set automatically; if the printer supports the page size specified for the document, it is used (orientation is set automatically too). If the printer does not support the document page size, this mode works like srvpStretchIfLarger mode.
srvpStretchToFit | The current printer paper size and orientation are used; on printing, the document is stretched proportionally to fit the page size and the orientation chosen for the printer.
srvpStretchIfLarger | This mode is like srvpStretchToFit if the document page size is larger than the printer paper size. Otherwise, the document is printed at the top left corner of paper sheet.
srvpTiles | The current printer paper size and orientation are used. If possible, prints several copies of the document page on the same paper sheet; for example, if the document page size is A6, and the printer page size is A4, it prints 4 copies (if orientations are the same). Otherwise, it works like srvpStretchIfLarger.
srvpPoster | Allows printing posters (one page on several paper sheets). It's recommended to assign UsePhysicalOffsets=False in this mode.
srvpGrid | The current printer paper size and orientation are used. PageRowCount x PageColCount document pages are printed on each paper sheet as a grid. These pages are scaled proportionally to fit; unlike srvpTiles mode, these pages are not copies of the same page.

Default value:

srvpPoster


TSRVPrint.RealHeight

Returns the height of the scaled page of the source document.

property RealHeight: Extended;

Posters are printed if PrintMode = srvpPoster.

If ScaleImage=True, each page of the source document is scaled to the full poster size without keeping proportions, so RealHeight=PageHeightPix.

If ScaleImage =False, each page is scaled proportionally to the maximal size that fits in TotalFrameWPix x TotalFrameHPix, so RealHeight<=TotalFrameHPix.

See also:

· RealWidth
· the picture in the topic about TSRVPrint


TSRVPrint.RealWidth

Returns the width of the scaled page of the source document.

property RealWidth: Extended;

Posters are printed if PrintMode = srvpPoster.

If ScaleImage=True, each page of the source document is scaled to the full poster size without keeping proportions, so RealWidth=PageWidthPix.

If ScaleImage =False, each page is scaled proportionally to the maximal size that fits in TotalFrameWPix x TotalFrameHPix, so RealWidth<=TotalFrameWPix.

See also:

· RealHeight
· the picture in the topic about TSRVPrint


TSRVPrint.ScaleImage

Specifies whether the source page image must be stretched to the full poster size.

property ScaleImage: Boolean;

Posters are printed if PrintMode = srvpPoster.

If ScaleImage = True, pages are scaled to the full poster size (RealWidth will be PageWidthPix , RealHeight will be PageHeightPix), without keeping the original proportions.

If ScaleImage = False, pages are scaled proportionally to the maximal size that fits in TotalFrameWPix x TotalFrameHPix (RealWidth will be <=TotalFrameWPix, RealHeight<=TotalFrameHPix).

ScaleImage Example

Default value:

False


TSRVPrint.SRichViewEdit

Specifies a link to the editor containing the document for printing.

property SRichViewEdit: TSRichViewEdit;

TSRVPrint component can print only if an editor is specified.


TSRVPrint.TotalFrameHPix

Returns FrameCountY * FrameHeightPix.

property TotalFrameHPix: Extended;

Posters are printed if PrintMode = srvpPoster.

If ScaleImage =False, pages of the source document are scaled proportionally to the maximal size that fits in TotalFrameWPix x TotalFrameHPix.


TSRVPrint.TotalFrameWPix

Returns FrameCountX * FrameWidthPix.

property TotalFrameWPix: Extended;

Posters are printed if PrintMode = srvpPoster.

If ScaleImage =False, pages of the source document are scaled proportionally to the maximal size that fits in TotalFrameWPix x TotalFrameHPix.


TSRVPrint.UsePhysicalOffsets

Specifies whether the component attempts to print on "physical margins".

property UsePhysicalOffsets: Boolean;

Physical margins are areas at the left, top, right and bottom sides of paper where the printer cannot print.

If True, TSRVPrint does not print on physical margins. It also affects how a number of frames for a poster is calculated. For example, you want to print A4 poster on A4 paper. If you set the current printer paper size to A4, and set PageFormat to srvfmA4, you may expect that the poster will be printed on 1 paper sheet. But you will find that a poster is printed on 2 x 2 paper sheets, because FrameCountX and FrameCountY are greater than 1. It happens because the poster size is a pure A4 size, and the printer's page size is A4 minus physical offsets, so the poster does not fit the paper. If you want to define a poster size more precisely, assign FrameCountX and FrameCountY properties directly, instead of changing PageFormat.

If False, TSRVPrint prints even on physical margins. In the example above (A4 poster on A4 paper), a poster will be printed on one paper sheet. But this value is highly not recommended for posters, because everything printed on these margins will be blank. This value is ok for non-poster printing (because usually document margins are larger than physical margins).

Default value:

True


TSRVPrint.BeginUpdate

Disables recalculation of parameters until EndUpdate is called.

procedure BeginUpdate;

Each call to BeginUpdate must be followed by the call to EndUpdate. Calls may be nested.

Between calls of BeginUpdate and EndUpdate, assignments to TSRVPrint's properties do not invoke recalculations of other properties, and OnUpdateData event is not called. For example, assignment to FrameCountX will not lead to recalculation of PageWidthPix.


TSRVPrint.CheckMargin

Compares margins with minimal possible values and returns adjusted values.

function CheckMargin(var NewLeft, NewTop, NewRight, NewBottom: Integer;

ALeft, ATop, ARight, ABottom: Integer) : Boolean;

This methods compares the margins specified in ALeft, ATop, ARight, ABottom parameters with minimal margins supported by the current printer.

The results are written to NewLeft, NewTop, NewRight, NewBottom parameters. If the corresponding margin is too small, a minimal supported value is returned. Otherwise, the value of the original parameter is returned.

All values are in pixels.

Any of the input parameters (ALeft, ATop, ARight, ABottom) can be equal to -1. Such parameters are ignored.

This method can be used in TSRichViewEdit.OnMarginsChanged event.


TSRVPrint.EndUpdate

Enables automatic recalculation of parameters that was disabled by BeginUpdate.

procedure EndUpdate;

Each call to BeginUpdate must be followed by call to EndUpdate. Calls may be nested.

If EndUpdate is called as many times as BeginUpdate, the last call performs all necessary recalculation of properties (by calling Update).


TSRVPrint.OptimalOrientation

Returns an optimal frame orientation.

function OptimalOrientation : TPrinterOrientation;

Returns which value of Orientation would be the best (less count of frames in a poster).

Posters are printed if PrintMode = srvpPoster.


TSRVPrint.PaperCodeToPageFormat

This method converts DMPAPER_*** values (defined in the Printers unit) to TSRVPageFormat values.

function PaperCodeToPageFormat(PaperSizeCode: Integer): TSRVPageFormat;

PaperSizeCode must be one of constants like DMPAPER_A2, DMPAPER_A3, DMPAPER_A4, etc.


TSRVPrint.Print

Prints the whole document.

procedure Print(Title: String; Copies: Integer; Collate: Boolean);

The method prints the document from SRichViewEdit according to PrintMode.

The properties SRichViewEdit.MinPrintedItemNo and MaxPrintedItemNo are taken into account.

Title – document title for the Print Manager.

Copies – count of copies to print.

Collate – if more than one copy is printed, defines whether to print them together or not (if Collate, pages are printed like 1, 2, 3, 1, 2, 3. If not Collate, pages are printed like 1, 1, 2, 2, 3, 3).

Print(Title, Copies, Collate) is equivalent to PrintPages(1, SRichViewEdit.PageCount, Title, Copies, Collate).

See also:

· OnSendingToPrinter


TSRVPrint.PrintFrame

Prints the specified frame of the specified page, in the current printing job.

function PrintFrame(PageNo, FrameIndex : Integer) : Boolean;

PageNo – index of the page (from 1).

FrameIndex – index of the frame to print, in range from 1 to Ceil(FrameCountX)*Ceil(FrameCountY).

This method does not start a new printing job.

Posters are printed if PrintMode = srvpPoster. In other modes, the method prints the specified page (and FrameIndex must be 1).

This method is rarely needed. The main printing methods are Print and PrintPages.

The method calls OnSendingToPrinter(SRichViewEdit, PageNo, FrameIndex, rvpsProceeding).

Return value:

True of the frame was printed. False if FrameIndex is not the the proper range.


TSRVPrint.PrintFrames

Prints one page.

procedure PrintFrames(Title: String; PageNo: Integer);

Title – document title for the Print Manager.

PageNo – index of the page (from 1).

This method starts a new printing job, calls PrintFramesEx, finishes the printing job.

This method is rarely needed. The main printing methods are Print and PrintPages.


TSRVPrint.PrintFramesEx

Prints one page in the current printing job.

procedure PrintFramesEx(PageNo: Integer);

PageNo – index of the page (from 1).

If PrintMode = srvpPoster, the method prints all frames of this page by calling PrintFrame. For other modes, it prints the specified page.

This method is rarely needed. The main printing methods are Print and PrintPages.


TSRVPrint.PrintPages

Prints the specified range of pages.

procedure PrintPages(firstPgNo, lastPgNo: Integer; Title: String;

Copies: Integer; Collate: Boolean);

The method prints the document from SRichViewEdit according to PrintMode.

The properties SRichViewEdit.MinPrintedItemNo and MaxPrintedItemNo are taken into account.

firstPgNo – index of the first page to print (from 1).

lastPgNo – index of the last page to print (from 1).

Title – document title for the Print Manager.

Copies – count of copies to print.

Collate – if more than one copy is printed, defines whether to print them together or not (if Collate, pages are printed like 1, 2, 3, 1, 2, 3. If not Collate, pages are printed like 1, 1, 2, 2, 3, 3).

See also:

· OnSendingToPrinter


TSRVPrint.Update

Performs calculations necessary for printing or previewing.

procedure Update;

Normally, all necessary calculations are performed automatically, when you modify properties of this component.

An explicit call is necessary in the following cases:

· the current printer or its properties were changed;
· a document in SRichViewEdit was changed (and AutoUpdate=False, or this change cannot be detected by TSRVPrint).

This method is called by EndUpdate, when it enables recalculations disabled by BeginUpdate.

This method calls OnUpdateData event.


TSRVPrint.OnSendingToPrinter

Occurs on printing.

type

TSRVPrintingEvent = procedure(Sender: TSRichViewEdit;

PageCompleted, FrameCompleted: Integer; Step:TRVPrintingStep) of object;

property OnSendingToPrinter: TSRVPrintingEvent;

This event is called by the printing methods.

The main printing methods are Print and PrintPages. Initially, they call this event with the following parameters: (SRichViewEdit, 0, 0, rvpsStarting). Then they call this event after printing each frame (non-poster modes assume one frame per page), with Step=rvpsProceeding. Finally, they call it with the parameters: (SRichViewEdit, 0, 0, rvpsFinished).

PageCompleted (index of page containing the completed frame, from 1) and FrameCompleted (index of the completed frame, from 1) are used if Step=rvpsProceeding.

See also:

· TSRichViewEdit.OnPrinting


TSRVPrint.OnUpdateData

Occurs when TSRVPrint's properties are recalculated according the the changes of other properties, changes in document in SRichViewEdit, or a call to Update.

property OnUpdateData: TNotifyEvent;


TSRVPreview

srvpreview TSRVPreview

Properties Methods Events | Overview

 Top Previous Next

TSRVPreview displays a print preview for TSRVPrint.

Unit SRVPreview.

Syntax

TSRVPreview = class(TCustomRVPrintPreview)

Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TCustomControl

TRVScroller

TCustomRVPrintPreview

Description

The source TSRVPrint component is specified in SRVPrint property. TSRVPreview displays a single page of the source document, specified in PageNo property. This page may consist of several frames (paper sheets), if a poster is printed.

When SRVPrint prints a poster, this component displays all frames (paper sheets) comprising this page. A border around all frames is shown using BorderColor and BorderWidth properties. Borders between frames are shown using FrameBorderColor and FrameBorderWidth. A position of the original page is shown using PageBorderColor, PageBorderWidth, PageBorderStyle properties.

When SRVPrint prints in another mode, this component displays a single paper sheet. A border around it is shown using BorderColor and BorderWidth properties. A position of the original page is shown using PageBorderColor, PageBorderWidth, PageBorderStyle properties (one sheet may contain several pages, if tiles are printed).

Paper sheets inside the main border (drawn using BorderColor and BorderWidth) drop a shadow with the parameters ShadowColor and ShadowWidth. The rest of the component's window is filled with Color.


TSRVPreview.BorderColor

Specifies the color of border around the paper.

property BorderColor: TColor;

When previewing posters, this is the color of border around all frames (all paper sheets).

When previewing in other modes, this is the color of border around the paper sheet.

The border's width is BorderWidth.

Default value:

clHighlight


TSRVPreview.BorderWidth

Specifies the width of border around the paper.

property BorderWidth: Integer;

When previewing posters, this is the width of border around all frames (all paper sheets).

When previewing in other modes, this is the width of border around the paper sheet.

The border's color is BorderColor.

Default value:

2


TSRVPreview.FrameBorderColor

Specifies the color of borders between poster frames.

property FrameBorderColor: TColor;

When previewing posters, this is a color of lines between the poster's frames (paper sheets).

Not used in other modes.

The width of these lines is FrameBorderWidth.

Default value:

clBtnShadow


TSRVPreview.FrameBorderWidth

Specifies the width of borders between poster frames.

property FrameBorderWidth: Integer;

When previewing posters, this is a width of lines between the poster's frames (paper sheets).

Not used in other modes.

The color of these lines is FrameBorderColor.

Default value:

1


TSRVPreview.PageBorderColor

Specifies the color of border around the page of the source document.

property PageBorderColor: TColor;

This border shows the location of the page of the source document on the paper sheet(s).

When previewing a poster, this page can occupy several frames (paper sheets).

The width of this border is PageBorderWidth, its style is PageBorderStyle.

Default value:

$00CD9165


TSRVPreview.PageBorderStyle

Specifies the style of border around the page of the source document.

property PageBorderStyle: TPenStyle;

This border shows the location of the page of the source document on the paper sheet(s).

When previewing a poster, this page can occupy several frames (paper sheets).

The width of this border is PageBorderWidth, its color is PageBorderColor.

Default value:

psDash


TSRVPreview.PageBorderWidth

Specifies the width of border around the page of the source document.

property PageBorderWidth: Integer;

This border shows the location of the page of the source document on the paper sheet(s).

When previewing a poster, this page can occupy several frames (paper sheets).

The style of this border is PageBorderStyle, its color is PageBorderColor.

Default value:

1


TSRVPreview.PageNo

Specifies the index of the page to display.

property PageNo: Integer;

This value must be in range 1..SRVPrint.SRichViewEdit.PageCount.

See also:

· First
· Prev
· Next
· Last


TSRVPreview.SRVPrint

Contains a link to a TSRVPrint component.

property SRVPrint: TSRVPrint;

This property provides a connection to TSRVPrint component.

TSRVPreview component can display a preview only if the this TSRVPrint component is ready.


TSRVPreview.First

Switches the current page (PageNo) to the first page.

procedure First;


TSRVPreview.Last

Switches the current page (PageNo) to the last page.

procedure Last;


TSRVPreview.Next

Switches the current page (PageNo) to the next page.

procedure Next;


TSRVPreview.Prev

Switches the current page (PageNo) to the previous page.

procedure Prev;


TSRVPreview.OnAfterPaint

Occurs when the component paints itself, after all the default painting.

property OnAfterPaint: TSRVPOnPaint;

This event allows drawing additional information in this component.

See also:

· OnBeforePaint


TSRVPreview.OnBeforePaint

Occurs when the component paints itself, before painting the content of pages.

property OnBeforePaint: TSRVPOnPaint;

This event allows drawing additional information in this component.

This event allows drawing only beyond the area specified in ARect parameter, because any drawing inside this area will be overridden. This event may be considered redundant, because OnAfterPaint allows drawing both inside and outside of this area.

Since a clipping region is ARect, you need to create a new clipping region to draw outside ARect.

Example:

procedure TForm1.SRVPreview1BeforePaint(Sender: TObject; ACanvas: TCanvas;

ARect: TRect);

var

HRgn: Cardinal;

begin

// creating a clipping region for drawing anywhere in SRVPreview1

HRgn := CreateRectRgn(0, 0, SRVPreview1.Width, SRVPreview1.Height);

SelectClipRgn(ACanvas.Handle, HRgn);

// <drawing here>

DeleteObject(HRgn);

// restoring the original region

HRgn := CreateRectRgn(ARect.Left, ARect.Top, ARect.Right, ARect.Bottom);

SelectClipRgn(ACanvas.Handle, HRgn);

DeleteObject(HRgn);

end;


TSRVSkinManager

srvskinmanager TSRVSkinManager

Properties | Overview

 Top Previous Next

TSRVSkinManager contains a collection of skins and allows applying them to visual components from the ScaleRichView package.

Unit SRVSkinManager.

Syntax

TSRVSkinManager = class(TComponent)

Hierarchy

TObject

TPersistent

TComponent

Description

This component can apply skins to:

· scrollbars of TSRichViewEdit and TDBSRichViewEdit;
· TSRVScrollBar;
· TSRVTabSet.

Properties

Skins is a collection of skins. SkinIndex allows choosing a skin from this collection. This skin is returned in the CurrentSkin property and applied to all controls linked to this skin manager.

Scheme

This scheme shows a skin manager component and its properties.

TSRVScrollBarSkinSchemeTSRVSkin.VerticalScrollBarSchemesTSRVSkin.HorizontalScrollBarSchemesTSRVSkin.BoxSchemesTSRVBoxSchemeTSRVSkinManager.SkinIndexTSRVSkinManager.SkinsTSRVSkinManagerTSRVTabSetSkinSchemeTSRVSkin.VerticalTabSetSchemesTSRVSkin.HorizontalTabSetSchemesTSRVSkin.ElementsTSRVSkinElementTSRVSkinFontTSRVSkin.Fonts

The main properties of each skin (i.e. of each item in Skins collection) are schemes:

· HorizontalScrollBarSchemes – scheme for horizontal scrollbars;
· VerticalScrollBarSchemes – scheme for vertical scrollbars;
· HorizontalTabSetSchemes – scheme for horizontal tab sets;
· VerticalTabSetSchemes – scheme for vertical tab sets;
· BoxSchemes – scheme for rectangular areas of different controls.

Each scheme contains references to Elements (collection of images) and Fonts (collection of fonts).


TSRVSkinManager.CurrentSkin

TSRVSkinManager.CurrentSkin (read-only)

 Top Previous Next

Returns the active skin.

property CurrentSkin: TSRVSkin;

If SkinIndex is in the range 0..Skins.Count-1, this property returns Skins[SkinIndex]. Otherwise, it returns nil.


TSRVSkinManager.SkinIndex

Specifies the active skin.

property SkinIndex: Integer;

Zero or positive value defines the index in Skins collection.

-1 means default (no-skin) mode.

Default value:

-1


TSRVSkinManager.Skins

A collection of skins.

property Skins: TSRVSkinCollection;

See also:

SkinIndex


TSRVSkin

Properties | Overview

TSRVSkin contains properties defining a visual appearance of skinnable controls.

This is a class of items in the collection TSRVSkinManager.Skins.

Unit SRVSkinManager.

Syntax

TSRVSkin = class(TCollectionItem)

Hierarchy

TObject

TPersistent

TCollectionItem.

Properties

Name is the skin name.

Elements is a collection of images, Fonts is a collection of fonts.

Other properties are collections of "schemes". A scheme defines which Elements and Fonts are used for different parts of skinnable objects:

· HorizontalScrollBarSchemes – for horizontal scrollbars;
· VerticalScrollBarSchemes – for vertical scrollbars;
· HorizontalTabSetSchemes – for horizontal tab sets;
· VerticalTabSetSchemes – for vertical tab sets;
· BoxSchemes – for rectangular areas of different controls.


TSRVSkin.BoxSchemes

Specifies which Elements are used to draw specific parts of rectangular areas of different controls.

property BoxSchemes: TSRVBoxSchemeCollection;

This is a collection of TSRVBoxScheme items. Each item has properties defining which Elements are used to draw specific parts of a rectangular area of a control.


TSRVSkin.Elements

A collection of images used in skinnable objects.

property Elements: TSRVSkinElementCollection;

See also

· TSRVSkinElement (class of items)


TSRVSkin.Fonts

A collection of fonts used in skinnable objects.

property Fonts: TSRVSkinFontCollection;

See also

· TSRVSkinFont (class of items)


TSRVSkin.HorizontalScrollBarSchemes

Specifies which Elements are used to draw specific parts of a horizontal scrollbar.

property HorizontalScrollBarSchemes: TSRVScrollBarSkinSchemeCollection;

This is a collection of TSRVScrollBarSkinScheme items. Each item has properties defining which Elements are used to draw specific parts of a horizontal scrollbar.

TSRVScrollBar has SkinSchemeIndex property specifying the index in this collection (used if TSRVScrollBar.Kind = sbHorizontal).

TSRichViewEdit has HScrollBarSchemeIndex property specifying the index in this collection for applying to horizontal scrollbar.


TSRVSkin.HorizontalTabSetSchemes

Specifies which Elements are used to draw specific parts of a horizontal tab set control.

property HorizontalTabSetSchemes: TSRVTabSetSkinSchemeCollection;

This is a collection of TSRVTabSetSkinScheme items. Each item has properties defining which Elements are used to draw specific parts of a horizontal tab set control.

TSRVTabSet has SkinSchemeIndex property specifying the index in this collection (used if TSRVTabSet.Kind = srvtskHorizontal).


TSRVSkin.Name

Specifies the skin name.

property Name: String;

This text is shown at design time when editing TSRVSkinManager.Skins collection.


TSRVSkin.VerticalScrollBarSchemes

Specifies which Elements are used to draw specific parts of a vertical scrollbar.

property VerticalScrollBarSchemes: TSRVScrollBarSkinSchemeCollection;

This is a collection of TSRVScrollBarSkinScheme items. Each item has properties defining which Elements are used to draw specific parts of a vertical scrollbar.

TSRVScrollBar has SkinSchemeIndex property specifying the index in this collection (used if TSRVScrollBar.Kind = sbVertical).

TSRichViewEdit has VScrollBarSchemeIndex property specifying the index in this collection for applying to vertical scrollbar.


TSRVSkin.VerticalTabSetSchemes

Specifies which Elements are used to draw specific parts of a vertical tab set control.

property VerticalTabSetSchemes: TSRVTabSetSkinSchemeCollection;

This is a collection of TSRVTabSetSkinScheme items. Each item has properties defining which Elements are used to draw specific parts of a vertical tab set control.

TSRVTabSet has SkinSchemeIndex property specifying the index in this collection (used if TSRVTabSet.Kind = srvtskVertical).


TSRVBoxScheme

TSRVBoxScheme is a class defining a visual appearance of rectangular areas of different controls.

This is a class of items in the following collection:

· TSRVSkinManager.Skins[i].BoxSchemes;

Unit SRVSkinManager.

Syntax

TSRVBoxScheme = class(TCollectionItem)

Hierarchy

TObject

TPersistent

TCollectionItem

Properties

Name: String – a name of this scheme. This text is displayed at design time when editing collections.

Other properties define indices in TSRVSkinManager.Skins[i].Elements collection. All these properties are Integers, their default value is -1.

Background:

· ImgBackgroundBegin – left side;
· ImgBackgroundEnd – right side;
· ImgBackgroundCenter – middle of background (stretched).

Border:

· ImgLeft, ImgRight, ImgTop, ImgBottom – left/right/top/bottom sides (stretched);
· ImgTopLeft, ImgTopRight, ImgBottomLeft, ImgBottomRight – corners.

Example

ScaleRichView © trichview.com


TSRVBoxSchemeCollection

TSRVBoxSchemeCollection is a class of a collection of skin schemes for rectangular elements of different controls.

This is a class of the following collections:

· TSRVSkinManager.Skins[i].BoxSchemes;

Unit SRVSkinManager.

Syntax

TSRVBoxSchemeCollection = class(TCollection)

Hierarchy

TObject

TPersistent

TCollection

Properties

· Items[Index: Integer]: TSRVBoxScheme;
· Count


TSRVSkinCollection

TSRVSkinCollection is a class of a collection of skins.

This is a class of the collection TSRVSkinManager.Skins.

Unit SRVSkinManager.

Syntax

TSRVSkinCollection = class(TCollection)

Hierarchy

TObject

TPersistent

TCollection

Properties

· Items[Index: Integer]: TSRVSkin;
· Count


TSRVSkinFont

TSRVSkinFont is a class defining properties for fonts used in skinnable objects.

This is a class of items in the collection TSRVSkinManager.Skins[i].Fonts.

Unit SRVSkinManager.

Syntax

TSRVSkinFont = class(TCollectionItem)

Hierarchy

TObject

TPersistent

TCollectionItem

Properties

· Name: String – a caption of this item. This text is displayed at design time when editing TSRVSkinManager.Skins[i]. Fonts collection.
· Disabled: TSRVSFont – a font used when the object is disabled (where TSRVSFont = class(TFont)).
· Normal: TSRVSFont – a font used when the object is in a normal state.
· Hot: TSRVSFont – a font used when the object is below the mouse pointer.
· Down: TSRVSFont – a font used when the object is clicked.
· Focused: TSRVSFont – a font used when the object is in a focused state.

Example

ScaleRichView © trichview.com


TSRVSkinFontCollection

TSRVSkinFontCollection is a class of a collection of font items for applying to skinnable objects.

This is a class of the collection TSRVSkinManager.Skins[i].Fonts.

Unit SRVSkinManager.

Syntax

TSRVSkinFontCollection = class(TCollection)

Hierarchy

TObject

TPersistent

TCollection

Properties

· Items[Index: Integer]: TSRVSkinFont;
· Count


TSRVSkinElement

TSRVSkinElement is a class defining properties for skinnable objects. Font properties are defined separately in TSRVSkinFont.

This is a class of items in the collection TSRVSkinManager.Skins[i].Elements.

Unit SRVSkinManager.

Syntax

TSRVSkinElement = class(TCollectionItem)

Hierarchy

TObject

TPersistent

TCollectionItem

Properties

· Name: String – a caption of this item. This text is displayed at design time when editing TSRVSkinManager.Skins[i]. Elements collection.
· Color: TColor – a background color (usually used when images are not defined). Default value: clWhite.
· TranparentColor – color of images that will be transparent when images are drawn. Used for Disabled, Normal, Hot, Down, Focused pictures, if they contain TBitmap. Default value: clNone (no bitmap transparency).
· Disabled: TPicture – a picture used when the object is disabled.
· Normal: TPicture – a picture used when the object is in a normal state.
· Hot: TPicture – a picture used when the object is below the mouse pointer.
· Down: TPicture – a picture used when the object is clicked.
· Focused: TPicture – a picture used when the object is in a focused state.

Example

ScaleRichView © trichview.com


TSRVSkinElementCollection

TSRVSkinElementCollection is a class of a collection of image items for applying to skinnable objects.

This is a class of the collection TSRVSkinManager.Skins[i].Elements.

Unit SRVSkinManager.

Syntax

TSRVSkinElementCollection = class(TCollection)

Hierarchy

TObject

TPersistent

TCollection

Properties

· Items[Index: Integer]: TSRVSkinElement;
· Count


TSRVScrollBarSkinScheme

TSRVScrollBarSkinScheme is a class defining a visual appearance of scrollbars.

This is a class of items in the following collections:

· TSRVSkinManager.Skins[i].HorizontalScrollBarSchemes;
· TSRVSkinManager.Skins[i].VerticalScrollBarSchemes.

Unit SRVSkinManager.

Syntax

TSRVScrollBarSkinScheme = class(TCollectionItem)

Hierarchy

TObject

TPersistent

TCollectionItem

Properties

Name: String – a name of this scheme. This text is displayed at design time when editing collections.

Other properties define indices in TSRVSkinManager.Skins[i].Elements collection. All these properties are Integers, their default value is -1.

Buttons:

· ImgDecButton for the left/top scrollbar button;
· ImgIncButton for the right/bottom scrollbar button.

Thumbnail:

· ImgThumbBegin for the left/top side of thumbnail;
· ImgThumbEnd for the right/bottom side of thumbnail;
· ImgThumbBackground for the thumbnail background;
· ImgThumbCenter for drawing in the middle of thumbnail, above the ImgThumbBackground.

Border (the border is drawn above all other parts):

· ImgBorderBegin for the left/top side of the scrollbar border;
· ImgBorderEnd for the right/bottom side of the scrollbar border;
· ImgBorderBackground for the middle part of the scrollbar border (since the border is drawn after all other content, this image must have a transparent area in the middle).

Background:

· ImgBackground for the area between the buttons and the thumbnail.

Example

ScaleRichView © trichview.com


TSRVScrollBarSkinSchemeCollection

TSRVScrollBarSkinSchemeCollection is a class of a collection of skin schemes for scrollbars.

This is a class of the following collections:

· TSRVSkinManager.Skins[i].HorizontalScrollBarSchemes;
· TSRVSkinManager.Skins[i].VerticalScrollBarSchemes.

Unit SRVSkinManager.

Syntax

TSRVScrollBarSkinSchemeCollection = class(TCollection)

Hierarchy

TObject

TPersistent

TCollection

Properties

· Items[Index: Integer]: TSRVScrollBarSkinScheme;
· Count


TSRVTabSetSkinScheme

TSRVTabSetSkinScheme is a class defining a visual appearance of tab sets.

This is a class of items in the following collections:

· TSRVSkinManager.Skins[i].HorizontalTabSetSchemes;
· TSRVSkinManager.Skins[i].VerticalTabSetSchemes.

Unit SRVSkinManager.

Syntax

TSRVTabSetSkinScheme = class(TCollectionItem)

Hierarchy

TObject

TPersistent

TCollectionItem

Properties

Name: String – a name of this scheme. This text is displayed at design time when editing collections.

FntTab: Integer specifies the index in the TSRVSkinManager.Skins[i].Fonts collection. It defines the font for text in the tab. If you use a vertical tab, this font must be a TrueType/OpenType. The default value is -1.

Other properties define indices in TSRVSkinManager.Skins[i].Elements collection. All these properties are Integers, their default value is -1.

Buttons on the tab set:

· ImgDecButton for the button to scroll to the beginning;
· ImgIncButton for the button to scroll to the end;
· ImgAddTabButton for the button for adding a new tab.

Tab:

· ImgTabBegin for the left/top side of tab;
· ImgTabEnd for the right/bottom side of tab;
· ImgTabBackground for the tab background;
· ImgCloseButton for a button for closing the tab.

Border (the border is drawn above all other parts):

· ImgBorderBegin for the left/top side of the control border;
· ImgBorderEnd for the right/bottom side of the control border;
· ImgBorderBackground for the middle part of the control border (since the border is drawn after all other content, this image must have a transparent area in the middle).

Background:

· ImgBackgroundBegin for the left/top side of the control background;
· ImgBackgroundEnd for the right/bottom side of the control background;
· ImgBackgroundCenter for the middle part of the control background.

Example

ScaleRichView © trichview.com


TSRVTabSetSkinSchemeCollection

TSRVTabSetSkinSchemeCollection is a class of a collection of skin schemes for tab set controls.

This is a class of the following collections:

· TSRVSkinManager.Skins[i].HorizontalTabSetSchemes;
· TSRVSkinManager.Skins[i].VerticalTabSetSchemes.

Unit SRVSkinManager.

Syntax

TSRVTabSetSkinSchemeCollection = class(TCollection)

Hierarchy

TObject

TPersistent

TCollection

Properties

· Items[Index: Integer]: TSRVTabSetSkinScheme;
· Count


TSRVScrollBar

srvscrollbar TSRVScrollBar

Properties Events | Overview

 Top Previous Next

TSRVScrollBar is a scrollbar, which is used to scroll the contents of a window, form, or control.

Unit SRVSBar.

Syntax

TSRVScrollBar = class(TScrollBar)

Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TScrollBar

Description

This is a skinnable version of TScrollBar. These scrollbars are used in TSRichViewEdit.

Visual appearance

In a no-skin mode (if a skin is not applied, and UseXPThemes=False or Window theme is not available) you can:

· assign Color property to set a background color;
· assign Flat property to make the scrollbar flat.

TSRVScrollBar is a skinnable component. Skins are used when SkinManager and SkinSchemeIndex properties are assigned. You can draw various parts of the control yourself using custom drawing events.

If this control is not inserted in TSRichViewEdit control, we recommend to assign True to its DoubleBuffered property to prevent flickering.


TSRVScrollBar.DecButtonWidth

Specifies width of the button for scrolling to the beginning.

property DecButtonWidth: Integer;

If value of this property is 0, a system default value is used.

This value is used only in a skin mode.

Default value

0


TSRVScrollBar.Flat

Makes the scrollbar "flat".

property Flat: Boolean;

If True, the scrollbar looks flat and does not has a frame around it.

This flat appearance is used if Windows themes are not active (see UseXPThemes), and a skin is not applied (see SkinManager, SkinSchemeIndex)

Default value

False


TSRVScrollBar.FocusBlinkDelay

Specifies the delay for blinking when the scroll bar is focused.

property FocusBlinkDelay: Integer;

This property is used only in a skin mode, when a focused image is defined for the thumb tab.

Default value

500


TSRVScrollBar.IncButtonWidth

Specifies width of the button for scrolling to the end.

property IncButtonHeight: Integer;

If value of this property is 0, a system default value is used.

This value is used only in a skin mode.

Default value

0


TSRVScrollBar.PageSize

Specifies the size of the thumb tab.

property PageSize: Integer;

PageSize is the size of the thumb tab, measured in the same units as Position, Min, and Max (not pixels).

0 means the default size.

Default value

0


TSRVScrollBar.Position

Indicates the current position of the scroll bar.

property Position: Integer;

This value is in range Min..Max-PageSize.

Default value

0


TSRVScrollBar.ScrollingDelay

Defines a scrolling speed.

property ScrollingDelay: Integer;

This is an interval between scrolling events, ms. Successive scrolling events occur, for example, when the user presses a scrolling button.

Default value

20


TSRVScrollBar.SkinManager

Determines which skin manager is associated with the scrollbar.

property SkinManager: TSRVSkinManager;

SkinManager defines a visual appearance of this control. If it is not specified, the control has a default (no-skin) view.

See also:

· SkinSchemeIndex


TSRVScrollBar.SkinSchemeIndex

Determines which skin scheme is used for this scrollbar.

property SkinSchemeIndex: Integer;

If Kind=sbHorizontal, this is an index in SkinManager.CurrentSkin.HorizontalScrollBarSchemes collection.

If Kind=sbVertical, this is an index in SkinManager.CurrentSkin.VerticalScrollBarSchemes collection.

If SkinManager = nil, or SkinManager.CurrentSkin = nil, or this index is not valid for this collection (negative or too large), then this scrollbar has a default (no-skin) appearance.

Default value

0


TSRVScrollBar.UseXPThemes

Specifies whether the scrollbar uses Windows XP/Vista/7 themes (visual styles), if they are available.

property UseXPThemes: Boolean;

Windows themes are used by the scrollbar if it is not skinned (SkinManager = nil, or SkinManager.CurrentSkin = nil, SkinSchemeIndex is not valid.

Default value

True


TSRVScrollBar_OnDraw...

TSRVScrollBar.OnDrawArea, OnDrawBorder, OnDrawDecButton, OnDrawIncButton, OnDrawThumbTab

 Top Previous Next

Events for custom drawing of the scrollbar.

property OnDrawBorder: TSRVDrawScrollBarEvent;

property OnDrawDecButton: TSRVDrawScrollBarEvent;

property OnDrawIncButton: TSRVDrawScrollBarEvent;

property OnDrawThumbTab: TSRVDrawScrollBarEvent;

property OnDrawArea: TSRVDrawScrollBarAreaEvent;

Use OnDrawArea to draw the scrollbar background (areas between the "inc/dec buttons" and the thumb tab).

Use OnDrawBackground to draw the control background. This event is called before all other custom drawing events.

Use OnDrawThumbTab to draw the thumb tab.

Use OnDrawDecButton to draw the button for scrolling to the beginning, and OnDrawIncButton to draw the button for scrolling to the end.


TSRVTabSet

srvtabset TSRVTabSet

Properties Methods Events | Overview

 Top Previous Next

The TSRVTabSet component presents horizontal or vertical tabs users can click to initiate actions.

Unit SRVTabSet.

Syntax

TSRVTabSet = class(TCustomControl);

Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TCustomControl

Description

You create a set of tabs for the tab set control when you specify a list of items as the value of the Tabs property. One tab is created for each item.

To determine which tab is currently selected or to use code to select a tab, use the TabIndex property. To find out which tab is the first/last visible tab in the tab set control use the FirstTabIndex/LastTabIndex properties. To make the tab visible, use ScrollToTab.

The user can close tabs, if closing buttons are displayed. Properties of these buttons are specified in CloseButton property.

Tabs are displayed horizontally or vertically, depending on the value of Kind property. Tabs can have icons from ImageList.

The following properties affect the size of tabs: AutoWidth, MinTabSize, MaxTabSize, TabHeight.

The following properties affect the layout of each tab: Indent, Margins, MirrorText, TextAlignH, TextAlignV.

Visual appearance

TSRVTabSet is a skinnable component. Skins are used when SkinManager and SkinSchemeIndex properties are assigned. You can draw various parts of the control yourself using custom drawing events.

SkinManagerSkinSchemeIndex

MirrorTextTextAlignHScrollerPositionScrollButtonWidthSpacingsIndentTabHeightMinTabSizeMaxTabSizeAutoTabWidthAutoTabWidthImageList

Rearranging tabs

Tabs can be moved with the mouse, if CanMoveTabs is True. When moving, OnMoveTab event occurs.


TSRVTabSet.AutoTabWidth

Specifies how widths of tabs are calculated.

property AutoTabWidth: Boolean;

If True, all tabs have widths wide enough to show their content (icon and text).

If False, widths of all tabs are calculated as SRVTabSet.Width / SRVTabSet.Tabs.Count.

In the both modes, MinTabSize and MaxTabSize are taken into account.

Default value

True


TSRVTabSet.CanMoveTabs

Allows rearranging tabs with the mouse.

property CanMoveTabs: Boolean;

When moving tab, OnMoveTab event occurs (when two tabs are exchanged).


TSRVTabSet.CloseButton

Contains properties of tab closing buttons.

property CloseButton: TSRVCloseButton;


TSRVTabSet.FirstTabIndex

TSRVTabSet.FirstTabIndex (read-only)

 Top Previous Next

Returns the index of the first visible tab.

property FirstTabIndex: Integer;

See also:

LastTabIndex


TSRVTabSet.ImageList

Determines which image list is associated with the tab set control.

propertyImageList: TCustomImageList;

Use ImageList to provide a customized list of bitmaps that can be displayed close to a tab's text. Individual tabs specify the image from this list that should appear by setting their ImageIndex property.


TSRVTabSet.Indent

Adds spacing before text in each tab.

property Indent: Integer;

If the tab has an icon, this is a distance between the icon and the text.

If the tab does not have an icon, this is a distance from the tab's left Margin to text.

Default value:

5


TSRVTabSet.Kind

Specifies whether the tab set control is horizontal or vertical.

type

TSRVTabSetKind = (srvtskHorizontal, srvtskVertical);

property Kind: TSRVTabSetKind;

Default value:

srvtskHorizontal


TSRVTabSet.LastTabIndex

TSRVTabSet.LastTabIndex (read-only)

 Top Previous Next

Returns the index of the last visible tab.

property LastTabIndex: Integer;

See also:

FirstTabIndex


TSRVTabSet.Margins

Specifies margins for each tab.

property Margins: TSRVMargins;

The class TSRVMargins has Left, Right, Top, Bottom integer properties (0 by default).

See also:

· TabHeight
· Indent


TSRVTabSet.MaxTabSize

Specifies the maximal allowed tab width.

property MaxTabSize: Integer;

Default value:

200

See also:

· AutoTabWidth
· MinTabSize


TSRVTabSet.MinTabSize

Specifies the minimal allowed tab width.

property MinTabSize: Integer;

Default value:

0

See also:

· AutoTabWidth
· MaxTabSize


TSRVTabSet.MirrorText

Allows flipping text in all tabs (vertically for horizontal tab set control, horizontally otherwise)

property MirrorText: Boolean;

Default value:

False


TSRVTabSet.ScrollButtonWidth

Defines the width of scrolling buttons.

property ScrollButtonWidth: Integer;

Scrolling buttons appear when not all tabs can be shown without scrolling.

Default value:

15

See also:

· ScrollerPosition


TSRVTabSet.ScrollerMenu

This property is reserved for future use.

property ScrollerMenu: TPopupMenu;


TSRVTabSet.ScrollerPosition

Defines the position of scrolling buttons.

type

TSRVScrollerPosition = (srvpsBegin, srvpsEnd);

property ScrollerPosition: TSRVScrollerPosition;

Scrolling buttons appear when not all tabs can be shown without scrolling.

Depending on this property, they appear before or after tabs.


TSRVTabSet.ScrollingDelay

Defines the tab scrolling speed.

property ScrollingDelay: Integer;

This property sets a pause between redrawing on scrolling, in ms.

Default value:

100


TSRVTabSet.SkinManager

Determines which skin manager is associated with the tab set control.

property SkinManager: TSRVSkinManager;

SkinManager defines a visual appearance of this tab set control. If it is not specified, the control has a default (no-skin) view.

See also:

· SkinSchemeIndex


TSRVTabSet.SkinSchemeIndex

Determines which skin scheme is used for this tab set control.

property SkinSchemeIndex: Integer;

If Kind=srvtskHorizontal, this is an index in SkinManager.CurrentSkin.HorizontalTabSetSchemes collection.

If Kind=srvtskVertical, this is an index in SkinManager.CurrentSkin.VerticalTabSetSchemes collection.

If SkinManager = nil, or SkinManager.CurrentSkin = nil, or this index is not valid for this collection (negative or too large), then this tab set control has a default (no-skin) appearance.

Individual tabs can override this property with their own SkinSchemeIndex.

Default value

0


TSRVTabSet.Spacings

Specifies a distance between tabs.

property Spacings: Integer;

This value can be negative, if you want tabs to overlap.

Default value:

0


TSRVTabSet.TabHeight

Defines the height of tabs.

property TabHeight: Integer;

For horizontal tab set controls, this property defines the height of tabs. This property affects vertical position of text and icons for all tabs.

See also:

· Margins
· Indent
· TextAlignV


TSRVTabSet.TabIndex

Determines which tab of a tab set control is currently selected.

property TabIndex: Integer;

The value of TabIndex can be from -1 to one less than the number of Tabs. TabIndex is an index in the Tabs collection property: a value of 0 indicates the first tab in the tab set control, 1 is the second tab, and so on. If no tabs are selected, TabIndex has a value of -1.

When a value is assigned to TabIndex, OnChange event occurs, just as if the user had clicked on a tab.


TSRVTabSet.Tabs

Contains the list of tabs displayed in the tab set control.

property Tabs: TSRVTabCollection;

Properties of each tab is defined in TSRVTabItem class.


TSRVTabSet.TextAlignH

Defines a horizontal alignment of text and icon in each tab.

property TextAlignH: TSRVTHAlign;

If TextAlignH=srvthaRight, icons are displayed to the right of text.

Default value:

srvthaLeft

See also:

TextAlignV


TSRVTabSet.TextAlignV

Defines a vertical alignment of text and icon in each tab.

property TextAlignV: TSRVTVAlign;

Default value:

srvtvaCenter

See also:

TextAlignH

TabHeight


TSRVTabSet.ScrollToTab

Scrolls tabs in the control to make Tabs[TabIndex] visible.

procedure ScrollToTab(TabIndex : Integer);


TSRVTabSet.OnChange

Occurs after a new tab is selected.

property OnChange: TNotifyEvent;

This event occurs when value of TabIndex property is changed.


TSRVTabSet.OnCloseTab

Occurs when the user attempts to close a tab.

type

TSRVCloseTabEvent = procedure(Sender: TSRVTabSet; TabIndex: Integer;

var CanClose : Boolean) of object;

property OnCloseTab: TSRVCloseTabEvent;

Parameters

TabIndex – the index of the tab to close (in the Tabs collection).

Set CanClose to False to prevent closing.

When a tab is closed, its object is removed from Tabs and freed.


TSRVTabSet_OnDraw...

TSRVTabSet.OnDrawBackground, OnDrawBorder, OnDrawDecButton, OnDrawIncButton, OnDrawTab, OnDrawCloseButton

 Top Previous Next

Events for custom drawing of the tab set control.

property OnDrawBackground: TSRVDrawTabSetEvent;

property OnDrawBorder: TSRVDrawTabSetEvent;

property OnDrawDecButton: TSRVDrawTabSetEvent;

property OnDrawIncButton: TSRVDrawTabSetEvent;

property OnDrawTab: TSRVDrawTabEvent;

property OnDrawCloseButton: TSRVDrawTabEvent;

Drawing the tab set control

Use OnDrawBackground to draw the control background. This event is called before all other custom drawing events.

Use OnDrawBorder to draw the control border. This event is called after all other custom drawing events.

Use OnDrawDecButton to draw the button for scrolling tabs to the beginning, and OnDrawIncButton to draw the button for scrolling tabs to the end.

Drawing tabs

Use OnDrawTab to draw a tab, and OnDrawCloseButton to draw a tab closing button.


TSRVTabSet.OnMoveTab

Occurs when two tabs exchange their places as a result of tab moving.

type

TSRVTabMoveEvent = procedure(Sender: TSRVTabSet; NewTabIndex, OldTabIndex : Integer) of object;

property OnTabMove: TSRVTabMoveEvent;

NewTabIndex, OldTabIndex – indices of exchanged tabs (in the Tabs collection).

(this event can be interpreted as moving a tab from OldTabIndex to NewTabIndex position; but since this event occurs only for adjacent tabs, it is convenient to think about it as about exchanging places).

This event occurs only when tab rearranging is allowed, see CanMoveTabs property.

Example

Assuming that each tab corresponds to one item in Editors array. When moving tabs, we need to update this array:

procedure TForm3.SRVTabSet1TabMove(Sender: TSRVTabSet; NewTabIndex,

OldTabIndex: Integer);

var

tmp: TSRichViewEdit;

begin

tmp := Editors[OldTabIndex];

Editors[OldTabIndex] := Editors[NewTabIndex];

Editors[NewTabIndex] := tmp;

end;


TSRVCloseButton

Properties | Overview

TSRVCloseButton contains properties of closing buttons that can be displayed on all tabs of TSRVTabSet or TSRVImagesScroll.

Unit SRVTabSet.

Syntax

TSRVCloseButton = class(TPersistent)

Hierarchy

TObject

TPersistent

Properties

Closing buttons are shown if Visible=True. If the tab set control has only a single tab, a closing button is displayed only if AllowCloseLastTab=True.

Closing buttons can be shown either on all tabs, or only on a highlighted tab, or only on an active tab, depending on Visibility.

Positions of closing buttons are defined with the properties HorizontalAlign, VerticalAlign, IndentX, IndentY.

Size of closing buttons is defined with the properties Width and Height.


TSRVCloseButton.AllowCloseLastTab

Specifies whether a closing button is displayed on the last tab (of TSRVTabSet control) or on the last image (of TSRVImagesScroll control).

property AllowCloseLastTab: Boolean;

If True (and Visible is True too), a closing button is displayed even if the control contains a single tab / image.

Default value:

True


TSRVCloseButton.Height

Specifies the height of the closing button.

property Height: Boolean;

Default value:

10


TSRVCloseButton.HorizontalAlign

Specifies the horizontal position of the tab closing button.

property HorizontalAlign: TSRVTHAlign;

Default value:

srvthaRight


TSRVCloseButton.IndentX

Specifies the horizontal indent added to the button position, pixels.

property IndentX: Integer;

If HorizonalAlign=srvthaRight, the button is shifted to the left by this value. Otherwise, it is shifted to the right.

Default value:

3


TSRVCloseButton.IndentY

Specifies the vertical indent added to the button position, pixels.

property IndentY: Integer;

If VerticalAlign=srvthaBottom, the button is shifted to the top by this value. Otherwise, it is shifted to the bottom.

Default value:

3


TSRVCloseButton.VerticalAlign

Specifies the vertical position of the tab closing button.

property VerticalAlign: TSRVTVAlign;

Default value:

srvtvaTop


TSRVCloseButton.Visibility

Specifies when tab closing buttons are displayed.

type

TSRVTSCloseButtonVisibility = (srvcbvAlways, srvcbvHot, srvcbvActive);

property Visibility: TSRVTSCloseButtonVisibility;

Closing buttons are displayed only if Visible is True.

Visibility | Meaning
srvcbvAlways | Buttons are displayed on all tabs
srvcbvHot | A button is displayed only on the tab below the mouse pointer
srvcbvActive | A button is displayed only on the active tab (Tabs[TabIndex])

Default value:

srvcbvAlways


TSRVCloseButton.Visible

Specifies whether tabs have closing buttons.

property Visible: Boolean;

Default value:

True


TSRVCloseButton.Width

Specifies the width of the closing button.

property Width: Boolean;

Default value:

10


TSRVTabItem

Properties | Overview

TSRVTabItem is an individual tab in TSRVTabSet control.

This is a class of items in the collection TSRVTabSet.Tabs.

Unit SRVTabSet.

Syntax

TSRVTabItem = class(TCollectionItem)

Hierarchy

TObject

TPersistent

TCollectionItem.

Properties

The tab has Text and an optional icon, defined in ImageIndex.

Normally, in a skin mode, appearance of all tabs is defined in the tab set control. You can override these settings with SkinSchemeIndex and/or SkinFontIndex properties.

The tab can be hidden (Visible property) or disabled (Enabled property).


TSRVTabItem.Enabled

Controls whether the tab responds to mouse and keyboard events.

property Enabled: Boolean;

Default value:

True


TSRVTabItem.ImageIndex

Determines which image is displayed as the icon for the tab.

property ImageIndex: Integer;

Set ImageIndex to associate the tab with one of the images in the ImageList property of the tab set control.

Default value:

-1 (no image)


TSRVTabItem.SkinFontIndex

Specifies which font is used for this tab in the skin mode.

property SkinFontIndex: Integer;

In a no-skin mode, a tab's font is defined in the Font property of the tab set control.

In a skin mode, a tab's fonts are defined in TabSet.SkinManager.CurrentSkin.Fonts[FontIndex],

where FontIndex is a value of FntTab property of SkinManager.CurrentSkin.HorizontalTabSetSchemes/VerticalTabSetSchemes[SkinSchemeIndex],

where SkinSchemeIndex is SkinSchemeIndex property of the tab (if not negative) or TabSet.SkinSchemeIndex.

Default value:

-1


TSRVTabItem.SkinSchemeIndex

Determines which skin scheme is used for this tab.

property SkinSchemeIndex: Integer;

If value of this property is equal to -1, SkinSchemeIndex of the tab set control is used for this tab.

If TabSet.Kind=srvtskHorizontal, this is an index in TabSet.SkinManager.CurrentSkin.HorizontalTabSetSchemes collection.

If TabSet.Kind=srvtskVertical, this is an index in TabSet.SkinManager.CurrentSkin.VerticalTabSetSchemes collection.

If TabSet.SkinManager = nil, or TabSet.SkinManager.CurrentSkin = nil, or the index is not valid for this collection (negative or too large), then this tab has a default (no-skin) appearance.

Default value:

-1


TSRVTabItem.Tag

Stores an integer value as part of a tab.

property Tag: Integer;

Tag has no predefined meaning. The Tag property is provided for the convenience of developers. It can be used for storing an additional integer value or it can be typecast to any 32-bit value such as a component reference or a pointer.

Default value:

0


TSRVTabItem.Text

Specifies the text that appears in the tab.

property Text: String;

Default value:

'' (empty string)


TSRVTabItem.Visible

Allows hiding the tab without destroying it.

property Visible: Boolean;

Default value:

True


TSRVTabCollection

TSRVTabCollection maintains the collection of tabs that appear in TSRVTabSet control.

This is a class of TSRVTabSet.Tabs collection.

Unit SRVTabSet.

Syntax

TSRVTabCollection = class(TCollection)

Hierarchy

TObject

TPersistent

TCollection

Properties

· Items[Index: Integer]: TSRVTabItem;
· Count


TSRVDrawScrollBarAreaEvent

TSRVDrawScrollBarAreaEvent Type

A type of the following events of TSRVScrollBar:

· OnDrawArea

Unit SRVSBar.

type

TSRVDrawScrollBarAreaEvent = procedure(Sender: TSRVScrollBar;

Canvas: TCanvas; ARect, PaintRect: TRect; isFirstArea: Boolean;

State: TSRVDrawStates; var DoDefault : Boolean) of object;

Parameters

Canvas – a canvas where to draw.

ARect – a rectangle defining the position of the object to draw.

APaintRect – a rectangle that needs to be redrawn. You can use this parameter to optimize drawing.

isFirstArea – True if this event is called for the background area between the "dec button" and the thumb tab.

State – a set describing the current object state.

Set DoDefault to False to prevent the default drawing of this object.


TSRVDrawScrollBarEvent

TSRVDrawScrollBarEvent Type

A type of the following events of TSRVScrollBar:

· OnDrawBorder
· OnDrawDecButton
· OnDrawThumbTab

Unit SRVSBar.

type

TSRVDrawScrollBarEvent = procedure(Sender: TSRVScrollBar;

Canvas: TCanvas; ARect, PaintRect: TRect;

State: TSRVDrawStates; var DoDefault : Boolean) of object;

Parameters

Canvas – a canvas where to draw.

ARect – a rectangle defining the position of the object to draw.

APaintRect – a rectangle that needs to be redrawn. You can use this parameter to optimize drawing.

State – a set describing the current object state.

Set DoDefault to False to prevent the default drawing of this object.


TSRVDrawState, TSRVDrawStates

TSRVAlignText Type

Indicates state information that can influence how an object is drawn.

Unit SRVSkinManager.

type

TSRVDrawState = (srvdsHot, srvdsDown, srvdFocused, srvdsEnabled);

TSRVDrawStates = set of TSRVDrawState;

State | Meaning
srvdsHot | the object is below the mouse pointer
srvdsDown | the object is clicked
srvdFocused | the object is focused (or belongs to the focused control)
srvdsEnabled | the object is not disabled


TSRVDrawTabEvent

TSRVDrawTabEvent Type

A type of the following events of TSRVTabSet:

· OnDrawTab
· OnDrawCloseButton

Unit SRVPreview.

type

TSRVDrawTabEvent = procedure(Sender: TSRVTabSet; Canvas: TCanvas;

ARect, PaintRect: TRect; TabIndex: Integer; State: TSRVDrawStates;

var DoDefault: Boolean) of object;

Parameters

Canvas – a canvas where to draw.

ARect – a rectangle defining the position of the object to draw.

APaintRect – a rectangle that needs to be redrawn. You can use this parameter to optimize drawing.

TabIndex – the index of the tab (in Tabs) where this drawing should occur.

State – a set describing the current tab state.

Set DoDefault to False to prevent the default drawing of this tab.


TSRVDrawTabSetEvent

TSRVDrawTabSetEvent Type

A type of the following events of TSRVTabSet:

· OnDrawBorder
· OnDrawDecButton
· OnDrawIncButton
· OnDrawBackground

Unit SRVTabSet.

type

TSRVDrawTabSetEvent = procedure(Sender: TSRVTabSet; Canvas: TCanvas;

ARect, PaintRect: TRect; State: TSRVDrawStates; var DoDefault: Boolean) of object;

Parameters

Canvas – a canvas where to draw.

ARect – a rectangle defining the position of the object to draw.

APaintRect – a rectangle that needs to be redrawn. You can use this parameter to optimize drawing.

State – a set describing the current object state.

Set DoDefault to False to prevent the default drawing of this object.


TSRVPOnPaint

TSRVPOnPaint Type

A type of OnBeforePaint and OnAfterPaint events of TSRVPreview.

Unit SRVPreview.

type

TSRVPOnPaint = procedure(Sender: TObject; ACanvas: TCanvas;

ARect: TRect) of object;

ACanvas – canvas where to draw.

ARect – a location of page(s). This area includes TSRVPreview.BorderWidth, but does not include a shadow area (TSRVPreview.ShadowWidth).

When these events are called, a background color (beyond ARect) and a shadow is already drawn, and the clipping region is set to ARect.


TSRVButtonCollection

TSRVButtonCollection is a collection of TSRVToolButton.

Unit SRVToolBar.

Syntax

TSRVButtonCollection = class(TCollection)

Hierarchy

TObject

TPersistent

TCollection

Description

This is a type of TSRVToolBar.Buttons, TSRVToolWindow.Buttons, TSRichViewEdit.MenuHButtons, TSRichViewEdit.MenuVButtons properties.


TSRVToolButton

Properties

TSRVToolButton is a class containing properties of a toolbar button.

Unit SRVToolBar.

Syntax

TSRVToolButton = class(TCollectionItem)

Hierarchy

TObject

TPersistent

TCollectionItem

Description

This is a type of item in the TSRVToolBar.Buttons, TSRVToolWindow.Buttons, TSRichViewEdit.MenuHButtons, TSRichViewEdit.MenuVButtons collections properties.

Size and colors of buttons are defined in properties of their toolbars/tool windows.


TSRVToolButton.AllowAllUp

Specifies whether all buttons in the group that contains this button can be unselected at the same time.

property AllowAllUp: Boolean;

Use AllowAllUp with a group of buttons that belong to the same group. Buttons belong to the same group if they have the same value on their GroupIndex property. Buttons in the same group behave in a mutually exclusive fashion: when one button in the group is selected (Down=True), all other buttons in the group become unselected (Down=False).

If AllowAllUp is True, all of the buttons in a group can be unselected at the same time. Clicking the single selected button in the group will deselect that button without selecting another. If AllowAllUp is False, exactly one of the buttons in the group must be selected at any time. Clicking a down button won't return the button to its up state.

If GroupIndex is zero, AllowAllUp has no effect.


TSRVToolButton.Caption

Specifies the caption for the button.

property Caption: string;

If the toolbar has a hint area (above or below the buttons), buttons captions are shown there.


TSRVToolButton.Enabled

Controls whether the button responds to mouse and keyboard events.

property Enabled : Boolean;

Use Enabled to change the availability of the button to the user. To disable a button, set Enabled to False.

Default value:

False


TSRVToolButton.Down

Specifies whether this button is pressed.

property Down: Boolean;

If True, this button is pressed. Only buttons with GroupIndex<>0 can be permanently pressed.


TSRVToolButton.Hint

Contains the text string that can appear when the user moves the mouse over the control.

property Hint: String;

Use the Hint property to provide a string of help text either as a help hint, or as help text on a particular location such as a status bar. A help hint is displayed only if ShowHint=True.

If the toolbar has a hint area (below or above the buttons), the main property explaining the button for users is Caption.


TSRVToolButton.GroupIndex

Allows buttons to work together as a group.

property GroupIndex : Integer;

If GroupIndex is 0, the button works as a command button. When the user clicks such a button, the button appears pressed (in its clicked state) and then returns to its normal up state when the user releases the mouse button.

When GroupIndex is greater than 0, the button works like a checkbox or as a radio button, depending on AllowAllUp property. If AllowAllUp is True, the button works like a checkbox. If AllowAllUp=False, buttons with the same GroupIndex property value (other than 0) work together as a group of radio buttons. Checked buttons have Down=True.

Default value:

0


TSRVToolButton.ImageIndexDisable

Specifies the index of the image displayed in the button, if Enabled=False.

property ImageIndexDisable: Integer;

The image list is defined in the corresponding property of the component containing this button:

· TSRVToolBar.ImageList
· TSRVToolWindow.ImageList
· TSRVCustomPropertyTB.ImageList

Default value:

-1 (no image)


TSRVToolButton.ImageIndexDown

Specifies the index of the image displayed in the button, if it is pressed (or checked)

property ImageIndexDown: Integer;

The image list is defined in the corresponding property of the component containing this button:

· TSRVToolBar.ImageList
· TSRVToolWindow.ImageList
· TSRVCustomPropertyTB.ImageList

Default value:

-1 (no image)


TSRVToolButton.ImageIndexMove

Specifies the index of the image displayed in the button, if it is highlighted (below the mouse pointer)

property ImageIndexMove: Integer;

The image list is defined in the corresponding property of the component containing this button:

· TSRVToolBar.ImageList
· TSRVToolWindow.ImageList
· TSRVCustomPropertyTB.ImageList

Default value:

-1 (no image)


TSRVToolButton.ImageIndexNormal

Specifies the index of the image displayed in the button.

property ImageIndexNormal: Integer;

This image is displayed in a normal state (when the button is not disabled, is not highlighted, is not pressed).

The image list is defined in the corresponding property of the component containing this button:

· TSRVToolBar.ImageList
· TSRVToolWindow.ImageList
· TSRVCustomPropertyTB.ImageList

Default value:

-1 (no image)


TSRVToolButton.ShowHint

Determines whether a toolbar displays a help hint when the mouse pointer is above this button.

property ShowHint: Boolean;

The help hint's text is defined in Hint property.

Default value:

False

See also:

· Caption


TSRVToolButton.Tag

Stores an integer value as part of a button.

property Tag: Longint;

Tag has no predefined meaning. The Tag property is provided for the convenience of developers. It can be used for storing an additional integer value or it can be typecast to any 32-bit value such as a component reference or a pointer.

Default value:

0


TSRVToolButton.Visible

Specifies whether the button is visible on the toolbar.

property Visible: Boolean;

Default value:

True


TSRVAlignButton

TSRVAlignButton Type

Defines the position of buttons in TSRVToolbar.

Unit SRVToolBar.

type

TSRVAlignButton = (srvabLeft, srvabRight, srvabCenter);


TSRVAlignText

TSRVAlignText Type

Defines the position of text in TSRVToolbar.

Unit SRVToolBar.

type

TSRVAlignText = (srvatTop, srvatBottom);

A text with the description of the button under the mouse pointer can be displayed at the top (above the buttons) or at the bottom (below the buttons) of the toolbar.


TSRVClickButtonEvent

TSRVClickButtonEvent Type

A type for events happened to a toolbar button.

Unit SRVToolBar.

type

TSRVClickButtonEvent = procedure(Sender: TObject; ToolButton: TSRVToolButton) of object;


TSRVFloatProperty

TSRVFloatProperty Type

Unit SclRView.

Identifies a property of TSRichViewEdit of an integer or a floating point type.

type

TSRVFloatProperty = (srvfpPPLeftMargin, srvfpPPRightMargin, srvfpPPTopMargin,

srvfpPPBottomMargin, srvfpPPHeaderY, srvfpPPFooterY,

srvfpPPPageWidth, srvfpPPPageHeight);

Value | Corresponding property of TSRichViewEdit
srvfpPPLeftMargin | PageProperty.LeftMargin
srvfpPPRightMargin | PageProperty.RightMargin
srvfpPPTopMargin | PageProperty.TopMargin
srvfpPPBottomMargin | PageProperty.BottomMargin
srvfpPPHeaderY | PageProperty.HeaderY
srvfpPPFooterY | PageProperty.FooterY
srvfpPPPageWidth | PageProperty.PageWidth
srvfpPPPageHeight | PageProperty.PageHeight

A parameter of this type is used in TSRichViewEdit.SetFloatPropertyEd.

See also:

· TSRVIntProperty


TSRVIntProperty

TSRVIntProperty Type

Unit SclRView.

Identifies a property of TSRichViewEdit of an integer or an ordinal type.

type

TSRVIntProperty = (srvipPPOrientation, srvipPPPageFormat,

srvipPPMirrorMargins, srvipPPFacingPages, srvipPPTitlePage);

Value | Corresponding property of TSRichViewEdit
srvipPPOrientation | PageProperty.Orientation
srvipPPPageFormat | PageProperty.PageFormat
srvipPPMirrorMargins | PageProperty.MirrorMargins
srvipPPFacingPages | PageProperty.FacingPages
srvipPPTitlePage | PageProperty.TitlePage

A parameter of this type is used in TSRichViewEdit.SetIntPropertyEd.

See also:

· TSRVFloatProperty


TSRVMouseEvent

TSRVMouseEvent Type

A type for several events of TSRichViewEdit.

Unit SclRView.

TSRVMouseEvent = procedure(Sender: TSRichViewEdit; Button: TMouseButton;

Shift: TShiftState; X, Y: Integer; PageNo : Integer) of object;

X and Y are the pixel coordinates of the mouse pointer in the client area of the Sender.

Shift contains a set of pressed keys. Button identifies a mouse button.

PageNo is a page below the mouse pointer, from 1.


TSRVPageFormat

TSRVPageFormat Type

A type of page format (size).

Unit SclRView.

type

TSRVPageFormat = (srvfmCustom, srvfm4A0, srvfm2A0, srvfmA0, srvfmA1, srvfmA2,

srvfmA3, srvfmA4, srvfmA5, srvfmA6, srvfmA7, srvfmA8,

srvfmA9, srvfmA10, srvfmB0, srvfmB1, srvfmB2, srvfmB3,

srvfmB4, srvfmB5, srvfmB6, srvfmB7, srvfmB8, srvfmB9,

srvfmB10, srvfmC0, srvfmC1, srvfmC2, srvfmC3, srvfmC4,

srvfmC5, srvfmC6, srvfmC7, srvfmC8, srvfmC9, srvfmC10,

srvfmLetter, srvfmLegal, srvfmLedger, srvfmTabloid,

srvfmStatement, srvfmQuarto, srvfmFoolscap, srvfmFolio,

srvfmExecutive, srvfmMonarch, srvfmGovernmentLetter,

srvfmPost, srvfmCrown, srvfmLargePost, srvfmDemy,

srvfmMedium, srvfmRoyal, srvfmElephant, srvfmDoubleDemy,

srvfmQuadDemy, srvfmIndexCard3_5, srvfmIndexCard4_6,

srvfmIndexCard5_8, srvfmInternationalBusinessCard,

srvfmUSBusinessCard, srvfmEmperor, srvfmAntiquarian,

srvfmGrandEagle, srvfmDoubleElephant, srvfmAtlas,

srvfmColombier, srvfmImperial, srvfmDoubleLargePost,

srvfmPrincess, srvfmCartridge, srvfmSheet, srvfmHalfPost,

srvfmDoublePost, srvfmSuperRoyal, srvfmCopyDraught,

srvfmPinchedPost, srvfmSmallFoolscap, srvfmBrief, srvfmPott,

srvfmPA0, srvfmPA1, srvfmPA2, srvfmPA3, srvfmPA4, srvfmPA5,

srvfmPA6, srvfmPA7, srvfmPA8, srvfmPA9, srvfmPA10, srvfmF4,

srvfmA0a, srvfmJISB0, srvfmJISB1, srvfmJISB2, srvfmJISB3,

srvfmJISB4, srvfmJISB5, srvfmJISB6, srvfmJISB7, srvfmJISB8,

srvfmJISB9, srvfmJISB10, srvfmJISB11, srvfmJISB12,

srvfmANSI_A, srvfmANSI_B, srvfmANSI_C, srvfmANSI_D,

srvfmANSI_E, srvfmArch_A, srvfmArch_B, srvfmArch_C,

srvfmArch_D, srvfmArch_E, srvfmArch_E1);

Custom Format

srvfmCustom – user-defined paper format.

ISO "A" Paper Sizes (mm x mm)

srvfmA0 – paper format A0, 841 x 1189

srvfmA1 – paper format A1, 594 x 841

srvfmA2 – paper format A2, 420 x 594

srvfmA3 – paper format A3, 297 x 420

srvfmA4 – paper format A4, 210 x 297

srvfmA5 – paper format A5, 148 x 210

srvfmA6 – paper format A6, 105 x 148

srvfmA7 – paper format A7, 74 x 105

srvfmA8 – paper format A8, 52 x 74

srvfmA9 – paper format A9, 37 x 52

srvfmA10 – paper format A10, 26 x 37

ISO "A" Paper Sizes, German Extensions (mm x mm)

srvfm4A0 – paper format 4A0, 1682 x 2378

srvfm2A0 – paper format 2A0, 1189 x 1682

ISO "B" Paper Sizes (mm x mm)

srvfmB0 – paper format B0, 1000 x 1414

srvfmB1 – paper format B1, 707 x 1000

srvfmB2 – paper format B2, 500 x 707

srvfmB3 – paper format B3, 353 x 500

srvfmB4 – paper format B4, 250 x 353

srvfmB5 – paper format B5, 176 x 250

srvfmB6 – paper format B6, 125 x 176

srvfmB7 – paper format B7, 88 x 125

srvfmB8 – paper format B8, 62 x 88

srvfmB9 – paper format B9, 44 x 62

srvfmB10 – paper format B10, 31 x 44

ISO "C" Paper Sizes (mm x mm)

srvfmC0 – paper format C0, 917 x 1297

srvfmC1 – paper format C1, 648 x 917

srvfmC2 – paper format C2, 458 x 648

srvfmC3 – paper format C3, 324 x 458

srvfmC4 – paper format C4, 229 x 324

srvfmC5 – paper format C5, 162 x 229

srvfmC6 – paper format C6, 114 x 162

srvfmC7 – paper format C7, 81 x 114

srvfmC8 – paper format C8, 57 x 81

srvfmC9 – paper format C9, 40 x 57

srvfmC10 – paper format C10, 28 x 40

North American Paper Sizes (inch x inch)

srvfmLetter – letter paper format, 8.5 x 11

srvfmLegal – legal paper format, 8.5 x 14

srvfmLedger – tabloid (ledger) paper format, 11 x 17

srvfmStatement – statement (half letter) paper format, 5.5 x 8.5

srvfmQuarto – quatro paper format, 8 x 10

srvfmFoolscap – foolscap (folio) paper format, 8 x 13

srvfmFolio – foolscap (folio) paper format, 8 x 13

srvfmExecutive – executive (monarch) paper format, 7.25 x 10.5

srvfmMonarch – executive (monarch) paper format, 7.25 x 10.5

srvfmGovernmentLetter – government-letter paper format, 8 x 10.5

srvfmPost – post paper format, 15.5 x 19.5

srvfmCrown – crown paper format, 15 x 20

srvfmLargePost – large post paper format, 16.5 x 21

srvfmDemy – demy paper format, 17.5 x 22.5

srvfmMedium – medium paper format, 18 x 23

srvfmRoyal – royal paper format, 20 x 25

srvfmElephant – elephant paper format, 23 x 28

srvfmDoubleDemy – double demy paper format, 22.5 x 35

srvfmQuadDemy – quad demy paper format, 35 x 45

Index and Business Cards (inch x inch)

srvfmIndexCard3_5 – index card 3 x 5

srvfmIndexCard4_6 – index card 4 x 6

srvfmIndexCard5_8 – index card 5 x 8

srvfmInternationalBusinessCard – international business card, 2.125 x 3.37

srvfmUSBusinessCard – US business card, 2 x 3.5

Traditional Paper Sizes (inch x inch)

srvfmEmperor – emperor paper format, 48 x 72

srvfmAntiquarian – antiquarian paper format, 31 x 53

srvfmGrandEagle – grand eagle paper format, 28.75 x 42

srvfmDoubleElephant – double elephant paper format, 26.75 x 40

srvfmAtlas – atlas paper format, 26 x 34

srvfmColombier – colombier paper format, 23.5 x 34.5

srvfmImperial – imperial paper format, 22 x 30

srvfmDoubleLargePost – double large post paper format, 21 x 33

srvfmPrincess – princess paper format, 21.5 x 28

srvfmCartridge – cartridge paper format, 21 x 26

srvfmSheet – sheet (half post) paper format, 19.5 x 23.5

srvfmHalfPost – sheet (half post) paper format, 19.5 x 23.5

srvfmDoublePost – double post paper format, 19 x 30.5

srvfmSuperRoyal – super royal paper format, 19 x 27

srvfmCopyDraught – copy draught paper format, 16 x 20

srvfmPinchedPost – pinched post paper format, 14.75 x 18.5

srvfmSmallFoolscap – small foolscap paper format, 13.25 x 16.5

srvfmBrief – brief paper format, 13.5 x 16

srvfmPott – pott paper format, 12.5 x 15

PA Series (ISO 216) (mm x mm)

srvfmPA0 – paper format PA0, 840 x 1120

srvfmPA1 – paper format PA1, 560 x 840

srvfmPA2 – paper format PA2, 420 x 560

srvfmPA3 – paper format PA3, 280 x 420

srvfmPA4 – paper format PA4, 210 x 280

srvfmPA5 – paper format PA5, 140 x 210

srvfmPA6 – paper format PA6, 105 x 140

srvfmPA7 – paper format PA7, 70 x 105

srvfmPA8 – paper format PA8, 52 x 70

srvfmPA9 – paper format PA9, 35 x 52

srvfmPA10 – paper format PA10, 26 x 35

Other Paper Sizes (mm x mm)

srvfmF4 – 210 x 330

srvfmA0a – paper format A0a, 1000 x 1370

JIS B-Series (Japanese) (mm x mm)

srvfmJISB0 – paper format JIS B0, 1030 x 1456

srvfmJISB1 – paper format JIS B1, 728 x 1030

srvfmJISB2 – paper format JIS B2, 515 x 728

srvfmJISB3 – paper format JIS B3, 364 x 515

srvfmJISB4 – paper format JIS B4, 257 x 364

srvfmJISB5 – paper format JIS B5, 182 x 257

srvfmJISB6 – paper format JIS B6, 128 x 182

srvfmJISB7 – paper format JIS B7, 91 x 128

srvfmJISB8 – paper format JIS B8, 64 x 91

srvfmJISB9 – paper format JIS B9, 45 x 64

srvfmJISB10 – paper format JIS B10, 32 x 45

srvfmJISB11 – paper format JIS B11, 22 x 32

srvfmJISB12 – paper format JIS B12, 16 x 22

ANSI Paper Sizes (inch x inch)

srvfmANSI_A – paper format ANSI A, 8.5 x 11

srvfmANSI_B – paper format ANSI B, 11 x 17

srvfmANSI_C – paper format ANSI C, 17 x 22

srvfmANSI_D – paper format ANSI D, 22 x 34

srvfmANSI_E – paper format ANSI E, 34 x 44

Architectural Sizes (inch x inch)

srvfmArch_A – paper size Arch A, 12 x 9

srvfmArch_B – paper size Arch B, 18 x 12

srvfmArch_C – paper size Arch C, 24 x 18

srvfmArch_D – paper size Arch D, 36 x 24

srvfmArch_E – paper size Arch E, 48 x 36

srvfmArch_E1 – paper size Arch E1, 42 x 30


TSRVTHAlign, TSRVTVAlign

TSRVTHAlign, TSRVTVAlign types

Define the position of tab closing buttons in TSRVTabSet.

Unit SRVTabSet.

type

TSRVTHAlign = (srvthaLeft, srvthaCenter, srvthaRight);

TSRVTVAlign = (srvtvaTop, srvtvaCenter, srvtvaBottom);

These are the types of the following properties:

· TSRVCloseButton.HorizontalAlign


Global variables

Unit SclRView;

type

TSRVItemResizeMode = (srvrsUnrestricted, srvrsTextArea, srvrsPageWidth);

var

SRVItemResizeMode: TSRVItemResizeMode = srvrsTextArea;

MouseWheelZoomMin: Integer = 10;

MouseWheelZoomMax: Integer = 500;

MouseWheelZoomSpeed : Single = 1.0;

Item resizing

SRVItemResizeMode controls how items in TSRichViewEdit are resized with the mouse.

Mode | Meaning
srvrsUnrestricted | resizing is not restricted
srvrsTextArea | items cannot be resized beyond the document area on the page
srvrsPageWidth | items cannot be resized beyond the page width

Zooming using mouse wheel

The following variables defines parameters for zooming using the mouse wheel:

MouseWheelZoomMin – minimal value of ZoomPercent

MouseWheelZoomMax – maximal value of ZoomPercent

MouseWheelZoomSpeed defines how fast ZoomPercent changes.


Actions

Almost all RichViewActions designed for TRichViewEdit can be used with TSRichViewEdit.

However, printing actions (TrvActionPrint, TrvActionQuickPrint, TrvActionPrintPreview, TrvActionPageSetup) cannot be used. Also, it is highly preferred to use ScaleRichView versions of the note actions (do not use TrvActionInsertFootnote, TrvActionInsertEndnote, TrvActionInsertSidenote, TrvActionInsertTextBox, TrvActionEditNote).

Print and preview:

TsrvActionQuickPrint

print TsrvActionPrint

pagesetup TsrvActionPageSetup

TsrvActionPreview

Page setup:

TsrvActionOrientationPortrait changes page orientation to "portrait".

TsrvActionOrientationLandscape changes page orientation to "landscape".

TsrvActionPageFormat changes page size.

View:

TsrvActionThumbnails shows/hides page thumbnails.

TsrvActionLayoutDraft switches the editor to a draft layout.

TsrvActionLayoutWeb switches the editor to a web layout.

TsrvActionLayoutPrint switches the editor to a print layout.

Zoom:

TsrvActionZoom applies the specified zooming percent to the editor.

TsrvActionZoomPageWidth zooms the editor to fit the page width in the editor width.

TsrvActionZoomFullPage zooms the editor to fit the full page in the editor.

Header and footer:

TsrvActionEditHeader starts editing a page header.

TsrvActionEditFooter starts editing a page footer.

TsrvActionEditMain closes a header/footer editor and returns the main document.

Notes and text boxes:

TsrvActionInsertFootnote inserts a footnote.

TsrvActionInsertEndnote inserts an endnote.

TsrvActionInsertSidenote inserts a sidenote (a note in a floating box).

TsrvActionInsertTextBox inserts a text box item.

TsrvActionEditNote starts editing a note or a text box.

TsrvActionReturnToNote moves the caret to the parent note.

See also:

translating actions


Localization

General information

RichViewActions require localization, even if you use only one UI language.

Initially, the language specified in TRVAControlPanel.Language is used. If TRVAControlPanel component is not used, 'English (US)' is used. This language will be used in dialogs displayed by RichViewActions, but Captions and Hints of the actions themselves are not localized yet. Call RVA_LocalizeForm to localize them.

For changing UI language, use RVA_ChooseLanguage function. The topic about this function contains an example.

Other localization functions are declared in RVALocalize and SRVALocalize units.

If you want to add a translation to you language (for example, Greek):

1. First, a translation RichViewActions for TRichViewEdit must be done.
2. Open SRVAL_EngUS.pas, rename it to SRVAL_Greek.pas. Add SRVAL_Greek in "uses" of SRVALocalize.pas. (If you use Delphi/C++Builder 2009+, save this unit as UTF-8).
3. Translate all text in this unit (do not translate comments!)
4. Change the call of SRVA_RegisterLanguage to SRVA_RegisterLanguage('Greek', @Messages).
5. Send the translated file to svt@trichview.com for including in the main installation of ScaleRichView. Your file will be maintained (it will be corrected when new messages will be added in the future versions of RichViewActions and ScaleRichView)

Procedures and functions

The unit SRVALocalize contains the following procedures and functions:

function SRVA_GetS(MsgID: TSRVAMessageID): String;

function SRVA_GetPC(MsgID: TSRVAMessageID): PChar;

procedure SRVA_LocalizeToolWindow(ToolWindow: TSRVToolWindow);

procedure SRVA_LocalizeSRichViewEdit(Edit: TSRichViewEdit);

function SRVA_GetUnitsName(Units: TRVUnits): String;

SRVA_GetS and SRVA_GetPC return the text of the message by its identifier.

SRVA_LocalizeToolWindow localizes a typical search tool window, assuming that it has buttons in the following order:

· go to next/previous page,
· find table
· find picture
· find heading
· find hyperlink
· find text

The following constants are defined:

SRV_TOOLWIN_PAGE = 0;

SRV_TOOLWIN_TABLE = 1;

SRV_TOOLWIN_PICTURE = 2;

SRV_TOOLWIN_HEADLINE = 3;

SRV_TOOLWIN_HYPERLINK = 4;

SRV_TOOLWIN_TEXT = 5;

SRVA_LocalizeSRichViewEdit localizes a TSRichViewEdit control. It changes the following properties of ViewProperty:

· HintPrefixText;
· Texts

SRVA_GetUnitsName returns name of the given measuring unit.


TsrvAction

Properties | Actions overview

TrvAction is the base class for all RichViewActions working with TSRichViewEdit.

Unit SRVActions;

Syntax

TsrvAction = class(TrvCustomAction)

Hierarchy

TObject

TPersistent

TComponent

TBasicAction

TContainedAction

TCustomAction

TAction

TrvCustomAction

Description

This action is not used directly, but all RichViewActions working with TSRichViewEdit are inherited from it.


TsrvAction.Control

Defines the editor for this action.

property Control: TSRichViewEdit;

If TSRichViewEdit component is assigned to this property, the action works with this component.

Otherwise, if TSRichViewEdit component is focused, the action works with it.

Otherwise, it works with the first found TSRichViewEdit component.


TsrvCustomActionThatNeedsDocProps

Properties | Actions overview

TsrvCustomActionThatNeedsDocProps is the basic class for actions that needs access to the document properties maintained by TrvActionSave.

Unit SRVActions;

Syntax

TsrvCustomActionThatNeedsDocProps = class(TsrvAction)

Hierarchy

TObject

TPersistent

TComponent

TBasicAction

TContainedAction

TCustomAction

TAction

TrvCustomAction

TsrvAction

Description

This class is not used directly. The following actions are inherited from it:

· TsrvActionPrint
· TsrvActionQuickPrint
· TsrvActionPageSetup
· TsrvActionPageFormat
· TsrvActionLayoutDraft
· TsrvActionLayoutPrint
· TsrvActionLayoutWeb


TsrvCustomActionThatNeedsDocProps.ActionSave

A link to TrvActionSave.

property ActionSave: TrvActionSave;

If this property is not assigned, the action searches for the first TrvActionSave action on the same form/datamodule, and uses it.


TsrvActionPageSetup

pagesetup TsrvActionPageSetup

Properties Events | Actions overview

 Top Previous Next

TsrvActionPageSetup is the action for "File | Page Setup" command.

Unit SRVActions;

Syntax

TsrvActionPageSetup = class(TsrvCustomActionThatNeedsDocProps)

Hierarchy

TObject

TPersistent

TComponent

TBasicAction

TContainedAction

TCustomAction

TAction

TrvCustomAction

TsrvAction

TsrvCustomActionThatNeedsDocProps

Description

This action displays a page setup dialog.

It changes the following properties of TSRichViewEdit.PageProperty:

· LeftMargin
· RightMargin
· TopMargin
· HeaderY
· FooterY
· BottomMargin
· Orientation

The properties above are changed as an editing operation (undoable).

Additionally, it allows changing a paper source for the current printer (if available).


TsrvActionPageSetup.PageFormats*

TsrvActionPageSetup.PageFormats1...PageFormats6

Lists of page formats initially available in the page setup dialog.

type

TSRVPageFormatAB = srvfm4A0..srvfmB10; // ISO A & B

TSRVPageFormatC = srvfmC0..srvfmC10; // ISO C

TSRVPageFormatUSA = srvfmLetter..srvfmQuadDemy; // North American

TSRVPageFormatCardTrad = srvfmIndexCard3_5..srvfmPott; // Index/business cards & Traditional

TSRVPageFormatPAOtherJISB = srvfmPA0..srvfmJISB12; // PA & Other & JIS B

TSRVPageFormatANSIArch = srvfmANSI_A..srvfmArch_E1; // ANSI & Architectural

TSRVPageFormats = set of TSRVPageFormat;

TSRVPageFormatsAB = set of TSRVPageFormatAB;

TSRVPageFormatsC = set of TSRVPageFormatC;

TSRVPageFormatsUSA = set of TSRVPageFormatUSA;

TSRVPageFormatsCardTrad = set of TSRVPageFormatCardTrad;

TSRVPageFormatsPAOtherJISB = set of TSRVPageFormatPAOtherJISB;

TSRVPageFormatsANSIArch = set of TSRVPageFormatANSIArch;

property PageFormats1: TSRVPageFormatsAB;

property PageFormats2: TSRVPageFormatsC;

property PageFormats3: TSRVPageFormatsUSA;

property PageFormats4: TSRVPageFormatsCardTrad;

property PageFormats5: TSRVPageFormatsPAOtherJISB;

property PageFormats6: TSRVPageFormatsANSIArch;

All these types are subsets of TSRVPageFormat type. Formats listed in these properties are added in the combo box on the page setup dialog. The user can choose any page format using a menu.

Default values:

[srvfmA4, srvfmA5, srvfmA5] in PageFormats1

[srvfmLetter, srvfmLegal] in PageFormats3

[] in all other


TsrvActionPageSetup.OnChange

Occurs after the changes made in the page setup dialog are applied.

property OnChange: TNotifyEvent;


TsrvActionPreview

Properties | Actions overview

TsrvActionPreview switches the editor to the preview mode and back.

Unit SRVActions;

Syntax

TsrvActionPreview = class(TsrvAction)

Hierarchy

TObject

TPersistent

TComponent

TBasicAction

TContainedAction

TCustomAction

TAction

TrvCustomAction

TsrvAction

Description

This action toggles the value of SRichViewEdit.ViewProperty.ViewMode


TsrvActionPrint

print TsrvActionPrint

Properties | Actions overview

 Top Previous Next

TsrvActionPrint is the action for "File | Print..." command.

Unit SRVActions;

Syntax

TsrvActionPrint = class(TsrvCustomPrintAction)

Hierarchy

TObject

TPersistent

TComponent

TBasicAction

TContainedAction

TCustomAction

TAction

TrvCustomAction

TsrvAction

TsrvCustomActionThatNeedsDocProps

TsrvCustomPrintAction

Description

This action displays a printing dialog (TPrintDialog) and prints the document from TSRichViewEdit component.

The action can print the whole document or the range of pages.

This action is enabled only if at least one printer is installed in the system (Printer.Printers.Count>0).

See also:

· TsrvActionQuickPrint


TsrvActionPrint.Title

Determines the text that is listed in the Print Manager.

property Title: string;

See also:

TsrvActionQuickPrint.Title


TsrvActionQuickPrint

Properties | Actions overview

TsrvActionQuickPrint is the action for the "quick print" command (usually assigned to a toolbar button).

Unit SRVActions;

Syntax

TsrvActionQuickPrint = class(TsrvCustomPrintAction)

Hierarchy

TObject

TPersistent

TComponent

TBasicAction

TContainedAction

TCustomAction

TAction

TrvCustomAction

TsrvAction

TsrvCustomActionThatNeedsDocProps

TsrvCustomPrintAction

Description

This action prints the document from TSRichViewEdit component without displaying a printing dialog.

This action is enabled only if at least one printer is installed in the system (Printer.Printers.Count>0).

See also:

· TsrvActionPrint


TsrvActionQuickPrint.Title

Determines the text that is listed in the Print Manager.

property Title: string;

See also:

TsrvActionPrint.Title


TsrvCustomPrintAction

Properties | Actions overview

TsrvCustomPrintAction is the base class for all printing RichViewActions working with TSRichViewEdit.

Unit SRVActions;

Syntax

TsrvCustomPrintAction = class(TsrvCustomActionThatNeedsDocProps)

Hierarchy

TObject

TPersistent

TComponent

TBasicAction

TContainedAction

TCustomAction

TAction

TrvCustomAction

TsrvAction

TsrvCustomActionThatNeedsDocProps

Description

This action is not used directly, but all printing RichViewActions working with TSRichViewEdit are inherited from it:

· TsrvActionQuickPrint
· TsrvActionPrint


TsrvActionCustomOrientation

Properties | Actions overview

TsrvActionCustomOrientation is the base class for actions changing page orientation.

Unit SRVActions;

Syntax

TsrvActionCustomOrientation = class(TsrvAction)

Hierarchy

TObject

TPersistent

TComponent

TBasicAction

TContainedAction

TCustomAction

TAction

TrvCustomAction

TsrvAction

Description

This action is not used directly.

The following actions are inherited from it:

· TsrvActionOrientationPortrait
· TsrvActionOrientationLandscape


TsrvActionPageFormat

Properties | Actions overview

TsrvActionPageFormat changes page size for the document in the target editor.

Unit SRVActions;

Syntax

TsrvActionPageFormat = class(TsrvCustomActionThatNeedsDocProps)

Hierarchy

TObject

TPersistent

TComponent

TBasicAction

TContainedAction

TCustomAction

TAction

TrvCustomAction

TsrvAction

TsrvCustomActionThatNeedsDocProps

Description

This value changes the following properties of the target editor:

· PageProperty.PageFormat (see PageFormat)
· PageProperty.PageWidth (see PageWidth)
· PageProperty.PageHeight (see PageHeight)

The properties are changed as an editing operation (undoable).


TsrvActionPageFormat.PageFormat

Specifies a page format to apply to the document.

property PageFormat: TSRVPageFormat;

If PageFormat=srvfmCustom, PageWidth and PageHeight properties are used.

When this property is assigned, Caption and Hints are changed.

Default value:

srvfmA4


TsrvActionPageFormat.PageHeight

Specifies a page height to apply to the document.

property PageHeight: Extended;

This property is used if PageFormat=srvfmCustom.

This property is measured in Units.

When this property is assigned, Caption and Hints are changed.

See also:

· PageWidth.

Default value:

297.0 (height of A4 in mm)


TsrvActionPageFormat.PageWidth

Specifies a page width to apply to the document.

property PageWidth: Extended;

This property is used if PageFormat=srvfmCustom.

This property is measured in Units.

When this property is assigned, Caption and Hints are changed.

See also:

· PageHeight.

Default value:

210.0 (width of A4 in mm)


TsrvActionPageFormat.Units

Specifies measuring units for PageWidth and PageHeight properties.

property PageWidth: Extended;

When this property is assigned, Caption and Hints are changed.

Default value:

rvuMillimeters


TsrvActionOrientationPortrait

Properties | Actions overview

TsrvActionOrientationPortrait applies a portrait page orientation the the document in the target editor.

Unit SRVActions;

Syntax

TsrvActionOrientationPortrait = class(TsrvAction)

Hierarchy

TObject

TPersistent

TComponent

TBasicAction

TContainedAction

TCustomAction

TAction

TrvCustomAction

TsrvAction

Description

This action assigns PageProperty.Orientation := poPortrait.

If PageProperty.PageFormat = srvfmCustom, and PageProperty.PageWidth > PageProperty.PageHeight, the action exchanges values of these properties.

The properties are changed as an editing operation (undoable).

See also:

· TsrvActionOrientationLandscape


TsrvActionOrientationLandscape

Properties | Actions overview

TsrvActionOrientationLandscape applies a landscape page orientation the the document in the target editor.

Unit SRVActions;

Syntax

TsrvActionOrientationLandscape = class(TsrvAction)

Hierarchy

TObject

TPersistent

TComponent

TBasicAction

TContainedAction

TCustomAction

TAction

TrvCustomAction

TsrvAction

Description

This action assigns PageProperty.Orientation := poLandscape.

If PageProperty.PageFormat = srvfmCustom, and PageProperty.PageWidth < PageProperty.PageHeight, the action exchanges values of these properties.

The properties are changed as an editing operation (undoable).

See also:

· TsrvActionOrientationPortrait


TsrvActionCustomLayout

Properties Events | Actions overview

TsrvActionCustomLayout is a base class for actions changing view modes for TSRichViewEdit control.

Unit SRVActions;

Syntax

TsrvActionCustomLayout = class(TsrvCustomActionThatNeedsDocProps)

Hierarchy

TObject

TPersistent

TComponent

TBasicAction

TContainedAction

TCustomAction

TAction

TrvCustomAction

TsrvAction

TsrvCustomActionThatNeedsDocProps

Description

This action is not used directly.

The following actions are inherited from it:

· TsrvActionLayoutDraft
· TsrvActionLayoutWeb
· TsrvActionLayoutPrint

After the action changes a layout, OnExecuted event occurs.

These action use TrvActionSave to store additional information for the document in the target editor.


TsrvActionCustomLayout.OnExecuted

Occurs after the action applies the layout

property OnExecuted: TNotifyEvent;

This event may be useful if you have buttons for document view modes in the scrollbar area of TSRichViewEdit control.

You can use this event to synchronize buttons with the actions.

Example:

(assuming that the buttons are in the following order: draft, web layout, print layout)

// SRichViewEdit1.OnHMenuClickButton

procedure TfrmMain.SRichViewEdit1HMenuClickButton(Sender: TObject;

ToolButton: TSRVToolButton);

begin

if ToolButton = nil then Exit;

SRichViewEdit1.CanUpdate := False;

case (ToolButton.Index) of

0 : srvActionLayoutDraft1.Execute;

1 : srvActionLayoutWeb1.Execute;

2 : srvActionLayoutPrint1.Execute;

end;

ActiveEditor.CanUpdate := True;

end;

// After doc view actions are executed

// TsrvActionLayoutDraft

procedure TfrmMain.srvActionLayoutDraft1Executed(Sender: TObject);

begin

TSRVToolButton(SRichViewEdit1.MenuHButtons.Items[0]).Down := True;

end;

// TsrvActionLayoutWeb

procedure TfrmMain.srvActionLayoutWeb1Executed(Sender: TObject);

begin

TSRVToolButton(SRichViewEdit1.MenuHButtons.Items[1]).Down := True;

end;

// TsrvActionLayoutPrint

procedure TfrmMain.srvActionLayoutPrint1Executed(Sender: TObject);

begin

TSRVToolButton(SRichViewEdit1.MenuHButtons.Items[2]).Down := True;

end;


TsrvActionCustomZoom

Properties | Actions overview

TsrvActionCustomLayout is a base class for actions zooming TSRichViewEdit control.

Unit SRVActions;

Syntax

TsrvActionCustomZoom = class(TsrvAction)

Hierarchy

TObject

TPersistent

TComponent

TBasicAction

TContainedAction

TCustomAction

TAction

TrvCustomAction

TsrvAction

Description

This action is not used directly.

The following actions are inherited from it:

· TsrvActionZoom
· TsrvActionZoomPageWidth
· TsrvActionZoomFullPage


TsrvActionLayoutDraft

Properties Events | Actions overview

TsrvActionLayoutDraft switches TSRichViewEdit control to a "draft" layout.

Unit SRVActions;

Syntax

TsrvActionLayoutDraft = class(TsrvActionCustomLayout)

Hierarchy

TObject

TPersistent

TComponent

TBasicAction

TContainedAction

TCustomAction

TAction

TrvCustomAction

TsrvAction

TsrvCustomActionThatNeedsDocProps

TsrvActionCustomLayout

Description

The main changes made by this action for TSRichViewEdit control:

· PageProperty.PageViewMode := False;
· PageProperty.AutoWidth := False;

This action also changes the following properties:

· Color;
· PageProperty.BoundLeftRight (see BoundLeftRight property);
· ViewProperty.ShowScrollHint;
· BackgroundProperty.Visible;
· ViewProperty.AlignPageH;
· ViewProperty.AlignPageV;
· PageProperty.BorderPen.Style;
· PageProperty.HeaderVisible, PageProperty.FooterVisible (hides header and footer).

After the layout is changed, TRVAControlPanel.OnViewChanged event occurs.

See also:

TsrvActionLayoutWeb

TsrvActionLayoutPrint


TsrvActionLayoutDraft.BoundLeftRight

A value to assign to SRichViewEdit.PageProperty.BoundLeftRight.

property BoundLeftRight: Integer;

The action assigns this value to PageProperty.BoundLeftRight of the target editor.

Default value

20


TsrvActionLayoutPrint

Properties Events | Actions overview

TsrvActionLayoutPrint switches TSRichViewEdit control to a "print layout".

Unit SRVActions;

Syntax

TsrvActionLayoutPrint = class(TsrvActionCustomLayout)

Hierarchy

TObject

TPersistent

TComponent

TBasicAction

TContainedAction

TCustomAction

TAction

TrvCustomAction

TsrvAction

TsrvCustomActionThatNeedsDocProps

TsrvActionCustomLayout

Description

The main changes made by this action for TSRichViewEdit control:

· PageProperty.PageViewMode := True;
· PageProperty.AutoWidth := False;

This action also changes the following properties:

· Color (see Color property);
· PageProperty.BoundLeftRight (see BoundLeftRight property);
· ViewProperty.ShowScrollHint;
· BackgroundProperty.Visible;
· ViewProperty.AlignPageH;
· ViewProperty.AlignPageV;
· PageProperty.BorderPen.Style;
· PageProperty.HeaderVisible, PageProperty.FooterVisible (see HeaderVisible and FooterVisible properties).

After the layout is changed, TRVAControlPanel.OnViewChanged event occurs.

See also:

TsrvActionLayoutWeb

TsrvActionLayoutDraft


TsrvActionLayoutPrint.BoundLeftRight

A value to assign to SRichViewEdit.PageProperty.BoundLeftRight.

property BoundLeftRight: Integer;

The action assigns this value to PageProperty.BoundLeftRight of the target editor.

Default value

20


TsrvActionLayoutPrint.Color

A value to assign to SRichViewEdit.Color.

property Color: TColor;

The action assigns this value to Color property of the target editor.

Default value

$99A8AC


TsrvActionLayoutPrint.FooterVisible

A value to assign to SRichViewEdit.PageProperty.FooterVisible.

property FooterVisible: Boolean;

The action assigns this value to PageProperty.FooterVisible of the target editor.

Default value

True


TsrvActionLayoutPrint.HeaderVisible

A value to assign to SRichViewEdit.PageProperty.HeaderVisible.

property HeaderVisible: Boolean;

The action assigns this value to PageProperty.HeaderVisible of the target editor.

Default value

True


TsrvActionLayoutWeb

Properties Events | Actions overview

TsrvActionLayoutWeb switches TSRichViewEdit control to a "web layout".

Unit SRVActions;

Syntax

TsrvActionLayoutWeb = class(TsrvActionCustomLayout)

Hierarchy

TObject

TPersistent

TComponent

TBasicAction

TContainedAction

TCustomAction

TAction

TrvCustomAction

TsrvAction

TsrvCustomActionThatNeedsDocProps

TsrvActionCustomLayout

Description

The main changes made by this action for TSRichViewEdit control:

· PageProperty.PageViewMode := False;
· PageProperty.AutoWidth := True;

This action also changes the following properties:

· Color
· PageProperty.BoundLeftRight;
· ViewProperty.ShowScrollHint;
· BackgroundProperty.Visible;
· ViewProperty.AlignPageH;
· ViewProperty.AlignPageV;
· PageProperty.BorderPen.Style;
· PageProperty.HeaderVisible, PageProperty.FooterVisible (hides header and footer).

After the layout is changed, TRVAControlPanel.OnViewChanged event occurs.

See also:

TsrvActionLayoutPrint

TsrvActionLayoutDraft


TsrvActionThumbnails

Properties Events | Actions overview

TsrvActionThumbnails shows/hides page thumbnails for the editor.

Unit SRVActions;

Syntax

TsrvActionThumbnails = class(TsrvAction)

Hierarchy

TObject

TPersistent

TComponent

TBasicAction

TContainedAction

TCustomAction

TAction

TrvCustomAction

TsrvAction

Description

This action links/unlinks PageScroll to TSRichViewEdit control.

It assigns PageScroll.SRichViewEdit property, then calls OnExecuted. In this event, you can perform additional operations, for example showing/hiding PageScroll.


TsrvActionThumbnails.PageScroll

A link to TSRVPageScroll component.

property PageScroll: TSRVPageScroll;


TsrvActionThumbnails.OnExecuted

Occurs after the action links/unlinks PageScroll to TSRichViewEdit control.

property OnExecuted: TNotifyEvent;

Example:

procedure TForm3.srvActionThumbnails1Executed(Sender: TObject);

begin

Splitter1.Visible := TsrvActionThumbnails(Sender).Checked;

SRVPageScroll1.Visible := TsrvActionThumbnails(Sender).Checked;

end;


TsrvActionZoom

Properties | Actions overview

TsrvActionZoom zooms TSRichViewEdit control to the specified percent.

Unit SRVActions;

Syntax

TsrvActionZoom = class(TsrvActionCustomZoom)

Hierarchy

TObject

TPersistent

TComponent

TBasicAction

TContainedAction

TCustomAction

TAction

TrvCustomAction

TsrvAction

TsrvActionCustomZoom

Description

This action assigns the following properties of the target editor:

· ViewProperty.ZoomPercent := ZoomPercent;
· ViewProperty.ZoomMode := rvzmCustom.

See also:

· TsrvActionZoomPageWidth
· TsrvActionZoomFullPage


TsrvActionZoom.ZoomPercent

Zooming percent.

property ZoomPercent: Single;

This value is assigned to ViewProperty.ZoomPercent of the target editor.

When you change value of this property, Caption and Hint are updated.

Default value:

100


TsrvActionZoomFullPage

Properties | Actions overview

TsrvActionZoomFullPage zooms TSRichViewEdit control to fit the full page in the editor.

Unit SRVActions;

Syntax

TsrvActionZoomFullPage = class(TsrvActionCustomZoom)

Hierarchy

TObject

TPersistent

TComponent

TBasicAction

TContainedAction

TCustomAction

TAction

TrvCustomAction

TsrvAction

TsrvActionCustomZoom

Description

This action assigns the following property of the target editor:

· ViewProperty.ZoomMode := rvzmFullPage

See also:

· TsrvActionZoom
· TsrvActionZoomPageWidth


TsrvActionZoomPageWidth

Properties | Actions overview

TsrvActionZoomPageWidth zooms TSRichViewEdit control to fit the page width in the editor width.

Unit SRVActions;

Syntax

TsrvActionZoomPageWidth = class(TsrvActionCustomZoom)

Hierarchy

TObject

TPersistent

TComponent

TBasicAction

TContainedAction

TCustomAction

TAction

TrvCustomAction

TsrvAction

TsrvActionCustomZoom

Description

This action assigns the following property of the target editor:

· ViewProperty.ZoomMode := rvzmPageWidth.

See also:

· TsrvActionZoom
· TsrvActionZoomFullPage


TsrvActionEditHeader

Properties | Actions overview

Starts editing a page header.

Unit SRVActions;

Syntax

TsrvActionEditHeader = class(TsrvAction)

Hierarchy

TObject

TPersistent

TComponent

TBasicAction

TContainedAction

TCustomAction

TAction

TrvCustomAction

TsrvAction

Description

This action calls StartEditing(srvrveHeader)


TsrvActionEditFooter

Properties | Actions overview

Starts editing a page footer.

Unit SRVActions;

Syntax

TsrvActionEditFooter = class(TsrvAction)

Hierarchy

TObject

TPersistent

TComponent

TBasicAction

TContainedAction

TCustomAction

TAction

TrvCustomAction

TsrvAction

Description

This action calls StartEditing(srvrveFooter)


TsrvActionEditMain

Properties | Actions overview

Closes header/footer editors and starts editing the main document.

Unit SRVActions;

Syntax

TsrvActionEditMain = class(TsrvAction)

Hierarchy

TObject

TPersistent

TComponent

TBasicAction

TContainedAction

TCustomAction

TAction

TrvCustomAction

TsrvAction

Description

This action calls StartEditing(srvrveMain)


TsrvActionCustomInsertSidenote

Properties | Actions overview

TsrvActionCustomInsertSidenote is the base class for actions for inserting sidenotes and text box items.

Unit SRVActions;

Syntax

TsrvActionCustomInsertSidenote = class(TsrvActionInsertNote)

Hierarchy

TObject

TPersistent

TComponent

TBasicAction

TContainedAction

TCustomAction

TAction

TrvCustomAction

TsrvAction

TsrvActionInsertNote

Description

This action introduces properties that are assigned to properties of an inserted sidenote (or a text box item):

· BoxProperties
· BoxPosition

Text in the note's Document is formatted either according to StyleTemplateName (if style templates are used) or according to Font (otherwise).

This class is not used directly. The following actions are inherited from TrvActionCustomInsertSidenote:

· TrvActionInsertSidenote
· TrvActionInsertTextBox


TsrvActionCustomInsertSidenote.BoxPosition

Specifies position properties for the floating box.

property BoxPosition: TRVABoxPosition;

This property is assigned to BoxPosition property of the inserted sidenote / text box item.

Default values are different in inherited actions.

TsrvActionInsertSidenote:

· HorizontalAnchor=rvhanMainTextArea;
· HorizontalPositionKind=rvfpkAlignment;
· HorizontalAlignment=rvfphalRight;
· VerticalAnchor=rvvanParagraph;
· VerticalPositionKind=rvfpkAbsPosition;
· VerticalOffset=0.

TsrvActionInsertTextBox:

· HorizontalAnchor=rvhanMainTextArea;
· HorizontalPositionKind=rvfpkAlignment;
· HorizontalAlignment=rvfphalCenter;
· VerticalAnchor=rvvanLine;
· VerticalPositionKind=rvfpkAbsPosition;
· VerticalOffset=20.


TsrvActionCustomInsertSidenote.BoxProperties

Specifies size, background, border, vertical alignment properties for the floating box.

property BoxProperties: TRVABoxProperties;

This property is assigned to BoxProperties property of the inserted sidenote / text box item.

Default values

· WidthType=rvbwtRelPage;
· Width=20000;


TsrvActionCustomInsertSidenote.StyleTemplateName

Specifies the name of a style template that will be applied to a paragraph of a sidenote's Document.

property StyleTemplateName: String;

This property is used only if the target editor's UseStyleTemplates=True. Otherwise, the 0-th paragraph style and Font property are used.

Default values are different in inherited actions:

TsrvActionInsertSidenote:

'Sidenote Text' (note: this style template is standard for RichViewActions, but it is not standard for Microsoft Word)

TsrvActionInsertTextBox:

'Normal'


TsrvActionEditNote

Properties | Actions overview

TsrvActionEditNote starts editing the current or the next footnote/endnote/sidenote/text box item.

Unit SRVActions;

Syntax

TsrvActionEditNote = class(TsrvAction)

Hierarchy

TObject

TPersistent

TComponent

TBasicAction

TContainedAction

TCustomAction

TAction

TrvCustomAction

TsrvAction

Description

If the current item in TSRichViewEdit.RichViewEdit is a note, this action starts editing it.

Otherwise, the action searches for the next note from the caret position. If found, this action starts editing it.

Use this action instead of TrvActionEditNote.


TsrvActionInsertEndnote

Properties | Actions overview

TsrvActionInsertEndnote inserts an endnote in the caret position.

Unit SRVActions;

Syntax

TsrvActionInsertEndnote = class(TsrvActionInsertNote)

Hierarchy

TObject

TPersistent

TComponent

TBasicAction

TContainedAction

TCustomAction

TAction

TrvCustomAction

TsrvAction

TsrvActionInsertNote

Description

If TSRichViewEdit.RichViewEdit is active, this action inserts an endnote (TRVEndnoteItemInfo item).

If TSRichViewEdit.RVNote is active (editing a endnote.Document), this action inserts a reference to the parent endnote (TRVNoteReferenceItemInfo item).

Otherwise, this action is disabled.

When inserting an endnote, this action adds in its Document the following items:

· reference to this endnote;
· space character.

Attributes of inserted items depend on the target editor's UseStyleTemplates property.

If style templates are used, the endnote and the endnote reference characters are formatted using "endnote reference" style template. Otherwise, or if this style template does not exist, they are formatted as superscript text. In the both cases, rvprDoNotAutoSwitch is included in its Protection.

If style templates are used, endnote paragraph and text are formatted using "endnote text" style template. Otherwise, or if this style template does not exist, endnote text is formatted using Font property.

Note: "endnote reference" and "endnote text" style templates are added by default to TrvActionNew.StyleTemplates, so they are included in new documents.

Use this action instead of TrvActionInsertEndnote.


TsrvActionInsertFootnote

Properties | Actions overview

TsrvActionInsertFootnote inserts a footnote in the caret position.

Unit SRVActions;

Syntax

TsrvActionInsertFootnote = class(TsrvActionInsertNote)

Hierarchy

TObject

TPersistent

TComponent

TBasicAction

TContainedAction

TCustomAction

TAction

TrvCustomAction

TsrvAction

TsrvActionInsertNote

Description

If TSRichViewEdit.RichViewEdit is active, this action inserts a footnote (TRVFootnoteItemInfo item).

If TSRichViewEdit.RVNote is active (editing a footnote.Document), this action inserts a reference to the parent footnote (TRVNoteReferenceItemInfo item).

Otherwise, this action is disabled.

When inserting a footnote, this action adds in its Document the following items:

· reference to this footnote;
· space character.

Attributes of inserted items depend on the target editor's UseStyleTemplates property.

If style templates are used, the footnote and the footnote reference characters are formatted using "footnote reference" style template. Otherwise, or if this style template does not exist, they are formatted as superscript text. In the both cases, rvprDoNotAutoSwitch is included in its Protection.

If style templates are used, footnote paragraph and text are formatted using "footnote text" style template. Otherwise, or if this style template does not exist, footnote text is formatted using Font property.

Note: "footnote reference" and "footnote text" style templates are added by default to TrvActionNew.StyleTemplates, so they are included in new documents.

Use this action instead of TrvActionInsertFootnote.


TsrvActionInsertNote

Properties | Actions overview

TsrvActionInsertNote is the base class for actions for inserting footnotes, endnotes, sidenotes and text box items.

Unit SRVActions;

Syntax

TsrvActionInsertNote = class(TsrvAction)

Hierarchy

TObject

TPersistent

TComponent

TBasicAction

TContainedAction

TCustomAction

TAction

TrvCustomAction

TsrvAction

Description

This action is not used directly.

The following actions are inherited from it:

· TsrvActionInsertFootnote
· TsrvActionInsertEndnote
· TsrvActionInsertSidenote
· TsrvActionInsertTextBox


TsrvActionInsertNote.Font

Default font for text in a note's document.

type
TSRVAFont = class (TFont)
property Font: TSRVAFont;

This value is used if UseStyleTemplates=False for the target editor, or the required style template does not exist in Editor.RichViewEdit.Style.StyleTemplates. Otherwise, note text is formatted according to a style template.

Style template names:

· "footnote text" for footnotes,
· "endnote text" for endnotes,
· StyleTemplateName for sidenotes and text boxes (default values: "Sidenote Text" for sidenotes, "Normal" for text boxes)

Default value:

'Arial', 10


TsrvActionInsertSidenote

Properties | Actions overview

TsrvActionInsertSidenote inserts a sidenote (a note in a floating box) in the caret position.

Unit SRVActions;

Syntax

TsrvActionInsertSidenote = class(TsrvActionCustomInsertSidenote)

Hierarchy

TObject

TPersistent

TComponent

TBasicAction

TContainedAction

TCustomAction

TAction

TrvCustomAction

TsrvAction

TsrvActionInsertNote

TsrvActionCustomInsertSidenote

Description

If TSRichViewEdit.RichViewEdit, RVHeader or RVFooter is active, this action inserts a sidenote (TRVSidenoteItemInfo item).

If TSRichViewEdit.RVNote is active (editing a sidenote.Document), this action inserts a reference to the parent sidenote (TRVNoteReferenceItemInfo item).

Otherwise, this action is disabled.

When inserting a sidenote, this action adds in its Document the following items:

· reference to this sidenote;
· space character.

Attributes of inserted items depend on the target editor's UseStyleTemplates property.

If style templates are used, the sidenote and the sidenote reference characters are formatted using RefStyleTemplateName style template. Otherwise, or if this style template does not exist, they are formatted as superscript text. In the both cases, rvprDoNotAutoSwitch is included in its Protection.

If style templates are used, sidenote paragraph and text are formatted using StyleTempleteName style template. Otherwise, or if this style template does not exist, sidenote text is formatted using Font property.

The following properties are assigned to the inserted sidenote:

· BoxProperties (default: width: 20% of page width, height: auto)
· BoxPosition (default: horizontal - right aligned to the main text area, vertical - aligned to the top of the paragraph)

Use this action instead of TrvActionInsertSidenote.


TsrvActionInsertSidenote.RefStyleTemplateName

Specifies the name of a style template that will be applied to the sidenote character and to the reference of to the parent sidenote (inserted in the sidenote.Document)

property RefStyleTemplateName: String;

This property is used only if the target editor's UseStyleTemplates =True. Otherwise, these characters are formatted as a superscript.

Default value

'Sidenote Reference' (note: this style template is standard for RichViewActions, but it is not standard for Microsoft Word)


TsrvActionInsertTextBox

Properties | Actions overview

TsrvActionInsertTextBox inserts a text box item in the caret position.

Unit SRVActions;

Syntax

TsrvActionInsertTextBox = class(TsrvActionCustomInsertSidenote)

Hierarchy

TObject

TPersistent

TComponent

TBasicAction

TContainedAction

TCustomAction

TAction

TrvCustomAction

TsrvAction

TsrvActionInsertNote

TsrvActionCustomInsertSidenote

Description

If TSRichViewEdit.RichViewEdit, RVHeader or RVFooter is active, this action inserts a text box item (TRVTextBoxItemInfo item).

Otherwise, this action is disabled.

When inserting a text box, this action adds a single empty text item in its Document .

Attributes of this text item depend on the target editor's UseStyleTemplates property.

If style templates are used, this text item's paragraph and text are formatted using StyleTemplateName style template. Otherwise, or if this style template does not exist, this text is formatted using Font property.

The following properties are assigned to the inserted sidenote:

· BoxProperties (default: width: 20% of page width, height: auto)
· BoxPosition (default: horizontal - centered in the main text area, vertical - 20 pixels below the top of the line)

Use this action instead of TrvActionInsertSidenote.


TsrvActionReturnToNote

Properties | Actions overview

TsrvActionReturnToNote ends editing a footnote/endnote/sidenote/text box.

Unit SRVActions;

Syntax

TsrvActionReturnToNote = class(TsrvAction)

Hierarchy

TObject

TPersistent

TComponent

TBasicAction

TContainedAction

TCustomAction

TAction

TrvCustomAction

TsrvAction

Description

This action is enabled only if a note or a text box is being edited in TSRichViewEdit control.

The action activates the main document editor (RichViewEdit) and moves the caret to the note.


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;

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.


TSRVCanvasControl

TSRVCanvasControl is the base class for lightweight SRVControls.

Unit SRVControl;

Syntax

TSRVCanvasControl = class(TGraphicControl);

Hierarchy

TObject

TPersistent

TComponent

TControl

TGraphicControl

Properties and events

Public properties:

Property | Type | Default value | Meaning
Alignment | TAlignment | taLeftJustify |
DrawOnPrint | Boolean | True | if True, this control will be printed
ReadOnly IsMouseDown | Boolean |  | Read-only. Returns True if the user pressed the left mouse button above the control.
ReadOnly MouseIn | Boolean |  | Read-only. Returns True, if the mouse pointer is above the control

Published events:

· OnMouseEnter, OnMouseLeave (TNotifyEvent) occur when the mouse pointer enter/leaves the control.
· OnPaint (TSRVCtrlPaintPage) occurs when the control must be painted.

type

TSRVCtrlPaintPage = procedure(Sender: TObject; R: TRect; Canvas: TCanvas) of object;

Protected properties:

Property | Type | Default value | Meaning
protected SkinManager | TSRVSkinManager |  | A link to a skin manager component.
protected SkinSchemeIndex | Integer | 0 | Index in a scheme in SkinManager.CurrentSkin (a scheme depends on the control type)

Inherited components

Srvpaintbox TSRVPaintBox


TSRVCustomComboBox

TSRVCustomComboBox is the base class for combo box controls.

Unit SRVComboBox;

Syntax

TSRVCustomComboBox = class(TSRVEditControl);

Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TSRVWinControl

TSRVEditControl

Properties and events

Public properties

Property | Type | Default value | Meaning
AutoComplete | Boolean | True | Specifies whether the combo box automatically completes words that the user types by selecting the first item that begins with the currently typed string.
AutoDropDown | Boolean | False | Specifies whether the drop-down list drops down automatically in response to user keystrokes.
AutoSize | Boolean | True | Determines whether the height of the edit region automatically resizes to accommodate the text height
CharCase | TSRVEditCharCase | srvecNormal | Determines the case of the text within the edit region: srvecNormal, srvecUpperCase, srvecLowerCase
Color | TColor | clWindow | Background color of the editing region.
DoubleBuffered | Boolean | False | Determines whether the control’s image is rendered directly to the window or painted to an in-memory bitmap first. Double buffering reduces the amount of flicker when the control repaints, but is more memory intensive.
DropDownCount | Integer | 5 | Specifies the maximum number of items displayed in the drop-down list.
DropDownHints | Integer | 10 | Defines how many hints (suggestions) are visible in a list.
HideSelection | Boolean | True | Determines whether the visual indication of the selected text remains when focus shifts to another control.
HintsItemSkinSchemeIndex | Integer |  | An index in SkinManager.CurrentSkin.BoxSchemes collection, for items in the list of hints (suggestions)
HintsScrollBarSkinSchemeIndex | Integer |  | An index in SkinManager.CurrentSkin.VerticalScrollBarSchemes collection, for scrollbars in the list of hints (suggestions)
HintsSkinSchemeIndex | Integer |  | An index in SkinManager.CurrentSkin.BoxSchemes collection, for the list of hints (suggestions)
ImageList | TCustomImageList |  | Specifies the images that appear next to items in the list box.
ItemHeight | Integer | 20 | Specifies the height in pixels of an item in an owner-draw list.
ItemIndex | Integer |  | Specifies the ordinal number of the selected item.
ItemWidth | Integer | 0 | If set to a positive value, defines a width of a drop down list.
Items | TSRVCBoxItemCollection |  | Items, a collection of TSRVCBoxItem.
ListMarginHeight | Integer | 2 | Height of the top and bottom margins of the drop down list.
ListMarginWidth | Integer | 3 | Width of left and right margins of the drop down list.
MaxLength | Integer | 0 | Specifies the maximum number of characters the user can type into the edit portion (0 for unlimited)
Modified | Boolean |  | Indicates whether the user edited the text of the edit control.
ReadOnly | Boolean | False | Determines whether the user can change the text of the edit region.
ReadOnly ScrollBar | TSRVScrollBar |  | Read-only. Returns a scroll bar object.
SelectedItemBackColor |  | clHighlight | Background color for the selected item.
SelectedItemBorderColor |  | clSilver | Border color for the selected item.
SelectedItemTextColor |  | clHighlightText | Text color for the selected item.
Sorted | Boolean | False | Specifies whether the items in a list box are arranged alphabetically.
Style | TComboBoxStyle | csDropDown | Determines the display style of the combo box.
Text | String |  | Text in the editing region.
UseItemFontNames | Boolean | False | Specifies whether the FontName properties of items are used to display their Captions.

Public events

OnChange occurs when the user changes the text displayed in the edit region.

OnDropDown occurs when the user opens the drop-down list.

OnMeasureItem occurs when the application needs to redisplay an item in a variable height owner-draw list box.

OnDrawItem occurs when an item in an owner-draw list box needs to be redisplayed.

OnEditHints occurs when a list of hints (suggestions) is about to be displayed. See the section about "Hints (Suggestions)" for TSRVEdit.

See also properties and events inherited from TSRVEditControl.

Methods

BeginUpdate/EndUpdate locks/unlocks redrawing.

IndexOf returns the index of item by its Caption.

HasParent returns True if the given item has a parent item.

GetParent returns the index of the parent item for the given item.

AppendItem adds an item with the specified properties to the end of the item list.

InsertItem inserts an item with the specified properties at the position Index.

DeleteItem deletes the specified item.

Inherited components

SRVEdit TSRVComboBox


TSRVCustomControl

TSRVWinControl is the base class for all SRVControls that are wrappers for Microsoft Windows screen objects.

Unit SRVControl;

Syntax

TSRVCustomControl = class(TCustomControl);

Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TCustomControl

Properties and events

Public properties:

Property | Type | Default value | Meaning
Alignment | TAlignment | taLeftJustify |
DrawOnPrint | Boolean | True | if True, this control will be printed
ReadOnly MouseIn | Boolean |  | Read-only. Returns True, if the mouse pointer is above the control

Public events:

· OnMouseEnter, OnMouseLeave (TNotifyEvent) occur when the mouse pointer enter/leaves the control.

Protected properties:

Property | Type | Default value | Meaning
protected SkinManager | TSRVSkinManager |  | A link to a skin manager component.
protected SkinSchemeIndex | Integer | 0 | Index in a scheme in SkinManager.CurrentSkin (a scheme depends on the control type)
protected ButtonSkinSchemeIndex | Integer | 0 | Additional index in a scheme in SkinManager.CurrentSkin (a scheme depends on the control type)

Inherited components

SRVButton TSRVButton

SRVCheckBox TSRVCheckBox

SRVGroupBox TSRVGroupBox

SRVPanel TSRVPanel

SRVRadioButton TSRVRadioButton


TSRVCustomListBox

TSRVCustomListBox is the base class for list box controls.

Unit SRVListBox;

Syntax

TSRVCustomListBox = class(TSRVWinControl);

Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TSRVWinControl

Properties and events

Public properties

Property | Type | Default value | Meaning
DoubleBuffered | Boolean | False | Determines whether the control’s image is rendered directly to the window or painted to an in-memory bitmap first. Double buffering reduces the amount of flicker when the control repaints, but is more memory intensive.
HideSelection | Boolean | True | Determines whether the visual indication of the selected item remains when focus shifts to another control.
HotItemBackColor |  | clBackground | Background color for the highlighted item (below the mouse pointer).
HotItemBorderColor |  | clSilver | Border color for the highlighted item.
HotItemTextColor |  | clWhite | Text color for the highlighted item.
ImageList | TCustomImageList |  | Specifies the images that appear next to items in the list box.
ItemHeight | Integer |  | Specifies the height in pixels of an item in an owner-draw list box.
ItemIndex | Integer |  | Specifies the ordinal number of the selected item in the list box’s item list. If the value of the MultiSelect property is True the user can select more than one item in the list box. In this case, the ItemIndex value is the index of the selected item that has focus
Items | TSRVLBoxItemCollection |  | Items, a collection of TSRVLBoxItem.
MultiSelect | Boolean | False | Determines whether the user can select more than one element at a time.
ReadOnly ScrollBar | TSRVScrollBar |  | Read-only. Returns a scroll bar object.
SelectedItemBackColor |  | clHighlight | Background color for the selected item.
SelectedItemBorderColor |  | clSilver | Border color for the selected item.
SelectedItemTextColor |  | clHighlightText | Text color for the selected item.
ShowCheckBoxes | Boolean | False | Shows/hides check boxes in each item.
Sorted | Boolean | False | Specifies whether the items in a list box are arranged alphabetically.
UseItemFontNames | Boolean | False | Specifies whether the FontName properties of items are used to display their Captions.

Public events

OnMeasureItem occurs when the application needs to redisplay an item in a variable height owner-draw list box.

OnDrawItem occurs when an item in an owner-draw list box needs to be redisplayed.

See also properties and events inherited from TSRVWinControl.

Methods

BeginUpdate/EndUpdate locks/unlocks redrawing.

IndexOf returns the index of item by its Caption.

HasParent returns True if the given item has a parent item.

GetParent returns the index of the parent item for the given item.

AppendItem adds an item with the specified properties to the end of the item list.

InsertItem inserts an item with the specified properties at the position Index.

DeleteItem deletes the specified item.

Inherited components

SRVEdit TSRVListBox


TSRVEditControl

TSRVEditControl is the base class for plain-text controls.

Unit SRVControl;

Syntax

TSRVEditControl = class(TSRVWinControl);

Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TSRVWinControl

Properties and events

Public properties

Property | Type | Default value | Meaning
ReadOnly CaretPos | TPoint |  | Read-only. Returns the position of the caret.
SelLength | Integer |  | Specifies the number of characters (bytes) that are selected.
SelStart | Integer |  | Specifies the position of the first selected character in the text, from 0

See also properties inherited from TSRVWinControl.

Methods

SelectAll selects all text in the edit control.

Inherited components

SRVEdit TSRVEdit

SRVEdit TSRVComboBox


TSRVGraphicControl

TSRVGraphicControl is the base class for lightweight SRVControls.

Unit SRVControl;

Syntax

TSRVGraphicControl = class(TGraphicControl);

Hierarchy

TObject

TPersistent

TComponent

TControl

TGraphicControl

Properties and events

Public properties:

Property | Type | Default value | Meaning
Alignment | TAlignment | taLeftJustify |
Autosize | Boolean | True |
BackgroundColor | TColor | $881C10 |
DrawOnPrint | Boolean | True | if True, this control will be printed
ForegroundColor | TColor | clWhite |
ReadOnly IsMouseDown | Boolean |  | Read-only. Returns True if the user pressed the left mouse button above the control.
ReadOnly MouseIn | Boolean |  | Read-only. Returns True, if the mouse pointer is above the control
Offset | Integer | 1 |

Published events:

· OnMouseEnter, OnMouseLeave (TNotifyEvent) occur when the mouse pointer enter/leaves the control.

Protected properties:

Property | Type | Default value | Meaning
protected SkinManager | TSRVSkinManager |  | A link to a skin manager component.
protected SkinSchemeIndex | Integer | 0 | Index in a scheme in SkinManager.CurrentSkin (a scheme depends on the control type)

Inherited components

SRVLabel TSRVLabel


TSRVWinControl

TSRVWinControl is the base class for all SRVControls that are wrappers for Microsoft Windows screen objects.

Unit SRVControl;

Syntax

TSRVWinControl = class(TWinControl);

Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

Properties and events

Public properties:

Property | Type | Default value | Meaning
Alignment | TAlignment | taLeftJustify |
DrawOnPrint | Boolean | True | if True, this control will be printed
DisabledBorderColor | TColor | $B8D8D7 | Border color in disabled state
DisabledBorderWidth | Integer | 1 | Border width in disabled state
EnabledBorderColor | TColor | $BF9F7F | Border color in normal state
EnabledBorderWidth | Integer | 1 | Border width in normal state
FocusedBorderColor | TColor | clBlue | Border color when the control is focused
FocusedBorderWidth | Integer | 1 | Border width when the control is focused
ReadOnly MouseIn | Boolean |  | Read-only. Returns True, if the mouse pointer is above the control
MouseInBorderColor | TColor | clRed | Border color when the control is below the mouse pointer
MouseInBorderWidth | Integer | 1 | Border width when the control is below the mouse pointer

Public events:

· OnMouseEnter, OnMouseLeave (TNotifyEvent) occur when the mouse pointer enter/leaves the control.

Protected properties:

Property | Type | Default value | Meaning
protected SkinManager | TSRVSkinManager |  | A link to a skin manager component.
protected SkinSchemeIndex | Integer | 0 | An index in a scheme in SkinManager.CurrentSkin (a scheme depends on the control type)
protected ScrollBarSkinSchemeIndex | Integer | 0 | An index in SkinManager.CurrentSkin.VerticalScrollBarSchemes collection, for controls having scrollbars
protected ItemSkinSchemeIndex | Integer | 0 | An index in SkinManager.CurrentSkin.BoxSchemes collection, for controls having items
protected EditSkinSchemeIndex | Integer | 0 | An index in SkinManager.CurrentSkin.BoxSchemes collection, for controls having an embedded text editor
protected ButtonSkinSchemeIndex | Integer | 0 | An index in SkinManager.CurrentSkin.BoxSchemes collection, for controls having an embedded button

Inherited classes

· TSRVEditControl
· TSRVCustomListBox


TSRVCBoxItemCollection, TSRVLBoxItemCollection

TSRVCBoxItemCollection is a type of collection of items of TSRVComboBox. Item type is TSRVCBoxItem.

TSRVLBoxItemCollection is a type of collection of items of TSRVListBox. Item type is TSRVLBoxItem.

Unit SRVTypeItems;

Syntax

TSRVCBoxItemCollection = class(TCollection);

TSRVLBoxItemCollection = class(TSRVCBoxItemCollection);

Hierarchy

TObject

TPersistent

TCollection


TSRVImageScrollCollection

TSRVImageScrollCollection is a type of collection of items of TSRVImagesScroll. Item type is TSRVImageScrollItem.

Unit SRVImagesScroll;

Syntax

TSRVImageScrollCollection = class(TCollection);

Hierarchy

TObject

TPersistent

TCollection


TSRVCBoxItem, TSRVLBoxItem

TSRVCBoxItem is a type of item for collection of items of TSRVComboBox.

TSRVLBoxItem is a type of item for collection of items of TSRVListBox.

Unit SRVTypeItems;

Syntax

TSRVCBoxItem = class(TCollectionItem);

TSRVLBoxItem = class(TSRVCBoxItem);

Hierarchy

TObject

TPersistent

TCollectionItem

Properties of TSRVCBoxItem

Published properties

Property

Type

Default value

Meaning

published AlignImage

TLRAlignment

tlraLeftJustify

Specifies the position of image relative to Caption.

published Alignment

TAlignment

taLeftJustify

Specifies the horizontal alignment of content inside the item.

published BackColor

TColor

clWindow

Background color.

published Caption

String

Specifies the text value of the item. Can be hidden, see Options.

published Color

TColor

clWindowText

Text color for Caption.

published Enabled

Boolean

True

Controls whether the item can be selected.

published Expanded

Boolean

True

Specifies whether the item is expanded (children are visible)

published FontName

TFontName

'Microsoft Sans Serif'

Font name for displaying Caption. Used only if UseItemFontNames=True for the parent control.

published Hint

String

Reserved

published ImageIndex

Integer

-1

Identifies the image associated with this item. ImageIndex is an index into the ImageList property of the parent control.

When the item is selected, the item displays the image specified by the SelectedImageIndex property instead, if that property is assigned.

Can be hidden, see Options.

published Indent

Integer

0

Defines both the indent from the left side to the item content, and the level of the item in the items hierarchy. Items with greater Indent are children of the preceding item with smaller Indent.

published Options

TSRVItemOptions

[srvioShowCheckBox, srvioShowImage, srvioShowText,

srvioCanSelect, srvioCanHaveChildren]

Item options (see below)

published SkinSchemeIndex

Integer

-1

Index in the SkinManager.CurrentSkin.BoxSchemes (SkinManager is a property of the parent control). Defines a visual appearance of the item. If equals to -1, ItemSkinSchemeIndex property of the parent control is used.

published SelectedImageIndex

Integer

-1

Identifies the image associated with this item when it is selected. SelectedImageIndex is an index into the ImageList property of the parent control. If it equals to -1, ImageIndex property is used instead.

Can be hidden, see Options.

published Style

TFontStyles

[]

Font styles to display Caption.

published Tag

Integer

0

Stores an integer value as part of the item.

type

TLRAlignment = (tlraLeftJustify, tlraRightJustify);

TSRVItemOption = (srvioShowCheckBox, srvioShowImage, srvioShowText,

srvioCanSelect, srvioCanHaveChildren);

TSRVItemOptions = set of TSRVItemOption;

Options can include the following values:

· srvioShowCheckBox: if excluded, a check box for this item is not shown (check boxes are shown only if ShowCheckBoxes property of the parent control is True); this option is ignored for combo boxes, it is used only in list boxes;
· srvioShowImage: shows the image specified in ImageIndex and SelectedImageIndex;
· srvioShowText: shows Caption;
· srvioCanSelect: allows this item to be selected; similar to Enabled, but does not provide a visual indication;
· srvioCanHaveChildren: allows this item to have children; if excluded, subsequent items are not treated as its children, even if they have greater Indents;

SRVComboBox Item Scheme

Properties of TSRVLBoxItem

In addition to the properties inherited from TSRVCBoxItem, TSRVLBoxItem has the following published properties:

Property | Type | Default value | Meaning
published AlignCheckBox | TLRAlignment | tlraLeftJustify | Specifies the position of checkbox relative to Caption and image.
published Checked | Boolean | False | Specifies whether the check box is checked. If the MultiSelect property of the list box is True, you may find it more useful to use the State property.
published State | TCheckBoxState | cbUnchecked | Indicates whether the check box is selected (cbChecked), deselected (cbUnchecked), or grayed (cbGrayed)

SRVListBox Item Scheme


TSRVImageScrollItem

TSRVImageScrollItem is a type of item for collection of items of TSRVComboBox.

Unit SRVImagesScroll;

Syntax

TSRVImageScrollItem = class(TCollectionItem);

Hierarchy

TObject

TPersistent

TCollectionItem

Properties

Published properties

Property

Type

Default value

Meaning

published Enabled

Boolean

True

Determines whether the item can be selected.

published Hint

String

Reserved

published ImageIndex

Integer

-1

Identifies the image associated with this item. ImageIndex is an index into the ImageList property of the parent control.

When the item is selected, the item displays the image specified by the SelectedImageIndex property instead, if that property is assigned.

published Link

String

Reserved

published Name

String

Item name, not displayed

published SkinSchemeIndex

Integer

-1

Index in the SkinManager.CurrentSkin.BoxSchemes (SkinManager is a property of the parent control). Defines a visual appearance of the item. If equals to -1, ItemSkinSchemeIndex of the parent control is used.

published SelectedImageIndex

Integer

-1

Identifies the image associated with this item when it is selected. SelectedImageIndex is an index into the ImageList property of the parent control. If it equals to -1, ImageIndex property is used instead.

published ShowHint

Boolean

True

Reserved

published Tag

LongInt

0

Stores an integer value as part of the item.

published Visible

Boolean

True

Determines whether the item is visible


TSRVButton

SRVButton TSRVButton

TSRVLabel is a control displaying text.

Unit SRVButton;

Syntax

TSRVButton = class(TSRVCustomControl)

Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TCustomControl

TSRVCustomControl

Properties and events

This component publishes the following properties inherited from TSRVCustomControl:

· DrawOnPrint;
· SkinManager;
· SkinSchemeIndex;
· properties inherited from TCustomControl.

New published properties:

Property | Type | Default value | Meaning
published Default | Boolean | False | Determines whether the button’s OnClick event handler executes when the Enter key is pressed.
published FocusRectOffset | Integer | 3 | A distance from the control edges to the dotted rectangle drawn on the focused button (if ShowFocusRect=True)
published Glyph | TPicture | (empty) | Specified the picture that appears on the button
published ModalResult | TModalResult | mrNone | Determines whether and how the button closes its (modal) parent form.
published MouseBorderWidth | Integer | 2 | Width of button sides
published OffsetOnClick | Integer | 0 | Specifies how far Glyph and Caption are shifted when the button is pressed.
published ShowFocusRect | Boolean | True | Shows/hides a dotted rectangle drawn on the focused button

New published event:

· OnClick, occurs when the user clicks the control.

Painting

If SkinManager is assigned, the button is drawn using SkinManager.CurrentSkin.BoxSchemes[SkinSchemeIndex].

Example:


TSRVCheckBox

SRVCheckBox TSRVCheckBox

TSRVCheckBox represents a check box that can be on (checked) or off (unchecked)

Unit SRVCheckBox;

Syntax

TSRVCheckBox = class(TSRVCustomControl)

Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TCustomControl

TSRVCustomControl

Properties and events

This component publishes the following properties inherited from TSRVCustomControl:

· Alignment;
· ButtonSkinSchemeIndex;
· DrawOnPrint;
· SkinManager;
· SkinSchemeIndex;
· properties inherited from TCustomControl.

New published properties:

Property | Type | Default value | Meaning
published AllowGrayed | Boolean | False | Determines whether a check box can be in a “grayed” state. Not supported in a skinned mode.
published Checked | Boolean | False | Specifies whether the check box is checked. If the AllowGrayed property is True, you may find it more useful to use the State property.
published State | TSRVCheckBoxState | cbUnchecked | Indicates whether the check box is selected (cbChecked), deselected (cbUnchecked), or grayed (cbGrayed)

Painting

A position of the box and Caption depends on Alignment:

· taLeftJustify: the box and the caption is aligned to the left, the box is to the left of the caption;
· taRightJustify: the box and the caption is aligned to the right, the box is to the right of the caption;
· taCenter: the box is in the middle, the caption is aligned to the left.

If SkinManager is assigned, the control is drawn using SkinManager.CurrentSkin.BoxSchemes[SkinSchemeIndex], and the box is drawn using SkinManager.CurrentSkin.BoxSchemes[ButtonSkinSchemeIndex]. In this mode, a grayed state is not supported.

Example:


TSRVComboBox

SRVComboBox TSRVComboBox

TSRVComboBox combines an edit box with a scrollable list. Items can have captions and images. A list can be hierarchical. Additionally, editing suggestions (hints) may be displayed.

Unit SRVComboBox;

Syntax

TSRVComboBox = class(TSRVCustomComboBox)

Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TSRVWinControl

TSRVEditControl

TSRVCustomComboBox

Properties and events

This component publishes public properties inherited from TSRVCustomComboBox.

Hints (Suggestions)

A list of suggestions can be displayed on editing. This feature can be temporary blocked using BeginUpdate/EndUpdate.

Suggestions are requested in the event OnEditHints. In this event, you can fill a list of suggestions (EditHints) for the Text, and specify the Index of item to highlight initially.

A height of this list is defined in DropDownHints property.

Painting

If SkinManager is assigned:

· an editing region is drawn using SkinManager.CurrentSkin.BoxSchemes[EditSkinSchemeIndex];
· a drop down list is drawn using SkinManager.CurrentSkin.BoxSchemes[SkinSchemeIndex];
· each item in a drop down list is drawn using SkinManager.CurrentSkin.BoxSchemes[ItemSkinSchemeIndex];
· a scrollbar of a drop down list is drawn using SkinManager.CurrentSkin.VerticalScrollBarSchemes[ScrollBarSkinSchemeIndex].
· a list of hints (suggestions) is drawn using SkinManager.CurrentSkin.BoxSchemes[HintsSkinSchemeIndex];
· each item in a list of hints is drawn using SkinManager.CurrentSkin.BoxSchemes[HintsItemSkinSchemeIndex];
· a scrollbar of a list hints is drawn using SkinManager.CurrentSkin.VerticalScrollBarSchemes[HintsScrollBarSkinSchemeIndex].

Example:


TSRVEdit

SRVEdit TSRVEdit

TSRVEdit is a single-line plain-text edit control, with an optional popup list displaying hints (suggestions).

Unit SRVEdit;

Syntax

TSRVEdit = class(TSRVEditControl)

Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TSRVWinControl

TSRVEditControl

Properties and events

This component publishes the following properties inherited from TSRVEditControl:

· DrawOnPrint;
· SkinManager;
· SkinSchemeIndex, ScrollBarSkinSchemeIndex, ItemSkinSchemeIndex;
· EnabledBorderColor, EnabledBorderWidth;
· DisabledBorderColor, DisabledBorderWidth;
· MouseInBorderColor, MouseInBorderWidth;
· FocusedBorderColor, FocusedBorderWidth;
· properties inherited from TWinControl.

New published properties:

Property | Type | Default value | Meaning
published AutoSize | Boolean | True | Determines whether the height of the edit control automatically resizes to accommodate the text height
published CharCase | TSRVEditCharCase | srvecNormal | Determines the case of the text within the edit control: srvecNormal, srvecUpperCase, srvecLowerCase
published DropDownHints | Integer | 10 | Defines how many hints (suggestions) are visible in a list.
published MaxLength | Integer | 0 | Specifies the maximum number of characters the user can enter into the edit control (0 for unlimited)
published PasswordChar | Char | #0 | Indicates the character, if any, to display in place of the actual characters typed in the control (#0 to disable this feature)
published ReadOnly | Boolean | False | Determines whether the user can change the text of the edit control

New public properties:

Property | Type | Initial value | Meaning
Modified | Boolean |  | Indicates whether the user edited the text of the edit control.
SelText | String |  | Specifies the selected portion of the edit control’s text. Set SelText to replace the selected text with a new string.

New published events:

· OnChange occurs when the text for the edit control may have changed.
· OnEditHints: TSRVEditHintsEvent occurs when a list of hints (suggestions) is about to be displayed.
· OnCloseHints: TFormHintsClose occurs when a list of hints (suggestions) is closed.

type

TSRVEditHintsEvent = procedure (Sender: TSRVEditControl;

Text: String; EditHints: TStringList; var ItemIndex : Integer) of object;

TFormHintsClose = procedure(Sender: TObject; FormWidth, FormHeight: Integer;

var NewText : String) of object;

Methods

Clear deletes all text from the edit control.

ClearSelection removes the selected text from the edit control.

CopyToClipboard copies the selected text in the edit control to the Clipboard.

CutToClipboard copies the selected text in the edit control to the Clipboard and then deletes the selection.

PasteFromClipboard pastes the contents of the Clipboard into edit control, replacing the current selection.

Undo backs out all changes in the undo buffer.

ClearUndo clears the undo buffer so that no changes to the text can be backed out.

BeginUpdate locks redrawing and displaying hints (suggestions), EndUpdate unlocks them.

GetSelTextBuf copies the selected text into a buffer and returns the number of characters copied. SetSelTextBuf replaces the selected text with a null-terminated string.

ShowHints displays a list of hints (suggestions).

Hints (Suggestions)

A list of suggestions can be displayed on editing or by the method ShowHints. This feature can be temporary blocked using BeginUpdate/EndUpdate.

Suggestions are requested in the event OnEditHints. In this event, you can fill a list of suggestions (EditHints) for the Text, and specify the Index of item to highlight initially.

A height of this list is defined in DropDownHints property.

When a list of suggestions is closed, OnCloseHints event occurs. The parameter NewText contains the chosen suggestion (it is empty if canceled).

Painting

If SkinManager is assigned:

· the control is drawn using SkinManager.CurrentSkin.BoxSchemes[EditSkinSchemeIndex];
· a list of hints (suggestions) is drawn using SkinManager.CurrentSkin.BoxSchemes[SkinSchemeIndex];
· each item in this list is drawn using SkinManager.CurrentSkin.BoxSchemes[ItemSkinSchemeIndex];
· a scrollbar of this list is drawn using SkinManager.CurrentSkin.VerticalScrollBarSchemes[ScrollBarSkinSchemeIndex].

Example:


TSRVGroupBox

SRVGroupBox TSRVGroupBox

The TSRVGroupBox component is used to group related controls. This component is similar to TSRVPanel.

Unit SRVGroupBox;

Syntax

TSRVGroupBox = class(TSRVCustomControl)

Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TCustomControl

TSRVCustomControl

Properties and events

This component publishes the following properties inherited from TSRVCustomControl:

· Alignment (default value is taCenter);
· DrawOnPrint;
· SkinManager;
· SkinSchemeIndex;
· Color (default value $00B8D8D7);
· properties inherited from TCustomControl.

New published properties:

Property | Type | Default value | Meaning
published BorderColor | TColor | $00B8D8D7 | Border color
published BorderWidth | Integer | 1 | Border width
published CaptionOffset | Integer | 10 | Value in range 1..30. A distance from the border to the caption
published CornersOffset | Integer | 10 | Value in range 1..30. Defines how much border corners are rounded

Painting

Caption is aligned according to Alignment. CaptionOffset shifts the text (to the right, if Alignment=taLeftJustify, or to the left, if Alignment=taRightJustify). Caption is placed vertically at the top.

Background is drawn using Color property.

Border is drawn using BorderColor, BorderWidth and CornersOffset properties (even in a skin mode).

If SkinManager is assigned, the control is drawn using SkinManager.CurrentSkin.BoxSchemes[SkinSchemeIndex].

Example:


TSRVImagesScroll

SRVImagesScroll TSRVImagesScroll

The TSRVImagesScroll component is used to display images in a scrollable row (or column)

Unit SRVImagesScroll;

Syntax

TSRVImagesScroll = class(TSRVCustomControl)

Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TCustomControl

TSRVCustomControl

Properties

This component publishes the following properties inherited from TSRVCustomControl:

· SkinManager;
· SkinSchemeIndex;
· properties inherited from TCustomControl.

New published properties:

Property | Type | Default value | Meaning
published CanMoveImages | Boolean | True | Determines whether items can be rearranged using the mouse.
published CloseButton | TSRVCloseButton |  | Properties for closing button in each item.
published DoubleBuffered | Boolean | False | Determines whether the control’s image is rendered directly to the window or painted to an in-memory bitmap first.
published ImageList | TCustomImageList |  | Link to an image list to display in items
published Indent | Integer | 10 | Indent before the first item.
published ItemHeight | Integer | 40 | Item height
published ItemIndex | Integer |  | Index of the selected item (in Items)
published Items | TSRVImageScrollCollection |  | Items, a collection of TSRVImageScrollItem
published ItemWidth | Integer | 80 | Item width
published Kind | TSRVImageScrollKind | srvbkHorizontal | Determines how images are placed (srvbkHorizontal – in a row, srvbkVertical – in a column).
published RestrictMove | Boolean | False | Determines whether the user can move items outside visible area of the control (if CanMoveImages=True)
published Spacings | Integer | 10 | Spacing between items.

To prevent flickering, assign DoubleBuffered=True if the control is placed on the form (not necessary, if inserted in TSRichViewEdit control).

New published properties-colors (for non-skin mode):

Property | Type | Default value | Meaning
published ItemBorderStyle | TPenStyle | psSolid | Item border pen style.
published ItemBorderColor | TColor | clBtnShadow | Item border color.
published ItemColor |  | clBtnFace | Item color in normal mode.
published ItemDownColor |  | clInactiveCaption | Item color when pressed.
published ItemHotColor |  | clBtnShadow | Item color below the mouse pointer.
published ItemSelectedColor |  | clHighlight | Item color when selected.

New published properties related to scrollbar:

Property | Type | Default value | Meaning
published DecButtonWidth | Integer | 0 | Width of up/left button in a skin mode. 0 for system default.
published IncButtonWidth | Integer | 0 | Width of down/right button in a skin mode. 0 for system default.
published LargeChange | Integer | 10 | Determines how much Position changes when the user clicks the scroll bar on either side of the thumb tab.
published ScrollBarHeight | Integer |  | Height (in horizontal mode) or width (in vertical mode) of the scroll bar.
published ScrollerPosition | TSRVScrollerPosition | srvpsEnd | Scroll bar position (srvpsBegin – top/left, srvpsEnd – bottom/right)
published ScrollingDelay | Integer | 100 | Defines a scrolling speed (interval between scrolling events)
published SmallChange | Integer | 1 | Determines how much the scrollbar Position changes when the user clicks the arrow buttons on the scroll bar.

Published properties related to skins:

Property | Type | Default value | Meaning
published SkinManager | TSRVSkinManager |  | Inherited. A link to a skin manager component.
published SkinSchemeIndex | Integer | 0 | Inherited. Index in SkinManager.CurrentSkin.BoxSchemes, defines the appearance of the whole control.
published ScrollBarSkinSchemeIndex | Integer | 0 | Index in SkinManager.CurrentSkin.HorizontalScrollBarSchemes (or VerticalScrollBarSchemes in a vertical mode), defines the appearance of scrollbar.
published ItemSkinSchemeIndex | Integer | 0 | Index in SkinManager.CurrentSkin.BoxSchemes, defines the appearance of each item.
published ButtonSkinSchemeIndex | Integer | 0 | Index in SkinManager.CurrentSkin.BoxSchemes, defines the appearance of closing buttons.

Events

type

TSRVCloseImageScrollEvent = procedure(Sender: TSRVImagesScroll; ItemIndex : Integer;

var CanClose : Boolean) of object;

TSRVImageScrollMoveEvent = procedure(Sender: TSRVImagesScroll; NewImageIndex, OldImageIndex : Integer) of object;

TSRVDrawImageScrollEvent = procedure(Sender: TSRVImagesScroll; Canvas : TCanvas;

ARect, PaintRect : TRect; State : TSRVDrawStates; var DoDefault : Boolean) of object;

TSRVDrawImageScrollItemEvent = procedure(Sender: TSRVImagesScroll; Canvas : TCanvas;

ARect, PaintRect : TRect; ItemIndex : Integer; State : TSRVDrawStates;

var DoDefault : Boolean) of object;

OnChange: TNotifyEvent occurs after a new item is selected.

OnItemMove: TSRVImageScrollMoveEvent occurs when two items exchange their places as a result of item moving. Similar to OnMoveTab for TSRVTabSet.

OnCloseItem : TSRVCloseImageScrollEvent occurs when the user attempts to close an item.

OnDrawBorder, OnDrawBackground, OnDrawItem, OnDrawCloseButton: TSRVDrawImageScrollEvent allow custom drawing for the corresponding objects. Canvas – a canvas where to draw. ARect – a rectangle defining the position of the object to draw. APaintRect – a rectangle that needs to be redrawn; you can use this parameter to optimize drawing. State – a set describing the current object state. Set DoDefault to False to prevent the default drawing of this object.

Painting

Caption is aligned according to Alignment. CaptionOffset shifts the text (to the right, if Alignment=taLeftJustify, or to the left, if Alignment=taRightJustify). Caption is placed vertically at the top.

Background is drawn using Color property.

Border is drawn using BorderColor, BorderWidth and CornersOffset properties (even in a skin mode).

If SkinManager is assigned, the control is drawn using SkinManager.CurrentSkin.BoxSchemes[SkinSchemeIndex].

Example:


TSRVLabel

SRVLabel TSRVLabel

TSRVLabel is a control displaying text.

Unit SRVLabel;

Syntax

TSRVLabel = class(TSRVGraphicControl);

Hierarchy

TObject

TPersistent

TComponent

TControl

TGraphicControl

TSRVGraphicControl

Properties and events

This component publishes the following properties inherited from TSRVGraphicControl:

· Alignment
· AutoSize
· BackgroundColor
· ForegroundColor
· DrawOnPrint;
· SkinManager;
· SkinSchemeIndex;
· properties inherited from TGraphicControl.

Painting

This component displays text specified in Caption. This component is transparent. ForegroundColor is a text color, BackgroundColor is a text shadow color. A shadow is shifted by Offset. The caption is aligned according to Alignment. The control size is set automatically, if AutoSize=True.

If SkinManager is assigned, a border is drawn using SkinManager.CurrentSkin.BoxSchemes[SkinSchemeIndex].

Example:


TSRVListBox

SRVListBox TSRVListBox

Use TSRVListBox to display a scrollable list of items. Items can have captions, images, check boxes. A list can be hierarchical.

Unit SRVListBox;

Syntax

TSRVListBox = class(TSRVCustomListBox)

Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TSRVWinControl

TSRVCustomListBox

Properties and events

This component publishes public properties inherited from TSRVCustomListBox.

To prevent flickering, assign DoubleBuffered=True if the list box is placed on the form (not necessary, if inserted in TSRichViewEdit control).

Painting

If SkinManager is assigned:

· the control is drawn using SkinManager.CurrentSkin.BoxSchemes[SkinSchemeIndex];
· each item is drawn using SkinManager.CurrentSkin.BoxSchemes[ItemSkinSchemeIndex];
· a scrollbar is drawn using SkinManager.CurrentSkin.VerticalScrollBarSchemes[ScrollBarSkinSchemeIndex].

Example:


TSRVMemo

srvmemo TSRVMemo

TSRVMemo is a multiline plain-text edit control.

Unit SRVMemo;

Syntax

TSRVMemo = class(TSRVEdit)

Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TSRVWinControl

TSRVEditControl

TSRVEdit

Properties and events

New published properties:

Property | Type | Default value | Meaning
published Alignment | TAlignment | taLeftJustify | Text alignment
published ScrollBars | TScrollStyle | ssNone | Shows/hides scrollbars
published WantReturns | Boolean | True | Allows accepting or ignoring Enter keys
published WantTabs | Boolean | False | Reserved for future use. Please do not change.
published WordWrap | Boolean | True | Disables/enables automatic line wrapping

New public properties:

Property | Type | Initial value | Meaning
Lines | TStings |  | Returns text lines

All other properties, methods and events are derived from TSRVEdit.


TSRVPaintBox

Srvpaintbox TSRVPaintBox

TSRVPaintBox provides a canvas that applications can use for rendering an image.

Unit SRVPaintBox;

Syntax

TSRVPaintBox = class(TSRVCanvasControl);

Hierarchy

TObject

TPersistent

TComponent

TControl

TGraphicControl

TSRVCanvasControl

Properties and events

This component publishes the following properties inherited from TSRVCanvasControl:

· SkinManager;
· SkinSchemeIndex;
· DrawOnPrint;
· properties inherited from TGraphicControl.

Painting

1) Caption is drawn at the position Alignment using Font.
2) OnPaint event occurs (see TSRVCanvasControl). Write an OnPaint event handler to draw the image of the paint box.
3) If SkinManager is assigned, a border is drawn using SkinManager.CurrentSkin.BoxSchemes[SkinSchemeIndex].

Example (Caption is empty; the text, the ellipse, the red rectangle are drawn in OnPaint):


TSRVPanel

SRVPanel TSRVPanel

TSRVPanel implements a generic panel control. You can also use panels to group controls together. This component is similar to TSRVGroupBox.

Unit SRVPanel;

Syntax

TSRVPanel = class(TSRVCustomControl)

Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TCustomControl

TSRVCustomControl

Properties and events

This component publishes the following properties inherited from TSRVCustomControl:

· Alignment (default value is taCenter);
· DrawOnPrint;
· SkinManager;
· SkinSchemeIndex;
· Color (default value $00B8D8D7);
· properties inherited from TCustomControl.

New published properties:

Property | Type | Default value | Meaning
published BorderColor | TColor | $00B8D8D7 | Border color
published BorderWidth | Integer | 1 | Border width
published CaptionOffset | Integer | 10 | Value in range 1..30. A distance from the border to the caption
published CornersOffset | Integer | 10 | Value in range 1..30. Defines how much border corners are rounded

Painting

Caption is aligned horizontally according to Alignment. CaptionOffset shifts the text (to the right, if Alignment=taLeftJustify, or to the left, if Alignment=taRightJustify). Caption is placed vertically in the middle.

Background is drawn using Color property.

Border is drawn using BorderColor, BorderWidth and CornersOffset properties (even in a skin mode).

If SkinManager is assigned, the control is drawn using SkinManager.CurrentSkin.BoxSchemes[SkinSchemeIndex].

Example:


TSRVRadioButton

SRVRadioButton TSRVRadioButton

Radio buttons present a set of mutually exclusive options to the user; that is, only one radio button in a set can be selected at a time.

Unit SRVRadioButton;

Syntax

TSRVRadioButton = class(TSRVCustomControl)

Hierarchy

TObject

TPersistent

TComponent

TControl

TWinControl

TCustomControl

TSRVCustomControl

Properties and events

This component publishes the following properties inherited from TSRVCustomControl:

· Alignment;
· ButtonSkinSchemeIndex;
· DrawOnPrint;
· SkinManager;
· SkinSchemeIndex;
· properties inherited from TCustomControl.

New published properties:

Property | Type | Default value | Meaning
published Checked | Boolean | False | Determines whether the option represented by the radio button is selected.

Painting

A position of the circle and Caption depends on Alignment:

· taLeftJustify: the circle and the caption is aligned to the left, the circle is to the left of the caption;
· taRightJustify: the circle and the caption is aligned to the right, the circle is to the right of the caption;
· taCenter: the circle is in the middle, the caption is aligned to the left.

If SkinManager is assigned, the control is drawn using SkinManager.CurrentSkin.BoxSchemes[SkinSchemeIndex], and the circle is drawn using SkinManager.CurrentSkin.BoxSchemes[ButtonSkinSchemeIndex].

Example:


New in v6.0

Compatibility issues

· Since this version, TSRichViewEdit must be formatted by its method Format. You cannot format it by formatting RichViewEdit, RVHeader and RVFooter, or by calling SetRVMargins.
· Headers and footers are stored in Subdocuments. RVHeader and RVFooter are used only for editing Subdocuments.
· It's not necessary to call UpdateNote or UpdateNoteEx after inserting a note or a text box.
· The following properties of TSRVViewProperty are removed: HeaderTitle, FooterTitle, MainTitle. They are replaced with Texts.
· When adding a page break between table rows, TSRichViewEdit reserves space for table borders (previously, they might be truncated); so documents containing tables may be paginated differently.
· A different font is used in a zooming panel inside TSRichViewEdit: TSRichViewEdit.ViewProperty.ZoomPanelFont (TSRichViewEdit.Font was used in previous versions)

Changes

TSRichViewEdit allows editing sidenotes (notes in a floating box) and text box items.

Different headers and footers for the first page, for odd and even pages. Headers and footers are are stored in Subdocuments. RVHeader and RVFooter are used only for editing Subdocuments.

Smooth image scaling. In addition to images inside documents, TSRichViewEdit.BackgroundProperty.Picture is scaled when displayed stretched.

rvoHideReadOnlyCaret option in TSRichViewEdit.RVEditorOptions is supported.

Accurate drawing of table borders in places where a table is split across pages.

New properties of TSRichViewEdit.ViewProperty: ZoomPanelFont and IconStyle.

New methods of TSRichViewEdit: SetIntPropertyEd, SetFloatPropertyEd, Reformat.

New properties of TSRichViewEdit: CanUpdatePosition, CurrentNoteParentEditor.

New events of TSRichViewEdit: OnCaretMoving, OnResizing

Touch screen support: panning in all visual components, two finger zooming and selection handles in TSRichViewEdit.

Changes in actions

TsrvActionPageSetup, TsrvActionPageFormat, TsrvActionCustomOrientation now applies changes as editing operations (undoable).

New actions:

· TsrvActionInsertSidenote
· TsrvActionInsertTextBox

TsrvActionEditNote and TsrvActionReturnToNote support sidenotes and text box items.


New in v5.0

Compatibility issues

TSRichViewEdit.CurControl now works according to the documentation: this is a focused control inside TSRichViewEdit. Previously, this property may be changed to the control at the position of the caret. Use the new event OnChangeCurrentControl to detect when this property is changed.

TSRichViewEdit.ScrollToItem has new parameters. They are optional, but for old versions of C++Builder they must be specified.

A default value for TSRVToolBar.Color and TSRVToolWindow.Color is changed (from clWhite to clWindow)

In the new version, pages can be arranged in columns. To return the old layout (one page in a row), you can assign TSRichViewEdit.ViewProperty.MaxPageColCount = 1.

TSRichViewEdit.ViewProperty.ZoomPercent can be changed only in the range TSRichViewEdit.ViewProperty.ZoomMin..ZoomMax.

The following code is not needed an must be removed from existing projects:

RVA_GetRichViewEditFromPopupComponent :=

SRVGetRichViewEditFromPopupComponent;

RVA_GetRichViewEdit := SRVGetRichViewEdit

Style templates

New properties of TSRichViewEdit: UseStyleTemplates and StyleTemplateInsertMode.

If UseStyleTemplates=True, TsrvActionInsertFootnote formats note characters using 'footnote reference' (or, if it does not exist, make it superscript like before), footnote text using 'footnote text' (or, if it does not exist, uses TsrvActionInsertFootnote.Font like before).

TsrvActionInsertEndnote uses 'endnote reference' and 'endnote text' styles.

Simplification

You can assign TSRichViewEdit component to Control property of actions inherited from TrvAction (previously, only TRichViewEdit could be assigned). This assignment can be made at a design time.

Font combo-boxes (TRVFontComboBox, TRVFontSizeComboBox, TRVFontCharsetComboBox) do not require additional code any more. They work automatically, if TSRichViewEdit control is assigned to their Editor property (TrvActionFontEx action must be assigned to their ActionFont property as well).

You do not need to call the following code any more:

· RVA_GetRichViewEditFromPopupComponent := SRVGetRichViewEditFromPopupComponent;
· RVA_GetRichViewEdit := SRVGetRichViewEdit;
· SRichViewEdit1.SetRVMargins in TRVAControlPanel.OnMarginsChanged

Animation

TSRichViewEdit can play animated (gif) images. Animation is played in ActiveEditor. New AnimationMode property.

Zooming and page arrangement

TSRichViewEdit can display a zooming panel, if ViewProperty.ZoomPanelVisible=True.

In the new version, pages can be arranged in columns. TSRichViewEdit.ViewProperty.MaxPageColCount specifies the maximal count of columns.

Page layout

TSRichViewEdit.PageProperty.MirrorMargins allow exchanging left and right margins on even pages.

"Smart popups"

"Smart popups" are buttons that can be displayed for the current (at the position of the caret) item. New SmartPopupProperties, SmartPopupVisible property and OnSmartPopupClick event.

Other changes

New optional parameters for TSRichViewEdit.ScrollToItem. New ScrollCaretToCenter method.

New AlignButton and Indent properties of TSRVToolBar.

New TSRichViewEdit.OnPrinting event.


New in v4.0

Compatibility issues

· The type of Sender parameter was changed from TSRichViewEdit to TCustomRichViewEdit for TSRichViewEdit.OnStyleConversion and OnParaStyleConversion events.
· Two new parameters are added to TSRichViewEdit.OnPaintPage: Prepaint and Printing.
· A new parameter is added to TSRichViewEdit.OnPaint: PaintRect.
· The user can zoom the editor in/out using Ctrl + mouse wheel. So, if you assume that the editor has the fixed values of TSRichViewEdit.ViewProperty.ZoomPercent and ViewProperty.ZoomMode, assign ViewProperty.MouseWheelZoom = False.
· TSRichViewEdit.ViewProperty.HeaderFooterShade is renamed to ViewProperty.MainDocumentShade. ViewProperty.HeaderFooterShade now has a different meaning.
· TSRichViewEdit.PageProperty.PageWidth and PageHeight do not depend on the document display modes any more. Properties of the same names were added in TSRichViewEdit.ViewProperty.

Units of measurement

All properties and parameters measured in TSRichViewEdit.UnitsProgram have changed their types from Extended to TRVLength. At design time, you can see units of measurement for these properties in the Object Inspector.

By default, properties of all RVStyles in TSRichViewEdit are measured in pixels. To convert them to twips, call TSRichViewEdit.ConvertToTwips.

TsrvActionPageSetup displays values in TRVAControlPanel.UnitsDisplay, not in TSRichViewEdit.UnitsProgram.

To do: a precision of drawing and printing is still up to one screen pixel. A higher precision is planned in newer version.

Incremental printing

TSRichViewEdit has new properties: MinPrintedItemNo and MaxPrintedItemNo. If these properties define a subrange of items, only this subrange (and only the pages containing it) is printed.

These properties allow implementing an incremental printing: when the next portion of the document is ready, it can be printed below the previously printed fragment. This feature can be used for printing accounting journals, logs, etc.

New properties and methods

New properties:

· TSRichViewEdit.BackgroundProperty.GlobalPageBackgroundColor allows to define document background color without saving it in RVF files.
· TSRichViewEdit.ViewProperty.MouseWheelZoom allows to turn off a mouse wheel zooming
· TSRVSkinManager.Skins[].BoxSchemes defines schemes for applying skin elements to rectangles (such as items of a list box)
· TSRichViewEdit.ViewProperty: MainPen, MainTitle, MainTitleColor, MainTitleFont allow drawing borders and label for the main document (like it is done for a header and a footer).
· TSRichViewEdit.ViewProperty: PageWidth, PageHeight return page size as it is shown on the screen.

New methods of TSRichViewEdit:

· GetPageNo returns the page index for the specified position in the document.
· GetItemAt returns the item at the specified coordinates.
· Clear, Format (not new but improved) clears and format the editor completely, including header and footer
· GetFirstVisiblePage, GetLastVisiblePage allow to get a range of visible pages (if a free page positioning mode is not used)

New properties of TSRVScrollBar:

· UseXPThemes allows/disallows using Windows themes (visual styles)
· Flat makes the scrollbar look flat.

Modified methods of TSRichViewEdit:

GetItemPages, GetItemBounds, GetItemBounds100, GetItemCoords100 support item parts, so they can return more precise information.

Advanced printing in TSRVPrint

New PrintMode: srvpGrid. It allows printing several pages on one paper sheet.

Footnotes and endnotes

TSRichViewEdit can display and edit footnotes and endnotes.

New properties related to footnotes and endnotes:

· RVNote
· CurrentNote

New methods:

· StartEditNote,
· ReturnToNote,
· UpdateNote (is obsolete in version 6.0).

Additional information can be found in overview.

Other features

Support of "keep with next" and "keep lines together" properties of paragraph style is restored (it was disabled in v3.0)

New TSRichViewEdit.ViewProperty.AutoVScrollBarPosition property controls the position of vertical scrollbar for right-to-left documents.

Actions

New actions:

TsrvActionPreview switches editing and preview modes.

TsrvActionThumbnails shows/hides page thumbnails.

TsrvActionLayoutDraft switches the editor to a draft layout.

TsrvActionLayoutWeb switches the editor to a web layout.

TsrvActionLayoutPrint switches the editor to a print layout.

TsrvActionZoom applies the specified zooming percent to the editor.

TsrvActionZoomPageWidth zooms the editor to fit the page width in the editor width.

TsrvActionZoomFullPage zooms the editor to fit the full page in the editor.

TsrvActionOrientationPortrait changes page orientation to "portrait".

TsrvActionOrientationLandscape changes page orientation to "landscape".

TsrvActionPageFormat changes page size.

TsrvActionEditHeader starts editing a page header.

TsrvActionEditFooter starts editing a page footer.

TsrvActionEditMain starts editing the main document.

TsrvActionInsertFootnote inserts a footnote.

TsrvActionInsertEndnote inserts an endnote.

TsrvActionEditNote starts editing a footnote/endnote.

TsrvActionReturnToNote moves the caret to the parent footnote/endnote.

Changes in actions:

pagesetup TsrvActionPageSetup can change HeaderY and FooterY properties.

Localization procedures for the ScaleRichView actions.

SRVControls

New controls: TSRVListBox, TSRVComboBox, TSRVImagesScroll.

TSRVEdit can show suggestions on editing.

New help topics about SRVControls.


New in v3.0

Compatibility issues

Related to header and footer

Previously, TSRichViewEdit control contained only one RichViewEdit control (RichViewEdit). Now, there are three of them: RichViewEdit, RVHeader and RVFooter. All of them can be edited. All editing operations must be applied to ActiveEditor, not RichViewEdit. However, file saving and loading operations still must be called for RichViewEdit.

Before loading a file, you need to clear not only RichViewEdit, but also header and footer (loading RVF or RTF does it automatically, but loading text does not).

After loading a file, you need to format all editors:

SRichViewEdit1.RVHeader.Clear;

SRichViewEdit1.RVFooter.Clear;

SRichViewEdit1.RichViewEdit.Clear;

SRichViewEdit1.RichViewEdit.LoadRTF(FileName);

SRichViewEdit1.RVHeader.Format;

SRichViewEdit1.RVFooter.Format;

SRichViewEdit1.SetRVMargins;

(update: in newer version, you can use a simpler code:

SRichViewEdit1.Clear;

SRichViewEdit1.RichViewEdit.LoadRTF(FileName);

SRichViewEdit1.Format;

update 2: since version 6, you must use TSRichViewEdit.Clear and TSRichViewEdit.Format)

)

Alternatively, you can hide header and footer using TSRVPageProperty's HeaderVisible and FooterVisible properties.

The following events have TRichViewEdit control in Sender parameter: OnCurTextStyleChanged, OnCurParaStyleChanged, OnCaretMove (previously, it was TSRichViewEdit). Now all events of TNofifyEvent type have RichViewEdit in Sender parameter, so you can distinguish if it was called from RichViewEdit, RVHeader or RVFooter.

In the new version, ConvertRVToSRV, ConvertSRVToRV, GetCurrentLineCol methods work for ActiveEditor instead of RichViewEdit.

Formatting

A new text formatting procedure is used, so existing documents may look not exactly like before.

The following properties of TSRVViewProperty are renamed:

· BoundTextPen rarr MarginsPen
· BoundTextVisible rarr MarginsRectVisible

New components:

srvskinmanager TSRVSkinManager

srvtabset TSRVTabSet

srvscrollbar TSRVScrollBar

Header and footer

Two new properties of TSRichViewEdit control return TRichViewEdit controls used for editing/displaying header and footer: RVHeader, RVFooter.

ActiveEditor returns the currently edited control (see the compatibility issues above). OnChangeActiveEditor event occurs when it changed.

New properties of TSRVPageProperty:

· HeaderY, FooterY
· HeaderVisible, FooterVisible

New properties of TSRVViewProperty:

· HeaderTitle, FooterTitle
· HeaderPen, FooterPen
· HeaderTitleFont, FooterTitleFont
· HeaderTitleColor, FooterTitleColor

New actions

TsrvActionQuickPrint

print TsrvActionPrint

pagesetup TsrvActionPageSetup

Other changes

New properties and methods of TSRichViewEdit:

· GetPageStartItemNo
· SkinManager, HScrollBarSchemeIndex, VScrollBarSchemeIndex
· new optional parameter in SetRVMargins

New properties of TSRVBackgroundProperty:

· TransparentColor

Headings

· FindNextHeading/FindPriorHeading search for headings.
· NextCurHeading/PriorCurHeading move the caret to the next/previous heading.


New in v2.0

New in version 2.0

 Top Previous

Compatibility issues

In several methods, the first letter is capitalized.

The properties related to margins are renamed. The pattern is "PageLeft rarr LeftMargin". This renaming includes both properties of TSRichViewEdit (rarely used outside the component code) and properties of TSRichViewEdit.PageProperty:TSRVPageProperty:

· PageLeft rarr LeftMargin
· PageTop rarr TopMargin
· PageRight rarr RightMargin
· PageBottom rarr BottomMargin

The properties related to page size are renamed. The pattern is "FormatWidth rarr PageWidth". This renaming includes both properties of TSRichViewEdit (rarely used outside the component code) and properties of TSRichViewEdit.PageProperty:

· FormatWidth rarr PageWidth
· FormatHeight rarr PageHeight

Other TSRichViewEdit.PageProperty properties and methods are renamed:

· BreakPage rarr PageViewMode
· FormatMode rarr PageFormat
· ConvertPageSizeToFormatMode rarr ConvertPageSizeToPageFormat
· getPaperSize rarr ConvertPageFormatToPageSize

All properties, methods and events related to table icons (rectangles displayed at the top left corners of tables) are renamed. The pattern is "HintTable rarr TableIcon":

properties of TSRichViewEdit:

· getHintTableItem rarr GetTableIconItem
· getHintTableRVData rarr GetTableIconRVData
· OnHintTableClick rarr OnTableIconClick

properties of TSRVViewProperty:

· HintTableTimeDelay rarr TableIconDelay
· HintTablePopupMenu rarr TableIconPopupMenu
· HintTableVisible rarr UseTableIcons

In addition, the following properties of TSRVViewProperty are renamed:

· HintPage rarr ShowScrollHint

The following methods and events of TSRichViewEdit are renamed:

· calculatePosPages rarr CalculateAllPagePositions
· calculatePosPagesFor rarr CalculatePagePosition
· RectPage rarr GetPageClientRect
· getPageMousePos rarr GetPageAt
· OnCurParaStyleChange rarr OnCurParaStyleChanged

The following properties of TSRVBackgroundProperty are renamed:

· PictureType rarr PicturePosition

The following changes were made in TSRVToolButton:

· AlwaysUp property is removed
· AllowAllUp property is added (now the behavior of these buttons is identical to TSpeedButtons)

The following properties and methods of TSRVPrint are renamed:

· FormatMode rarr PageFormat
· PaperCodeToFormatPaper rarr PaperCodeToPageFormat
· UpdatePage rarr Update

The following methods of TSclRVRuler are renamed:

getPageProperty rarr GetPageProperties

setPageProperty rarr SetPageProperties

The following properties of TSRVPreview are changed:

· PageBorderColor rarr FrameBorderColor
· PageBorderWidth rarr FrameBorderWidth
· PageShadowColor, PageShadowWidth are removed (as well as "shadows" between frames)
· PageBoundsColor rarr PageBorderColor
· PageBoundsWidth rarr PageBorderWidth
· PageBoundsStyle rarr PageBorderStyle
· BorderColor, BorderWidth, ShadowColor, ShadowWidth are added.

The following properties, methods and events of TSRVPageScroll are changed:

· WidthBreakPage rarr PageBreakWidth
· HeightBreakPage rarr PageBreakHeight
· ShadowOff rarr ShadowWidth
· CountPagesCache rarr CachedPagesCount
· LimitCacheUpdate rarr CacheScrollLimit
· GetPageNoToXY rarr GetPageAt
· OnDrawSelect rarr OnDrawSelectedPage
· OnDrawPageBorder's parameters are changed
· UpdateCache is made public
· the component highlights the page containing the caret, instead of the first page visible in TSRichViewEdit.

Other changes

Unnecessary and non working methods and events were removed (or made private).

TSRVFormatMode type is renamed to TSRVPageFormat. TSRVPicture type is renamed to TSRVPicturePosition.

Parameters of TSRichViewEdit. OnGetPagePos event are changed.

The way how TSRVPrint.UsePhysicalOffsets is processed is changed.

New

New printing modes in TSRVPrint, see PrintMode property.

New method TSRichViewEdit.GetItemPages returns pages containing the specified item.

New method TSRichViewEdit.DeletePage deletes a page as an editing operation.

New version is TSRVToolWindow.Execute simplifies calling window which is invoked with a button.

Many small tweaks and fixes.


TDBSRichViewEdit Events

Properties Events | Legend

 Top

In TDBSRichViewEdit

Published OnLoadCustomFormat

Published OnLoadDocument

Published OnNewDocument

Published OnSaveCustomFormat

Derived from TSRichViewEdit

Published OnCaretGetOut

Published OnCaretMove

Published OnCaretMoving

Published OnChange

Published OnChangeActiveEditor

Published OnChangeCurrentControl

Published OnChangeViewModeAfter

Published OnChangeViewModeBefore

Published OnChanging

Published OnCheckControl

Published OnCheckpointVisible

Published OnClickPage

Published OnContextPopup

Published OnControlAction

Published OnCopy

Published OnCurParaStyleChanged

Published OnCurrentPageChange

Published OnCurTextStyleChanged

Published OnDrawHyperlink

Published OnDropFiles

Published OnFullRedraw

Published OnGetPagePos

Published OnHMenuClickButton

Published OnHMenuEnterButton

Published OnHScrolled

Published OnHTMLSaveImage

Published OnImportPicture

Published OnItemAction

Published OnItemHint

Published OnItemResize

Published OnItemTextEdit

Published OnJump

Published OnMarginsChanged

Published OnMessageControl

Published OnOleDragEnter

Published OnOleDragLeave

Published OnOleDragOver

Published OnOleDrop

Published OnPageCountChanged

Published OnPageFormatChanged

Published OnPageScrolled

Published OnPaint

Published OnPaintComponent

Published OnPaintPage

Published OnParaStyleConversion

Published OnPaste

Published OnPrinting

Published OnProgress

Published OnReadHyperlink

Published OnResize

Published OnResizing

Published OnResizeDoc

Published OnRVDblClick

Published OnRVFControlNeeded

Published OnRVFImageListNeeded

Published OnRVFPictureNeeded

Published OnRVMouseDown

Published OnRVMouseMove

Published OnRVMouseUp

Published OnRVRightClick

Published OnSaveComponentToFile

Published OnSaveHTMLExtra

Published OnSaveImage2

Published OnSaveItemToFile

Published OnSaveRTFExtra

Published OnSelect

Published OnSmartPopupClick

Published OnSpellingCheck

Published OnStyleConversion

Published OnTableIconClick

Published OnURLNeeded

Published OnVMenuClickButton

Published OnVMenuEnterButton

Published OnVScrolled

Published OnWriteHyperlink

Published OnZoomChanged

Published OnZoomViewChanged

Derived from TCustomControl

Published OnClick

Published OnDblClick

Published OnDragDrop

Published OnDragOver

Published OnEndDrag

Published OnEnter

Published OnExit

Published OnKeyDown

Published OnKeyPress

Published OnKeyUp

Published OnGesture (D2010+)

Published OnMouseMove

Published OnMouseWheelEvent

Published OnMouseWheelDown

Published OnMouseWheelUp

Published OnStartDrag


TDBSRichViewEdit Properties

Properties Events | Legend

 Top

In TDBSRichViewEdit

Published AutoDisplay

Published DataField

Published DataSource

Published ExternalRV

Published FieldFormat

Published IgnoreEscape

RichViewEdit

Derived from TSRichViewEdit

ReadOnly ActiveEditor

Published AnimationMode

Published BackgroundProperty

Published BiDiMode

ReadOnly BottomMarginPix

none CanScroll

none CanUpdate

none CanUpdatePosition

none CanUpdateMargin

Published CaretBlinkTime

ReadOnly CaretPos

Published CaretVisible

Published CPEventKind

ReadOnly CurControl

ReadOnly CurrentNote

ReadOnly CurrentNoteParentEditor

none CurrentPage

Published ExternalRV

Published ExternalRVStyle

ReadOnly FirstPageNo

Published FixMarginsMode

ReadOnly HMaxScrollPos

Published HScrollBar

Published HScrollBarSchemeIndex

none HScrollPos

ReadOnly LastPageNo

ReadOnly LeftMarginPix

Published MaxPrintedItemNo

Published MenuHButtons

Published MenuHorizontal

Published MenuVButtons

Published MenuVertical

Published MinPrintedItemNo

ReadOnly OffsetX

ReadOnly OffsetY

ReadOnly PageCount

ReadOnly PageHeightPix, PageHeight100Pix

ReadOnly PageNoMouseDown

ReadOnly PageNoMouseMove

Published PageProperty

ReadOnly PageWidthPix, PageWidth100Pix

none RangeSearch

none RangeSearchFirstY

none RangeSearchLastY

Published ReadOnly

none RichViewEdit

ReadOnly RightMarginPix

Published RTFOptions

Published RTFReadProperties

Published RVBackgroundBitmap

Published RVBackgroundStyle

Published RVColor

Published RVEditorOptions

none RVFooter

Published RVFOptions

Published RVFParaStylesReadMode

Published RVFTextStylesReadMode

none RVHeader

none RVNote

Published RVOptions

ReadOnly ScrolledPage

Published SkinManager

Published SmartPopupProperties

none SmartPopupVisible

Published StyleTemplateInsertMode

Published TabNavigation

ReadOnly TopMarginPix

Published UnitsProgram

Published UseDrawHyperlinksEvent

Published UseStyleTemplates

Published Version

Published ViewProperty

ReadOnly VMaxScrollPos

Published VScrollBar

Published VScrollBarSchemeIndex

none VScrollPos

Derived from TCustomControl

Published Align

Published Anchors

Published Constraints

Published Ctl3D

Published DragMode

Published Enabled

Published Height

Published HelpContext

Published HelpKeyword (D6+)

Published HelpType (D6+)

Published Hint

Published Left

Published Name

Published ParentCtl3D

Published ParentShowHint

Published PopupMenu

Published ShowHint

Published TabOrder

Published TabStop

Published Tag

Published Top

Published Touch (D2010+)

Published Visible

Published Width


TSRichViewEdit Events

Properties Methods Events | Legend

 Top

In TSRichViewEdit

Published OnCaretGetOut

Published OnCaretMove

Published OnCaretMoving

Published OnChange

Published OnChangeActiveEditor

Published OnChangeCurrentControl

Published OnChangeViewModeAfter

Published OnChangeViewModeBefore

Published OnChanging

Published OnCheckControl

Published OnCheckpointVisible

Published OnClickPage

Published OnContextPopup

Published OnControlAction

Published OnCopy

Published OnCurParaStyleChanged

Published OnCurrentPageChange

Published OnCurTextStyleChanged

Published OnDrawHyperlink

Published OnDropFiles

Published OnFullRedraw

Published OnGetPagePos

Published OnHMenuClickButton

Published OnHMenuEnterButton

Published OnHScrolled

Published OnHTMLSaveImage

Published OnImportPicture

Published OnItemAction

Published OnItemHint

Published OnItemResize

Published OnItemTextEdit

Published OnJump

Published OnMarginsChanged

Published OnMessageControl

Published OnOleDragEnter

Published OnOleDragLeave

Published OnOleDragOver

Published OnOleDrop

Published OnPageCountChanged

Published OnPageFormatChanged

Published OnPageScrolled

Published OnPaint

Published OnPaintComponent

Published OnPaintPage

Published OnParaStyleConversion

Published OnPaste

Published OnPrinting

Published OnProgress

Published OnReadHyperlink

Published OnResize

Published OnResizing

Published OnResizeDoc

Published OnRVDblClick

Published OnRVFControlNeeded

Published OnRVFImageListNeeded

Published OnRVFPictureNeeded

Published OnRVMouseDown

Published OnRVMouseMove

Published OnRVMouseUp

Published OnRVRightClick

Published OnSaveComponentToFile

Published OnSaveHTMLExtra

Published OnSaveImage2

Published OnSaveItemToFile

Published OnSaveRTFExtra

Published OnSelect

Published OnSmartPopupClick

Published OnSpellingCheck

Published OnStyleConversion

Published OnTableIconClick

Published OnURLNeeded

Published OnVMenuClickButton

Published OnVMenuEnterButton

Published OnVScrolled

Published OnWriteHyperlink

Published OnZoomChanged

Published OnZoomViewChanged

Derived from TCustomControl

Published OnClick

Published OnDblClick

Published OnDragDrop

Published OnDragOver

Published OnEndDrag

Published OnEnter

Published OnExit

Published OnGesture (D2010+)

Published OnKeyDown

Published OnKeyPress

Published OnKeyUp

Published OnMouseMove

Published OnMouseWheel

Published OnStartDrag


TSRichViewEdit Methods

Properties Methods Events | Legend

 Top

In TSRichViewEdit

BeginComponentsUpdate

CalculateAllPagePositions

CalculatePageCount

CalculatePagePosition

Clear

ConvertRVtoSRV

ConvertSRVtoRV

ConvertToPixels, ConvertToTwips, ConvertToDifferentUnits

Copy

Create

Cut

DeletePage

Destroy

DrawMetafile

DrawPage

EndComponentsUpdate

FindNextCheckpoint

FindNextHeading

FindNextHyperlink

FindNextItem

FindPriorCheckpoint

FindPriorHeading

FindPriorHyperlink

FindPriorItem

FirstCurPage

Format

GetCaretPosInUnits

GetCurrentLineCol

GetFirstItemVisibleRV

GetFirstVisiblePage

GetItemAt

GetItemBounds, GetItemBounds100

GetItemCoords

GetItemPages

GetLastItemVisibleRV

GetLastVisiblePage

GetLeftMarginPix, GetLeftMargin100Pix

GetPageAt

GetPageClientRect

GetPageLastItemNo

GetPageNo

GetPageStartItemNo

GetPageStartTableItem

GetPageStartTableRow

GetRightMarginPix, GetRightMargin100Pix

GetTableIconItem

GetTableIconRVData

InsertPageBreak

InZoomRect

LastCurPage

LoadRVF

LoadRVFFromStream

NextCurCheckpoint

NextCurHeading

NextCurHyperlink

NextCurItem

NextCurPage

OutZoomRect

Paste

PrintAll

PrintCurrent

PrintRange

PriorCurCheckpoint

PriorCurHeading

PriorCurHyperlink

PriorCurItem

PriorCurPage

ProcessControls

Reformat

ReturnToNote

ScrollToCaret

ScrollToItem

SelectAll

SetFloatPropertyEd

SetIntPropertyEd

SetMargin

SetMarginMM

SetMarginUnit

SetRVMargins

StartEditing

StartEditNote

UnitsPerInchH

UnitsPerInchV

UpdateBuffer, UpdateBufferAt

ZoomCanvas, RestoreCanvasZoom

ZoomRectIn, ZoomRectOut

ZoomToFullPages


TSRichViewEdit Properties

Properties Methods Events | Legend

 Top

In TSRichViewEdit

ReadOnly ActiveEditor

Published AnimationMode

Published BackgroundProperty

Published BiDiMode

ReadOnly BottomMarginPix

none CanScroll

none CanUpdate

none CanUpdatePosition

none CanUpdateMargin

Published CaretBlinkTime

ReadOnly CaretPos

Published CaretVisible

Published CPEventKind

ReadOnly CurControl

ReadOnly CurrentNote

ReadOnly CurrentNoteParentEditor

none CurrentPage

Published ExternalRV -F -H -N

Published ExternalRVStyle

Published ExternalRVStyleFooter

Published ExternalRVStyleHeader

ReadOnly FirstPageNo

Published FixMarginsMode

ReadOnly HMaxScrollPos

Published HScrollBar

Published HScrollBarSchemeIndex

none HScrollPos

ReadOnly LastPageNo

ReadOnly LeftMarginPix

Published MaxPrintedItemNo

Published MenuHButtons

Published MenuHorizontal

Published MenuVButtons

Published MenuVertical

Published MinPrintedItemNo

ReadOnly OffsetX

ReadOnly OffsetY

ReadOnly PageCount

ReadOnly PageHeightPix, PageHeight100Pix

ReadOnly PageNoMouseDown

ReadOnly PageNoMouseMove

Published PageProperty

ReadOnly PageWidthPix, PageWidth100Pix

none RangeSearch

none RangeSearchFirstY

none RangeSearchLastY

Published ReadOnly

none RichViewEdit

ReadOnly RightMarginPix

Published RTFOptions

Published RTFReadProperties

Published RVBackgroundBitmap

Published RVBackgroundStyle

Published RVColor

Published RVEditorOptions

none RVFooter

Published RVFOptions

Published RVFParaStylesReadMode

Published RVFTextStylesReadMode

none RVHeader

none RVNote

Published RVOptions

ReadOnly ScrolledPage

Published SkinManager

Published SmartPopupProperties

none SmartPopupVisible

Published StyleTemplateInsertMode

Published TabNavigation

ReadOnly TopMarginPix

Published UnitsProgram

Published UseDrawHyperlinksEvent

Published UseStyleTemplates

Published Version

Published ViewProperty

ReadOnly VMaxScrollPos

Published VScrollBar

Published VScrollBarSchemeIndex

none VScrollPos

Derived from TCustomControl

Published Align

Published Anchors

Published Constraints

Published Ctl3D

Published DragMode

Published Enabled

Published Height

Published HelpContext

Published HelpKeyword (D6+)

Published HelpType (D6+)

Published Hint

Published Left

Published Name

Published ParentCtl3D

Published ParentShowHint

Published PopupMenu

Published ShowHint

Published TabOrder

Published TabStop

Published Tag

Published Top

Published Touch (D2010+)

Published Visible

Published Width


TsrvAction Properties

Properties | Legend

 Top

In TsrvAction

Published Control

Inherited from TrvCustomAction

Published Disabled


TsrvActionCustomInsertSidenote_Properties

Properties | Legend

 Top

In TsrvActionCustomInsertSidenote

Published BoxPosition

Published BoxProperties

Published StyleTemplateName

Inherited from TsrvActionInsertNote

Published Font

Inherited from TsrvAction

Published Control

Inherited from TrvCustomAction

Published Disabled


TsrvActionCustomLayout_Events

TsrvActionCustomLayout Properties

Events | Legend

 Top

In TsrvActionCustomLayout

Published Control


TsrvActionInsertNote_Properties

Properties | Legend

 Top

In TsrvActionInsertNote

Published Font

Inherited from TsrvAction

Published Control

Inherited from TrvCustomAction

Published Disabled


TsrvActionInsertSidenote_Properties

Properties | Legend

 Top

In TsrvActionInsertSidenote

Published RefStyleTemplateName

Inherited from TsrvActionCustomInsertSidenote

Published BoxPosition

Published BoxProperties

Published StyleTemplateName

Inherited from TsrvActionInsertNote

Published Font

Inherited from TsrvAction

Published Control

Inherited from TrvCustomAction

Published Disabled


TsrvActionLayoutDraft_Properties

Properties | Legend

 Top

In TsrvActionLayoutDraft

published BoundLeftRight

Inherited from TsrvCustomActionThatNeedsDocProps

published ActionSave

Inherited from TsrvAction

Published Control

Inherited from TrvCustomAction

Published Disabled


TsrvActionLayoutPrint_Properties

Properties | Legend

 Top

In TsrvActionLayoutPrint

published BoundLeftRight

published Color

published FooterVisible

published HeaderVisible

Inherited from TsrvCustomActionThatNeedsDocProps

published ActionSave

Inherited from TsrvAction

Published Control

Inherited from TrvCustomAction

Published Disabled


TsrvActionPageFormat_Properties

Properties | Legend

 Top

In TsrvActionLayoutPrint

published PageFormat

published PageHeight

published PageWidth

published Units

Inherited from TsrvCustomActionThatNeedsDocProps

Published ActionSave

Inherited from TsrvAction

Published Control

Inherited from TrvCustomAction

Published Disabled


TsrvActionPageSetup Events

TsrvActionPageSetup Properties

Properties Events | Legend

 Top

In TsrvActionPageSetup

Published OnChange


TsrvActionPageSetup Properties

Properties Events | Legend

 Top

In TsrvActionPageSetup

Published PageFormats1..PageFormats6

Inherited from TsrvCustomActionThatNeedsDocProps

Published ActionSave

Inherited from TsrvAction

Published Control

Inherited from TrvCustomAction

Published Disabled


TsrvActionPrint Properties

Properties | Legend

 Top

In TsrvActionPrint

Published Title

Inherited from TsrvCustomActionThatNeedsDocProps

Published ActionSave

Inherited from TsrvAction

Published Control

Inherited from TrvCustomAction

Published Disabled


TsrvActionQuickPrint Properties

Properties | Legend

 Top

In TsrvActionQuickPrint

Published Title

Inherited from TsrvCustomActionThatNeedsDocProps

Published ActionSave

Inherited from TsrvAction

Published Control

Inherited from TrvCustomAction

Published Disabled


TsrvActionThumbnails_Events

Properties Events | Legend

 Top

In TsrvActionThumbnails

Published OnExecuted


TsrvActionThumbnails_Properties

Properties Events | Legend

 Top

In TsrvActionThumbnails

Published PageScroll

Inherited from TsrvAction

Published Control

Inherited from TrvCustomAction

Published Disabled


TsrvActionZoom Properties

Properties | Legend

 Top

Inherited from TsrvActionCustomZoom

Published ZoomPercent

Inherited from TsrvAction

Published Control

Inherited from TrvCustomAction

Published Disabled


TSRVBackgroundProperty Properties

Properties | Legend

 Top

In TSRVBackgroundProperty

Published ColorBegin

Published ColorEnd

Published ColorMiddle

Published FillType

Published PercentMiddle

Published Picture

Published PicturePosition

Published TransparentColor

Published Visible


TSRVCloseButton Properties

Properties | Legend

 Top

In TSRVCloseButton

published AllowCloseLastTab

published Height

published HorizontalAlign

published IndentX

published IndentY

published VerticalAlign

published Visibility

published Visible

published Width


TsrvCustomActionThatNeedsDocProps_Properties

Properties | Legend

 Top

In TsrvCustomActionThatNeedsDocProps

protected ActionSave

Inherited from TsrvAction

Published Control

Inherited from TrvCustomAction

Published Disabled


TSRVCustomPropertyTB Properties

Properties | Legend

 Top

In TSRVCustomPropertyTB

Protected BorderWidth

Protected BorderWidth

Protected ButtonHeight

Protected Buttons

Protected ButtonWidth

Protected Color

Protected ColorDisable

Protected ColorDown

Protected ColorSelect

Protected ImageList

Protected Indent

Protected PenFrame

Protected Spacer

ReadOnly SRVToolBar


TSRVPageProperty Methods

Properties Methods | Legend

 Top

In TSRVPageProperty

ConvertPageSizeToPageFormat

ConvertPageFormatToPageSize


TSRVPageProperty Properties

Properties Methods | Legend

 Top

In TSRVPageProperty

Published AutoWidth

Published BorderPen

Published BottomMargin

Published BoundLeftRight

Published CaretPen

Published FacingPages

Published FooterVisible

Published FooterY

Published HeaderVisible

Published HeaderY

Published LeftMargin

Published MaxPageBreakHeight

Published MinPageBreakHeight

Published MirrorMargins

Published Orientation

Published PageBreakHeight

Published PageFormat

Published PageHeight

Published PageNoFirst

Published PageNoFont

Published PageNoFromNumber

Published PageNoHAlign

Published PageNoVAlign

Published PageNoVisible

Published PageViewMod

Published PageWidth

Published PrintableAreaPen

Published RightMargin

Published TitlePage

Published TopMargin

Published UsePageOrders


TSRVPageScroll Events

Properties Methods Events | Legend

 Top

In TSRVPageScroll

Published OnDrawPageBorder

Published OnDrawPageNumber

Published OnDrawSelectedPage

Derived from TRVScroller

Published OnHScrolled

Published OnVScrolled

Derived from TCustomControl

Published OnDblClick

Published OnClick

Published OnDblClick

Published OnDragDrop

Published OnDragOver

Published OnEndDrag

Published OnEnter

Published OnExit

Published OnGesture

Published OnKeyPress

Published OnMouseMove


TSRVPageScroll Methods

Properties Methods Events | Legend

 Top

In TSRVPageScroll

BeginUpdate

EndUpdate

First

GetPageNoToXY

Last

Next

Prev

ScrollToPage

UpdateCache


TSRVPageScroll Properties

Properties Methods Events | Legend

 Top

In TSRVPageScroll

Published AlignText

Published AutoScrolled

Published AutoUpdate

Published BackgroundTextColor

Published CachedPagesCount

Published CacheScrollLimit

Published Columns

Published MarginHorizontal

Published MarginVertical

Published PageBorderColor

Published PageBreakHeight

Published PageBreakWidth

Published PageHeight

Published PageNoFont

Published PageNoVisible

Published PageProportions

Published PageWidth

Published ScrollType

Published SelectColor

Published ShadowColor

Published ShadowWidth

Published SRichViewEdit

Derived from TRVScroller

Published BorderStyle

ReadOnly HScrollMax

none HScrollPos

protected HScrollVisible

ReadOnly InplaceEditor (not used in this component)

none NoVScroll

protected Tracking

Published UseXPThemes

ReadOnly VScrollMax

none VScrollPos

protected VScrollVisible

Published WheelStep (D4+)

Derived from TCustomControl

Published Align

Published Anchors

Published Color

Published Constraints

protected Ctl3D

Published Height

Published HelpContext

Published Hint

protected ParentCtl3D

Published PopupMenu

Published ShowHint

Published TabOrder

Published TabStop

Published Touch (D2010+)

Published Visible

Published Width


TSRVPreview Events

Properties Methods Events | Legend

 Top

In TSRVPreview

Published OnAfterPaint

Published OnBeforePaint

Derived from TCustomRVPrintPreview

Published OnHScrolled

Published OnVScrolled

Published OnZoomChanged

Derived from TCustomControl

Published OnGesture (D2010+)


TSRVPreview Methods

Properties Methods Events | Legend

 Top

In TSRVPreview

First

Last

Next

Prev


TSRVPreview Properties

Properties Methods Events | Legend

 Top

In TSRVPreview

Published BorderColor

Published BorderWidth

Published FrameBorderColor

Published FrameBorderWidth

Published PageBorderColor

Published PageBorderStyle

Published PageBorderWidth

PageNo

Published SRVPrint

Derived from TCustomRVPrintPreview

none ClickMode

Published Color

Published MarginsPen

Published PrintableAreaPen

Published ShadowColor

Published ShadowWidth

Published ZoomInCursor

none ZoomMode

Published ZoomOutCursor

none ZoomPercent

Derived from TRVScroller

Published BorderStyle

ReadOnly HScrollMax

none HScrollPos

Published HScrollVisible

ReadOnly InplaceEditor (not used in this component)

none NoVScroll

Published Tracking

Published UseXPThemes

ReadOnly VScrollMax

none VScrollPos

Published VScrollVisible

Published WheelStep (D4+)

Derived from TCustomControl

Published Align

Published Anchors (D4+)

Published Constraints (D4+)

Published Ctl3D

Published Height

Published HelpContext

Published Hint

Published ParentCtl3D

Published PopupMenu

Published ShowHint

Published TabOrder

Published TabStop

Published Touch (D2010+)

Published Visible

Published Width


TSRVPrint Events

Properties Methods Events | Legend

 Top

In TSRVPrint

Published OnSendingToPrinter

Published OnUpdateData


TSRVPrint Methods

Properties Methods Events | Legend

 Top

In TSRVPrint

BeginUpdate

CheckMargin

EndUpdate

OptimalOrientation

PaperCodeToFormatPage

Print

PrintFrame

PrintFrames

PrintFramesEx

PrintPages

Update


TSRVPrint Properties

Properties Methods Events | Legend

 Top

In TSRVPrint

Published AutoUpdate

Published Center

Published ClipMargins

Published FrameCountX

Published FrameCountY

ReadOnly FrameHeightPix

ReadOnly FrameWidthPix

Published IntegerCount

ReadOnly OffXPix

ReadOnly OffYPix

Published Orientation

Published PageColCount

Published PageFormat

Published PageHeightPix

Published PageRowCount

Published PageWidthPix

Published PrintMode

ReadOnly RealHeight

ReadOnly RealWidth

Published ScaleImage

Published SRichViewEdit

ReadOnly TotalFrameHPix

ReadOnly TotalFrameWPix

Published UsePhysicalOffsets

Derived from TComponent

Published Name

Published Tag


TSRVPropertyTBH Properties

Properties | Legend

 Top

In TSRVPropertyTBH

Published Align

Published Visible

Derived from TSRVCustomPropertyTB

Published BorderWidth

Protected ButtonHeight

none Buttons

Published ButtonWidth

Published Color

Published ColorDisable

Published ColorDown

Published ColorSelect

Published ImageList

Published PenFrame

Published Spacer


TSRVPropertyTBV Properties

Properties | Legend

 Top

In TSRVPropertyTBV

Published Align

Published Visible

Derived from TSRVCustomPropertyTB

Published BorderWidth

Published ButtonHeight

none Buttons

Protected ButtonWidth

Published Color

Published ColorDisable

Published ColorDown

Published ColorSelect

Published ImageList

Published PenFrame

Published Spacer


TSRVScrollBar Events

Properties Events | Legend

 Top

In TSRVScrollBar

published OnDrawArea

published OnDrawBorder

published OnDrawDecButton

published OnDrawIncButton

published OnDrawThumbTab

Inherited from TScrollBar

published OnChange

published OnContextPopup

published OnDragDrop

published OnDragOver

published OnEndDock

published OnEndDrag

published OnEnter

published OnExit

published OnKeyDown

published OnKeyPress

published OnKeyUp

published OnScroll

published OnStartDock

published OnStartDrag


TSRVScrollBar Properties

Properties Events | Legend

 Top

In TSRVScrollBar

published DecButtonWidth

published Flat

published FocusBlinkDelay

published IncButtonWidth

published PageSize

published Position

published ScrollingDelay

published SkinManager

published SkinSchemeIndex

published UseXPThemes

Inherited from TScrollBar

published Align

published Anchors

published BiDiMode

published Color

published Constraints

published Ctl3D

published DragCursor

published DragKind

published DragMode

published Enabled

published Kind

published LargeChange

published Max

published Min

published ParentBiDiMode

published ParentCtl3D

published ParentShowHint

published PopupMenu

published ShowHint

published SmallChange

published TabOrder

published TabStop

published Visible


TSRVSkin Properties

Properties | Legend

 Top

In TSRVSkin

published BoxSchemes

published Elements

published Fonts

published HorizontalScrollBarSchemes

published HorizontalTabSetSchemes

published Name

published VerticalScrollBarSchemes

published VerticalTabSetSchemes


TSRVSkinManager Properties

Properties | Legend

 Top

In TSRVSkinManager

ReadOnly CurrentSkin

published SkinIndex

published Skins


TSRVTabItem Properties

Properties | Legend

 Top

In TSRVTabItem

published Enabled

published ImageIndex

published SkinFontIndex

published SkinSchemeIndex

published Tag

published Text

published Visible


TSRVTabSet Events

Properties Methods Events | Legend

 Top

In TSRVTabSet

published OnChange

published OnCloseTab

published OnDrawBackground

published OnDrawBorder

published OnDrawCloseButton

published OnDrawDecButton

published OnDrawIncButton

published OnDrawTab

published OnMoveTab

Inherited from TCustomControl

published OnClick

published OnEnter

published OnExit

published OnMouseDown

published OnMouseMove

published OnMouseUp

published OnKeyDown

published OnKeyUp


TSRVTabSet Methods

Properties Methods Events | Legend

 Top

In TSRVTabSet

ScrollToTab


TSRVTabSet Properties

Properties Methods Events | Legend

 Top

In TSRVTabSet

published AutoTabWidth

published CanMoveTabs

published CloseButton

ReadOnly FirstTabIndex

published ImageList

published Indent

published Kind

ReadOnly LastTabIndex

published Margins

published MaxTabSize

published MinTabSize

published MirrorText

published ScrollButtonWidth

published ScrollerMenu

published ScrollerPosition

published ScrollingDelay

published SkinManager

published SkinSchemeIndex

published Spacings

published TabHeight

none TabIndex

published Tabs

published TextAlignH

published TextAlignV

Inherited from TCustomControl

published Align

published Anchors

published Color

published Constraints

published Cursor

published Enabled

published Font

published Height

published Hint

published Left

published PopupMenu

published ShowHint

published TabStop

published Top

published Width


TSRVToolBar Events

Properties Events | Legend

 Top

In TSRVToolBar

Published OnClickButton

Published OnEnter

Published OnEnterButton

Published OnLeave


TSRVToolBar Properties

Properties Events | Legend

 Top

In TSRVToolBar

Published AlignButton

Published AlignText

Published AutoSize

Published BorderWidth

Published ButtonCol

Published ButtonHeight

Published Buttons

Published ButtonWidth

Published Color

Published ColorDisable

Published ColorDown

Published ColorSelect

Published HintCancel

Published HintFont

Published HintHeight

Published ImageList

Published Indent

Published PenFrame

Published Spacer

Derived from TCustomControl

Published Align

Published Anchors

Published Cursor

Published Height

Published HelpContext

Published HelpKeyword (D6+)

Published HelpType (D6+)

Published Hint

Published Left

Published Name

Published Tag

Published Top

Published Width


TSRVToolButton Properties

Properties | Legend

 Top

In TSRVToolButton

Published AllowAllUp

Published Caption

Published Down

Published Enabled

Published GroupIndex

Published Hint

Published ImageIndexDisable

Published ImageIndexDown

Published ImageIndexMove

Published ImageIndexNormal

Published ShowHint

Published Tag

Published Visible


TSRVToolWindow Events

Properties Methods Events | Legend

 Top

In TSRVToolWindow

Published OnClickButton

Published OnEnter

Published OnEnterButton

Published OnLeave

Published OnSelectEvent


TSRVToolWindow Methods

Properties Methods Events | Legend

 Top

In TSRVToolWindow

Execute


TSRVToolWindow Properties

Properties Methods Events | Legend

 Top

In TSRVToolWindow

Published AlignText

Published BorderWidth

Published ButtonCol

Published ButtonHeight

Published Buttons

Published ButtonWidth

Published Color

Published ColorDisable

Published ColorDown

Published ColorSelect

Published HintCancel

Published HintFont

Published HintHeight

Published ImageList

Published PenFrame

Published Spacer

Derived from TComponent

Published Name

Published Tag


TSRVViewProperty Properties

Properties | Legend

 Top

In TSRVViewProperty

Published AlignPageH

Published AlignPageV

Published AutoVScrollBarPosition

Published FooterPen

Published FooterTitleColor

Published FooterTitleFont

Published FreePosPage

Published HeaderFooterShade

Published HeaderPen

Published HeaderTitleColor

Published HeaderTitleFont

Published HintFont

Published HintPrefixText

Published IconStyle

Published MainDocumentShade

Published MainPen

Published MainTitleColor

Published MainTitleFont

Published MarginsPen

Published MarginsRectVisible

Published MaxPageColCount

Published MouseWheelZoom

ReadOnly PageHeight

ReadOnly PageWidth

Published ShowScrollHint

Published TableIconDelay

Published TableIconPopupMenu

Published Texts

Published UseTableIcons

Published ViewMode

Published WheelStep

Published WorkArea

Published ZoomMenu

Published ZoomMin, ZoomMax

Published ZoomMode

Published ZoomModeEdit

Published ZoomModeIN

Published ZoomModeOUT

Published ZoomPanelFont

Published ZoomPanelVisible

Published ZoomPercent

Published ZoomPercentEdit

Published ZoomPercentIN

Published ZoomPercentOUT