Box (Box Text)


Applicability:

Ribbon Group:

Create-Text

Associated commands:


Description:

 Box creates a BoxText item, which may consist of one or more lines of text. Select the command, then type the required text into the dialog, using the Enter key to start a new line. When you have finished, click on OK, then click on a point on the screen where you want to locate the text. This point then becomes the current alignment point, and the text is justified both horizontally and vertically about the alignment point.

BoxText items are positioned within a rectangle which has "handles" at each corner, centrally on each edge, and at the centroid of the box. The BoxText item text is justified within this box by one of these points, as set by the alignment properties. These handles can be used to pick up and move the BoxText item, or, by holding the Ctrl key down as you click, they can be used to stretch the size of the box and therefore the BoxText item. The height of BoxText items is defined in metres, and unlike Text items, BoxText items are transformed along with the surrounding graphics when changing both dataset and print scales.

If the BoxText item is editable, then the local menu will contain the Convert to Box Text command, which converts BoxText items into Text items. SIS will try to keep the size of the text the same as you convert between BoxText and Text items. However, there is a range of valid point sizes, so in extreme cases the text will change size as the point height value is forced into the valid range.

To edit BoxText select the text and use the local Properties command, Text tab. See Editing Text.

Example:

  1. Select Box Text.

    The Properties of Box Text dialog will be displayed:

Font

Select the font to apply to the text from the drop-down box.

Height (pts)

The text height is scale dependent and is not editable for BoxText.

Text height is specified in point sizes, the same as text in word-processing. There are 72 points to the inch. One point is approximately 0.01389 inches, or 0.353 millimetres.

Markup

The Markup option allows a single text item to have multiple states, e.g. Bold, Italic, etc., and/or multiple colours; and/or multiple fonts.

These states are:

*bold* Therefore *This is bold text* will display: This is bold text
_italic_ Therefore _This is italic_ will display: This is italic
^superscript^ Therefore *Area = 25^2^* will display: Area = 252 (bold and superscript)
~subscript~ Therefore ~This is subscript~ will display: This is subscript
-strikeout- Therefore -This is strikeout- will display: strikeout

Multiple text colours in a text item:

The code to set text colour is:

%{fill:#RGB values} text to be coloured%

The following line:

This is%{fill:#00AA00} green% and this is%{fill:#0000FF} blue% text

will display as:

This is green and this is blue text

Multiple fonts in a text item:

The code to set a font is:

%{font-family:FontName}

The following line:

This font is %{font-family:Castellar} Castellar% whereas this font is *_%{font-family:Times}Times in bold italic%_*.

will display as:

This font is Castellar whereas this font is Times in bold italic.

Defining Outline text:

The code to set Outline text is:

%{fill:Fill Brush colour; outline:Outline Pen colour}required text%

The following line:

%{fill:#FF0000; outline:#0000FF}red fill blue outline%

will display as:

Escape characters

Characters can be "escaped" (i.e. have their markup meaning ignored) by prefixing with a \

The following line:

*This text is bold* but \*this text isn't (it has an asterisk before and after it instead)\*

would display as:

This text is bold but *this text isn't (it has an asterisk before and after it instead)*

    Justification: Left, Centre or Right

Set the text justification as required.

    Vertical alignment:Top, Middle, Baseline or Bottom

Set the text vertical alignment as required.

    Bold, Italic, Underline, Strikethrough

Any combination of Bold, Italic, Underlined and Strikethrough can be selected.   

    Opaque, Box, Outline, Rounded rectangle

Any combination of Opaque, Box, Outline (if creating Outline Text) and Rounded rectangle can be selected.

    Fill Brush

Select the required brush to set the text colour. Brush colour, fill, pattern, transparency and the normal advanced settings are available.

Implicit brushes may also be defined. The facility of copying and pasting the brush specification in JSON or XML is also available. 

    Outline Pen

Not available for simple text. This field will become active if the Outline text A button is selected:

    Preview pane

Type in the required text, use the syntax as described in Markup if required, press Enter for a new line. You can also paste text into this box using the Ctrl+C/Ctrl+V key combination, or Paste on the local menu.

 

  1. Click OK when you have finished entering text. The box text item is now attached to the cursor. If the zoom factor allows it, you will see a rectangular box on the cursor which is of a size sufficient to encompass the text item.

  2. Click the screen position where you want to place the text. The Box Text’s alignment point will be placed here.



    The alignment point is indicated by a butterfly shape.

Box text height

The height of box text is set in real world units (same as label text). For example, box text set to a height of 2.5 metres will appear the same size as a graphical item which measures 2.5 metres.

After selecting box text, you can change its size in one of two ways:


Top of page AComBoxText

Send comments on this topic.

Click to return to www.cadcorp.com

© Copyright 2000-2017 Computer Aided Development Corporation Limited (Cadcorp).