A GUI open source project in go language https://github.com/andlabs/ui

Source: Internet
Author: User
This is a creation in Article, where the information may have evolved or changed.

A GUI open source project in go language https://github.com/andlabs/ui

1 Install MINGW-W64 link address:

http://mingw-w64.sourceforge.net/download.php

2 Liteide configuration:

# Native Compiler Windows 386
Goroot=c:\go
Gobin=%goroot%\bin
Goarch=386
Goos=windows
Cgo_enabled=1
Path=C:\Program files\mingw-w64\i686-4.9.2-win32-dwarf-rt_v3-rev1\mingw32\bin; %goroot%\bin;%path%
#GOPATH =c:\go
Liteide_gdb=gdb
Liteide_make=make
liteide_term=%comspec%
liteide_termargs=
liteide_exec=%comspec%
Liteide_execopt=/c

3 sample into the source code:
Package Mainimport ("Github.com/andlabs/ui")varwindow UI. Windowfunc Main () {Go UI. Do (func () {name:=UI. Newtextfield () button:= UI. Newbutton ("Greet") Greeting:= UI. Newlabel ("") Stack:=UI. Newverticalstack (UI. Newlabel ("Enter your name:"), name, button, greeting) window= UI. NewWindow ("Hello", $, -, Stack) button. OnClicked (func () {greeting. SetText ("Hello,"+ Name. Text () +"!")}) window. OnClosing (func ()BOOL{UI.} Stop ()return true}) window. Show ()}) Err:=UI. Go ()ifErr! =Nil {panic (err)}}

4 Effect:







Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.