Welcome Max, First a tip. It is easier for people to view your code samples if you post them in the playground <https://play.golang.org/>. Even though this code will not run in the playground, due to the imports, its a nice way for people to quickly see what you are talking about.
The code you have provided does not compile. It would be much easier to help you if I could try running what you have. So I suggest always making sure your samples compile before posting. I'm note sure what you experience level is, but UI code can be complicated and hard to debug and diagnose. So if you are new to go, I suggesting doing some command line projects first to get comfortable with the language. 2. How to output variables as the "fmt.Println" function? (Ex: > fmt.Println("The initial number is:", input)) > I think you want to use fmt.Sprintf <https://golang.org/pkg/fmt/#Sprintf>to get a string to then pass to AppendText: outTE.AppendText(fmt.Sprintf("The initial number is: %d", initial)) 3. How to implement text edit as the "fmt.Scanf" function? You want to get the text from the edit box using it's Text() function then call Sscanf() <https://golang.org/pkg/fmt/#Sscanf>. 4. How to implement with bottoms? > (Its buttons, not bottoms.) There are a bunch of examples that come with walk. See https://github.com/lxn/walk/tree/master/examples. The documentation on the library ios not great. I suggest you build all the examples, and look at the ones that do something like what you are trying to do. - God Luck On Wednesday, October 9, 2019 at 10:25:06 AM UTC-4, 洪嘉鴻 wrote: > > Hello everyone: > I'm a beginner for golang with Win10. Now I'm trying to write an > user interface. The version of the golang which I am using is 1.12.9. Here > are some problems that I'm encountering: > > 1. How to append text with a new line? > 2. How to output variables as the "fmt.Println" function? (Ex: > fmt.Println("The initial number is:", input)) > 3. How to implement text edit as the "fmt.Scanf" function? > 4. How to implement with bottoms? (Ex: There are 3 bottoms, if the third > bottom is clicked, the three bottoms will disappear and then appear 4 new > bottoms to let the user choose.) > > Here is the code for the problems above, where the code is with lots of > errors > Any help is appreciated. > Thank you very much! > Max > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/3c128a52-6540-43c5-8b18-2d328b551962%40googlegroups.com.