adapted from:
http://www.gotmono.com/docs/gnome/bi...tonwidget.html
// togglebut.cs
using Gtk;
using GtkSharp;
using System;
using System.Drawing;
public class togglebuttons
{
public static void Main(string[] args)
{
Application.Init();
Window window = new Window("toggle my buttons");
window.DeleteEvent += new DeleteEventHandler (delete_event);
/* Creating a new ToggleButton */
ToggleButton togglebutton = new ToggleButton ("Ding Dong!");
togglebutton.Clicked += new EventHandler (clickedCallback);
window.Add(togglebutton);
window.ShowAll();
Application.Run();
}
static void delete_event (object obj, DeleteEventArgs args)
{
Application.Quit();
}
static void clickedCallback (object obj, EventArgs args)
{
/* Check Active Property */
if (((ToggleButton) obj).Active)
Console.WriteLine("Hello Dumass!");
}
}
--
http://www.timvp.com/greenacr.html