Inheritance: System.Windows.Forms.Label
コード例 #1
0
		public TpLabel AddLabel(string text)
		{
			var txt = new TpLabel
			          	{
			          		Text = text,
			          		Location = new Point(_controlOffset, Y_OFFSET22),
			          		Height = 20,
			          		Font = UI.DefaultFont,
			          		ForeColor = Color.White,
							BackColor = Color.Transparent
			          	};

			Size sz = TextRenderer.MeasureText(text, UI.DefaultFont);
			txt.Width = sz.Width;

			Controls.Add(txt);
			_controlOffset += sz.Width;
			return txt;
		}
コード例 #2
0
        public TpLabel AddLabel(string text)
        {
            var txt = new TpLabel
            {
                Text      = text,
                Location  = new Point(_controlOffset, Y_OFFSET22),
                Height    = 20,
                Font      = UI.DefaultFont,
                ForeColor = Color.White,
                BackColor = Color.Transparent
            };

            Size sz = TextRenderer.MeasureText(text, UI.DefaultFont);

            txt.Width = sz.Width;

            Controls.Add(txt);
            _controlOffset += sz.Width;
            return(txt);
        }
コード例 #3
0
        public TpTextItem(string text)
        {
            BackColor = Color.White;

            Tag   = text;
            value = text;
            lbl   = new TpLabel
            {
                Text     = text,
                Location = new Point(0, 0),
                Size     = new Size(100, 20)
            };

            lbl.MouseEnter += lbl_MouseEnter;
            lbl.MouseLeave += lbl_MouseLeave;

            lbl.MouseClick += lbl_MouseClick;


            Controls.Add(lbl);
        }
コード例 #4
0
		public TpTextItem(string text)
		{
			BackColor = Color.White;

			Tag = text;
			value = text;
			lbl = new TpLabel
			      	{
			      		Text = text,
			      		Location = new Point(0, 0),
			      		Size = new Size(100, 20)
			      	};

			lbl.MouseEnter += lbl_MouseEnter;
			lbl.MouseLeave += lbl_MouseLeave;

			lbl.MouseClick += lbl_MouseClick;


			Controls.Add(lbl);
		}