Skip to content
This repository has been archived by the owner on Sep 4, 2024. It is now read-only.

VBox and HBox

David Jeske edited this page Jun 6, 2017 · 1 revision

Here is some simple code to place a VBox in a window, and add some labels to it.

class MainWindow : Window
{
  VBox topPanel;
  public MainWindow() {
            this.Content = topPanel = new VBox();

            topPanel.PackStart(new Label("First Label"));
            topPanel.PackStart(new Label("Second Label"));            
        }
}

PackStart() / PackEnd()

Imagine there are two stacks of child elements in the box. One is starting from the start and growing towards the end. One starting from the end and growing towards the start. When you use PackStart you add to the stack growing from the start and when you use PackEnd you add to the stack growing from the end.

Clone this wiki locally