Skip to content

Hello World

saiftynet edited this page Feb 15, 2018 · 15 revisions

A simple window is identified by easily. The corners of a window are used by "+", and the borders with "-" and "|". The design requires a monospace font.

+-------------------+
|T Hello world      |
+-------------------+
|  Hello World      |
|                   |
+-------------------+

  • The first line determine the width of the window and the number of lines yields the height of the window (generally). It is possible to modify this by adding the pixel geometry in the first line e.g.
+-300x300-----------+
|T Hello world      |
+-------------------+
|  Hello World      |
+-------------------+

  • The title bar is drawn using the second line...the "T" indicates a title bar and the content that follows becomes the title of the window.
  • The third line is a separator.
  • The fourth line and those that follow determine the content. In this case a static text is written as text (surprise). As text is detected it's ID is presented on the console for further manipulation if needed with $frame->{stattext<id>} e.g.
$frame->{stattext21}->SetLabel("The button was clicked!");
$frame->{stattext21}->SetForegroundColour( Wx::Colour->new(255, 0, 0) );
  • A blank line (or end of data) is where the line count stops.

Clone this wiki locally