Skip to content

Instantly share code, notes, and snippets.

@ZanderBrown
Created May 22, 2018 21:51
Show Gist options
  • Save ZanderBrown/9ac1845669041f45aab1f01ad8afe08a to your computer and use it in GitHub Desktop.
Save ZanderBrown/9ac1845669041f45aab1f01ad8afe08a to your computer and use it in GitHub Desktop.

When making a GtkBox in Vala you can be as formal/informal as you like

Formal

Gtk.Box box = new Gtk.Box (Gtk.Orientation.VERTICAL, 0);

I know you mean Gtk.Box

var box = new Gtk.Box (Gtk.Orientation.VERTICAL, 0);

I can work out what namespace that's in

using Gtk;
[...]
var box = new Box (Orientation.VERTICAL, 0);

Magic mode

var box = new Box (VERTICAL, 0);

So that's pretty cool

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment