コード例 #1
0
        public LinkLabel()
        {
            HandlesPrelight = true;
            GtkResources.RegisterDefaultResourceHandler();
            icon.StateResolving = ValueResolveMethod.FromOwner;
            Spacing             = 2;
            MainBox.PackEnd(icon, false);
            MainBox.PackEnd(link, true);

            this.Realized += delegate(object sender, EventArgs e) {
                GdkWindow.Cursor = new Gdk.Cursor(Gdk.CursorType.Hand1);
            };

            Gtk.Drag.SourceSet(this, Gdk.ModifierType.Button1Mask, ValidTargets, DragAction.Copy);
            DragBegin   += HandleDragBegin;
            DragDataGet += HandleDragDataGet;
        }
コード例 #2
0
        public ColorLabel()
        {
            colorbox.BorderVisible = true;
            colorbox.BorderWidth   = 2;
            colorbox.BorderColor   = new Cairo.Color(0, 0, 0);
            colorbox.FillVisible   = true;
            colorbox.FillColor     = Color;
            HandlesPrelight        = true;
            GtkResources.RegisterDefaultResourceHandler();
//			icon.StateResolving = ValueResolveMethod.FromOwner;
            Spacing = 4;
            MainBox.PackEnd(colorbox, false);
            MainBox.PackEnd(name, true);

            this.Realized += delegate(object sender, EventArgs e) {
                GdkWindow.Cursor = new Gdk.Cursor(Gdk.CursorType.Hand1);
            };

            Gtk.Drag.SourceSet(this, Gdk.ModifierType.Button1Mask, ValidTargets, DragAction.Copy);
            DragBegin   += HandleDragBegin;
            DragDataGet += HandleDragDataGet;
        }