コード例 #1
0
 public MappedCellRendererTime()
     : base(new DrawingCellHBox())
 {
     showAMPMDesignator = (System.Threading.Thread.CurrentThread.CurrentCulture.DateTimeFormat.LongTimePattern.IndexOf("tt") > -1);
     timetext.SizeText  = ResetCellSize();
     MainBox.PackEnd(new DrawingCellNull(), true);
     MainBox.PackEnd(timetext, false);
 }
コード例 #2
0
        public MappedCellRendererCurrency()
            : base(new DrawingCellHBox())
        {
            System.Console.WriteLine("Created");
            MainBox.PackEnd(new DrawingCellNull(), true);
            MainBox.PackEnd(currencytext, false);
            string s = " " + System.Threading.Thread.CurrentThread.CurrentCulture.NumberFormat.CurrencySymbol;

            currencysymbol = new DrawingCellEditText(s, s);
            MainBox.PackEnd(currencysymbol, false);
            currencysymbol.Visible = false;
        }
コード例 #3
0
        public MappedCellRendererDate()
            : base(new DrawingCellHBox())
        {
            this.Mode         = CellRendererMode.Editable;
            datetext.SizeText = "88/88/8888";
            MainBox.PackEnd(new DrawingCellNull(), true);
            MainBox.PackEnd(datetext, false);
            DateEntry de = new DateEntry();

            de.IsCellRenderer = true;
            de.HasCalculator  = false;
            de.HasClearButton = false;
            de.HasDropDown    = false;

            adapter = new CellEditableAdapter(de);
        }
コード例 #4
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;
        }
コード例 #5
0
 public MappedCellRendererIp()
     : base(new DrawingCellHBox())
 {
     for (int i = 0; i < 4; i++)
     {
         labels[i].SizeText = "888";
     }
     MainBox.PackEnd(new DrawingCellNull(), true);
     for (int i = 0; i < 4; i++)
     {
         labels[i].XPos = 0.5;
     }
     MainBox.PackEnd(labels[0], false);
     MainBox.PackEnd(new DrawingCellEditText("."), false);
     MainBox.PackEnd(labels[1], false);
     MainBox.PackEnd(new DrawingCellEditText("."), false);
     MainBox.PackEnd(labels[2], false);
     MainBox.PackEnd(new DrawingCellEditText("."), false);
     MainBox.PackEnd(labels[3], false);
 }
コード例 #6
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;
        }