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);
 }
        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;
        }