[Just a mickey-mouse demo I wrote up for the Golang 'Code and Chat' Meetup.]
Find the code, etc. for andlabs/ui
at this link.
There is a nice Getting Started page. Be sure to read this, as it is pretty good.
Golang (Go) installed. Find the Download Go link on the Golang home page.
-
Verify that you are on a supported platform. It looks like OS/X, linux and Windows are supported.
-
Download the latest version:
$ go get -u github.com/andlabs/ui
-
Dependencies: if the previous command results in something like:
$ go get -u github.com/andlabs/ui # pkg-config --cflags gtk+-3.0 Package gtk+-3.0 was not found in the pkg-config search path. Perhaps you should add the directory containing `gtk+-3.0.pc' to the PKG_CONFIG_PATH environment variable No package 'gtk+-3.0' found pkg-config: exit status 1 $
Then install any missing dependencies (
lib-gtk-3-dev
plus extras in my case).Try the installation again (which may require installing more dependencies):
$ go get -u github.com/andlabs/ui $
To simply run the example (i.e. no build):
$ go run main.go
Type something in the textbox and press 'Greet' to see what happens.
Close the window to terminate.
To build the example:
$ go build main.go
This should produce a binary: main
To run the binary:
$ ./main
Type something in the textbox and press 'Greet' to see what happens.
Close the window to terminate.
- Figure what makes a box element stretchy
- Figure out how to get the selected items text from a combobox
- Figure out how to get the selected items text from a radiobox