variations in c#

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Oliver Douglas

    variations in c#

    adapted from:




    // togglebut.cs

    using Gtk;
    using GtkSharp;
    using System;
    using System.Drawing;

    public class togglebuttons
    {

    public static void Main(string[] args)
    {

    Application.Ini t();

    Window window = new Window("toggle my buttons");

    window.DeleteEv ent += new DeleteEventHand ler (delete_event);

    /* Creating a new ToggleButton */

    ToggleButton togglebutton = new ToggleButton ("Ding Dong!");
    togglebutton.Cl icked += new EventHandler (clickedCallbac k);

    window.Add(togg lebutton);
    window.ShowAll( );

    Application.Run ();

    }

    static void delete_event (object obj, DeleteEventArgs args)
    {
    Application.Qui t();
    }

    static void clickedCallback (object obj, EventArgs args)
    {
    /* Check Active Property */

    if (((ToggleButton ) obj).Active)
    Console.WriteLi ne("Hello Dumass!");
    }
    }


    --


Working...