Click here to Skip to main content
15,891,473 members
Articles / Programming Languages / C#

Custom controls with MonoDevelop and GTK#

Rate me:
Please Sign up or sign in to vote.
4.40/5 (9 votes)
18 May 2008GPL35 min read 113.2K   1.7K   32  
Movable controls with customized rendering on Linux with Mono.
// ------------------------------------------------------------------------------
//  <autogenerated>
//      This code was generated by a tool.
//      Mono Runtime Version: 2.0.50727.42
// 
//      Changes to this file may cause incorrect behavior and will be lost if 
//      the code is regenerated.
//  </autogenerated>
// ------------------------------------------------------------------------------

namespace GtkControl {
    
    
    public partial class MVPanel {
        
        private Gtk.ScrolledWindow scrolledwindow1;
        
        private Gtk.Fixed fixed1;
        
        protected virtual void Build() {
            Stetic.Gui.Initialize(this);
            // Widget GtkControl.MVPanel
            Stetic.BinContainer.Attach(this);
            this.Name = "GtkControl.MVPanel";
            // Container child GtkControl.MVPanel.Gtk.Container+ContainerChild
            this.scrolledwindow1 = new Gtk.ScrolledWindow();
            this.scrolledwindow1.CanFocus = true;
            this.scrolledwindow1.Name = "scrolledwindow1";
            this.scrolledwindow1.ShadowType = ((Gtk.ShadowType)(1));
            // Container child scrolledwindow1.Gtk.Container+ContainerChild
            Gtk.Viewport w1 = new Gtk.Viewport();
            w1.ShadowType = ((Gtk.ShadowType)(0));
            // Container child GtkViewport.Gtk.Container+ContainerChild
            this.fixed1 = new Gtk.Fixed();
            this.fixed1.Events = ((Gdk.EventMask)(252));
            this.fixed1.Name = "fixed1";
            this.fixed1.HasWindow = false;
            w1.Add(this.fixed1);
            this.scrolledwindow1.Add(w1);
            this.Add(this.scrolledwindow1);
            if ((this.Child != null)) {
                this.Child.ShowAll();
            }
            this.Show();
            this.fixed1.MotionNotifyEvent += new Gtk.MotionNotifyEventHandler(this.OnFixed1MotionNotifyEvent);
        }
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The GNU General Public License (GPLv3)


Written By
Software Developer
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions