Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

Hull and Outfitting

Fixed Width Font

  • Last UpdatedJan 09, 2024
  • 2 minute read

The Textpane gadget definition has a new keyword ‘FixChars’ to force the use of a fixed width font.

This allows the text pane to be used to show simple reports laid out using the space character.

The chosen font is Courier New (TrueType), because it has a reasonable selection of character glyphs (nowhere near as extensive as the default variable width font Arial Unicode MS).

                       .--------<--------.

                      /                  |

>-- TEXTPane gname --+-- tagtext---------|

                     +-- <fganch> -------|

                     +-- <fgdock> -------|

                     +-- <fgpos> --------|

                     +-- FIXCHARS -------|

                     +-- CORE -----------* Core managed gadget

                     '-- <vshap> --->

Example

SETUP FORM !!textbug dialog dock right NoAlign VarChars

TITLE |Text input and output (!!textbug)|

. . .

-- Text pane --------------------------------------------

Path down

hdist 1

vdist 0.1

--Default: variable spaced font

textpane .tp1 |text pane| at xmin form anchor l+r+t wid 43 hei 9

. . .

define method .initialize()

-- initialize on show

-- add data into textpane

!s[1] = | 1     Ford Escort|

!s[2] = | 2     Ford Fiesta|

!s[3] = | 3     Vauxhall Nova|

!s[4] = | 4     Vauxhall Astra|

!s[5] = | 5     Vauxhall Lotus|

!s[6] = |16     LandRover RangeRover £62000|

!s[7] = |17     LandRover Defender £23999|

!this.tp1.val = !s

. . .

Variable Spaced Font

Fixed Space Font

--Force fixed spacing font

textpane .tp1 |text pane| at xmin form anchor l+r+t FixChars wid 43 hei 9

Related Links
TitleResults for “How to create a CRG?”Also Available in