Dokumentaro de Gambaso
Compilation & Installation
Components
gb
gb.crypt
gb.qt4
Documents
Indekso de Lingvo
Language Overviews
LeguMin
Lexicon
Registro

Window.PrintCenter (gb.ncurses)

Sub PrintCenter ( Text As String [ , Attr As Integer, Pair As Integer ] )

This routine aims to print the given Text as close to the centre of the Window as possible. In fact, it tries to print the middle line closest to the vertical centre of the Window and the middle character in each line the closest to the horizontal centre of the Window.

Examples

Window.PrintCenter("some multiline\ntext\nin the centre of the window")
             The middle columns
                    ||
                    vv
+----------------------------------------+
|                                        |
|                                        |
|             some multiline             |
|                  text                  |<-The middle row
|      in the centre of the window       |
|                                        |
|                                        |
+----------------------------------------+

The border on the example above is for guidance only.