至今还未解决,无奈只能多增加一列,其他行的控件就要跨2列了~
部分代码:
//Get the culture property of the thread.
CultureInfo cultureInfo = Thread.CurrentThread.CurrentCulture;
//Create TextInfo object.
TextInfo textInfo = cultureInfo.TextInfo;
//名称
Label nameLb = new Label();
nameLb.Name = Tag_Name;
nameLb.Text = textInfo.ToTitleCase(Tag_Name);
nameLb.Anchor = (AnchorStyles)(AnchorStyles.Right);
TextBox nameBox = new TextBox();
nameBox.Name = Tag_Name;
tlp.SetColumnSpan(nameBox, 2);
nameBox.Anchor = (AnchorStyles)(AnchorStyles.Left | AnchorStyles.Right);
//更新日期
Label modityDateLb = new Label();
modityDateLb.Name = Tag_ModifyDate;
modityDateLb.Text = textInfo.ToTitleCase(Tag_ModifyDate);
modityDateLb.Anchor = (AnchorStyles)(AnchorStyles.Right);
DateTimePicker dtp = new DateTimePicker();
tlp.SetColumnSpan(dtp,2);
tlp.Anchor = (AnchorStyles)(AnchorStyles.Left | AnchorStyles.Right);
//描述
Label descLb = new Label();
descLb.Name = Tag_Description;
descLb.Text = textInfo.ToTitleCase(Tag_Description);
descLb.Anchor = (AnchorStyles)(AnchorStyles.Right);
TextBox descBox = new TextBox();
部分代码:
//Get the culture property of the thread.
CultureInfo cultureInfo = Thread.CurrentThread.CurrentCulture;
//Create TextInfo object.
TextInfo textInfo = cultureInfo.TextInfo;
//名称
Label nameLb = new Label();
nameLb.Name = Tag_Name;
nameLb.Text = textInfo.ToTitleCase(Tag_Name);
nameLb.Anchor = (AnchorStyles)(AnchorStyles.Right);
TextBox nameBox = new TextBox();
nameBox.Name = Tag_Name;
tlp.SetColumnSpan(nameBox, 2);
nameBox.Anchor = (AnchorStyles)(AnchorStyles.Left | AnchorStyles.Right);
//更新日期
Label modityDateLb = new Label();
modityDateLb.Name = Tag_ModifyDate;
modityDateLb.Text = textInfo.ToTitleCase(Tag_ModifyDate);
modityDateLb.Anchor = (AnchorStyles)(AnchorStyles.Right);
DateTimePicker dtp = new DateTimePicker();
tlp.SetColumnSpan(dtp,2);
tlp.Anchor = (AnchorStyles)(AnchorStyles.Left | AnchorStyles.Right);
//描述
Label descLb = new Label();
descLb.Name = Tag_Description;
descLb.Text = textInfo.ToTitleCase(Tag_Description);
descLb.Anchor = (AnchorStyles)(AnchorStyles.Right);
TextBox descBox = new TextBox();