Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version

Custom controls with MonoDevelop and GTK#

, 18 May 2008 GPL3
Movable controls with customized rendering on Linux with Mono.
customgtkcontrolExe.zip
CustomGtkControl.exe
customgtkcontrolSources.zip
GtkControl
GtkControl.mdp
GtkControl.mds
gtk-gui
Control
gui.stetic
// ------------------------------------------------------------------------------
//  <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>
// ------------------------------------------------------------------------------



public partial class MainWindow {
    
    private Gtk.HPaned hpaned1;
    
    private Gtk.VPaned vpaned2;
    
    private Gtk.Label label1;
    
    private GtkControl.MVPanel mvpanel1;
    
    private Gtk.VPaned vpaned1;
    
    private Gtk.Label label2;
    
    private Gtk.ScrolledWindow GtkScrolledWindow;
    
    private Gtk.TextView textview1;
    
    protected virtual void Build() {
        Stetic.Gui.Initialize(this);
        // Widget MainWindow
        this.Name = "MainWindow";
        this.Title = Mono.Unix.Catalog.GetString("MainWindow");
        this.WindowPosition = ((Gtk.WindowPosition)(4));
        // Container child MainWindow.Gtk.Container+ContainerChild
        this.hpaned1 = new Gtk.HPaned();
        this.hpaned1.CanFocus = true;
        this.hpaned1.Name = "hpaned1";
        this.hpaned1.Position = 170;
        // Container child hpaned1.Gtk.Paned+PanedChild
        this.vpaned2 = new Gtk.VPaned();
        this.vpaned2.CanFocus = true;
        this.vpaned2.Name = "vpaned2";
        this.vpaned2.Position = 28;
        // Container child vpaned2.Gtk.Paned+PanedChild
        this.label1 = new Gtk.Label();
        this.label1.Name = "label1";
        this.label1.LabelProp = Mono.Unix.Catalog.GetString("label1");
        this.vpaned2.Add(this.label1);
        Gtk.Paned.PanedChild w1 = ((Gtk.Paned.PanedChild)(this.vpaned2[this.label1]));
        w1.Resize = false;
        // Container child vpaned2.Gtk.Paned+PanedChild
        this.mvpanel1 = new GtkControl.MVPanel();
        this.mvpanel1.Events = ((Gdk.EventMask)(768));
        this.mvpanel1.Name = "mvpanel1";
        this.vpaned2.Add(this.mvpanel1);
        this.hpaned1.Add(this.vpaned2);
        Gtk.Paned.PanedChild w3 = ((Gtk.Paned.PanedChild)(this.hpaned1[this.vpaned2]));
        w3.Resize = false;
        // Container child hpaned1.Gtk.Paned+PanedChild
        this.vpaned1 = new Gtk.VPaned();
        this.vpaned1.CanFocus = true;
        this.vpaned1.Name = "vpaned1";
        this.vpaned1.Position = 49;
        // Container child vpaned1.Gtk.Paned+PanedChild
        this.label2 = new Gtk.Label();
        this.label2.Name = "label2";
        this.label2.LabelProp = Mono.Unix.Catalog.GetString("label2");
        this.vpaned1.Add(this.label2);
        Gtk.Paned.PanedChild w4 = ((Gtk.Paned.PanedChild)(this.vpaned1[this.label2]));
        w4.Resize = false;
        // Container child vpaned1.Gtk.Paned+PanedChild
        this.GtkScrolledWindow = new Gtk.ScrolledWindow();
        this.GtkScrolledWindow.Name = "GtkScrolledWindow";
        this.GtkScrolledWindow.ShadowType = ((Gtk.ShadowType)(1));
        // Container child GtkScrolledWindow.Gtk.Container+ContainerChild
        this.textview1 = new Gtk.TextView();
        this.textview1.CanFocus = true;
        this.textview1.Name = "textview1";
        this.GtkScrolledWindow.Add(this.textview1);
        this.vpaned1.Add(this.GtkScrolledWindow);
        this.hpaned1.Add(this.vpaned1);
        this.Add(this.hpaned1);
        if ((this.Child != null)) {
            this.Child.ShowAll();
        }
        this.DefaultWidth = 675;
        this.DefaultHeight = 464;
        this.Show();
        this.DeleteEvent += new Gtk.DeleteEventHandler(this.OnDeleteEvent);
        this.mvpanel1.KeyPressEvent += new Gtk.KeyPressEventHandler(this.OnMvpanel1KeyPressEvent);
        this.mvpanel1.KeyReleaseEvent += new Gtk.KeyReleaseEventHandler(this.OnMvpanel1KeyReleaseEvent);
        this.mvpanel1.ButtonPressEvent += new Gtk.ButtonPressEventHandler(this.OnMvpanel1ButtonPressEvent);
        this.mvpanel1.ButtonReleaseEvent += new Gtk.ButtonReleaseEventHandler(this.OnMvpanel1ButtonReleaseEvent);
    }
}

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)

Share

About the Author

Olivier Lecointre
Software Developer
United States United States
No Biography provided

| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.141223.1 | Last Updated 18 May 2008
Article Copyright 2008 by Olivier Lecointre
Everything else Copyright © CodeProject, 1999-2014
Layout: fixed | fluid