Hi @all,
ich hab mir ein customcontrol gemacht, welches von TabPage erbt. will ich diesen tab nun zu einem tabcontrol hinzufügen wird die im titel beschriebene Argumentexception geworfen.
das ist der custom tab
und so füge ich den tab dem tabcontrol hinzu:
danke wie immer im vorraus ^^
mfg daniel
ich hab mir ein customcontrol gemacht, welches von TabPage erbt. will ich diesen tab nun zu einem tabcontrol hinzufügen wird die im titel beschriebene Argumentexception geworfen.
das ist der custom tab
Code:
public partial class TabPageEx : Control { private int startx = 10; private int starty = 10; private int offsety = 30; public TabPageEx() { InitializeComponent(); } public void populate(Patient patient) { int lblcounter = 0; foreach (CareMeasure measure in patient.Measures) { Label lbl = new Label(); lbl.Dock = DockStyle.Fill; lbl.Text = measure.Time.ToShortTimeString(); lbl.Location = new Point(startx, starty + offsety * lblcounter); lblcounter++; } } public void reset() { this.Controls.Clear(); } protected override void OnPaint(PaintEventArgs pe) { base.OnPaint(pe); } }
Code:
private CuraPocket.UI.CustomControl.TabPageEx TAB_MEASURES; this.TAB_TEST = new CuraPocket.UI.CustomControl.TabPageEx(); this.TAB_TEST.Location = new System.Drawing.Point(0, 0); this.TAB_TEST.Name = "TAB_TEST"; this.TAB_TEST.Size = new System.Drawing.Size(240, 203); this.TAB_TEST.Text = "test"; this.TC_MAINTABCONTROL.Controls.Add(this.TAB_MEASURES);
mfg daniel
Comment