Slide 40
Slide 40 text
Tables
public static int main(string[] args) {
Gtk.init(ref args);
var app = new Application();
var table = new Table(2, 2, false);
var label = new Label("Enter the following information...");
var label2 = new Label("Name: ");
var name = new Entry();
table.attach(label, 0, 2, 0, 1,
AttachOptions.EXPAND,
AttachOptions.SHRINK, 0, 0);
table.attach(label2, 0, 1, 1, 2,
AttachOptions.SHRINK,
AttachOptions.SHRINK, 0, 0);
table.attach(name, 1, 2, 1, 2,
AttachOptions.EXPAND | AttachOptions.FILL,
AttachOptions.SHRINK, 0, 0);
table.set_row_spacings(5);
table.set_col_spacings(5);
app.add_to_window(table);
app.show();
Gtk.main();
return 0;
}
6.tables.vala