input and output text? #2090
Replies: 1 comment
-
Hi, Thanks for checking out the library. The easiest way to get started is to use the https://github.com/tznind/gui.cs.template#usage
There is a visual designer tool that lets you create/edit views. That is probably the easiest way to create a popup input box:
Assuming you have created the above view then you can expose the result and make Ok close the dialog by updating the public partial class MyInputBox {
public string Result => textfield1.Text.ToString();
public MyInputBox() {
InitializeComponent();
button1.Clicked += ()=>Application.RequestStop();
}
} InputBox.cs To change the template program so that the button1.Clicked += () =>
{
var box = new MyInputBox();
Application.Run(box);
label1.Text = box.Result;
this.SetNeedsDisplay();
}; MyView.cs The finished program would look like: |
Beta Was this translation helpful? Give feedback.
-
I am trying to simply input data from the user and use that inputted value to output to another textview or label. I cannot seem to find any instruction to do so, can someone help?
Beta Was this translation helpful? Give feedback.
All reactions