I am using gtk# at monodev and i’m trying to do a simple GUI application that gets weight input and converts it to kg or lbs. Firstly, i’m trying to understand the basics, i wanted to know how to get the entry input after clicking my button and displaying that input text in my label.
This is how my MainWindow.cs looks.
I created a simple signal button that closes the program if i click the Convert button.
using System;
using Gtk;
public partial class MainWindow : Gtk.Window
{
public MainWindow() : base(Gtk.WindowType.Toplevel)
{
Build();
}
protected void OnDeleteEvent(object sender, DeleteEventArgs a)
{
Application.Quit();
a.RetVal = true;
}
// Convert button
protected void OnButton3Clicked(object sender, EventArgs e)
{
Application.Quit();
}
}
I wanted to get the text from entry and displaying it after clicking convert button