Spread Windows Forms 8.0 Product Documentation
Customizing Text as a Shape

The text shape is unique among the shapes that can be placed on a sheet. This shape allows you to type in text that itself is treated as a shape. You can create a text shape in code or in the Spread Designer.

Use the WordArt option in the Insert menu to create a text shape. Once a shape has been created, the Drawing Tools menu can be used to set properties.

When you create a text shape in code, you must set a dimension (either Height or Width) after setting the Text property. When the Text property is set, the size of the shape changes based on the current font and text string settings. It then needs to be informed of the new size to which it should be constrained. If a new Height or Width is not specified after setting the Text property, the size of the shape created may be unpredictable (and may be so small as to be illegible).

When you create a text shape in the Spread Designer you can set several properties to customize its appearance. When you first create a text shape, the Text Properties dialog is displayed as shown here.

Spread Designer Text Shape Properties Dialog

This includes the following items:

Text Settings Description and Reference
Font Select a font from the drop-down list of fonts available on your system
Text Type the text in the text block.
Size Set the size. This is not a property that is later editable.

To change the properties of the text shape, right click on the text (not the space in between the text), and select Properties. The Shape Properties dialog is displayed. To change the fill color of the text shape, select the BackColor property. The ForeColor property is not the color of the text shape itself. To change the outline color of the text shape, select the OutlineColor property. The font size cannot be set with this dialog; the size is determined by the size of the overall shape. For more information about the Shape Properties dialog, refer to Shape Properties Dialog.

You cannot the text to be only spaces; you must enter at least one non-space character.

For more details on the text shape in code, refer to the TextShape class.

 

 


Copyright © GrapeCity, inc. All rights reserved.

Support Options | Documentation Feedback