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