* UIEditForm: 修改代码生成表单,AddText的默认值为null出错
This commit is contained in:
parent
084e44d691
commit
e11c3d835f
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -57,7 +57,7 @@ namespace Sunny.UI.Demo.Forms
|
||||
UIEditOption option = new UIEditOption();
|
||||
option.AutoLabelWidth = true;
|
||||
option.Text = "增加";
|
||||
option.AddText("Name", "姓名", "", true);
|
||||
option.AddText("Name", "姓名", null, true);
|
||||
option.AddInteger("Age", "年龄", 16);
|
||||
option.AddDate("Birthday", "生日", DateTime.Now);
|
||||
option.AddCombobox("Sex", "性别", sex, 1, true, true);
|
||||
|
@ -86,7 +86,7 @@ namespace Sunny.UI
|
||||
edit.Left = option.LabelWidth;
|
||||
edit.Width = option.ValueWidth;
|
||||
edit.Top = top;
|
||||
edit.Text = info.Value.ToString();
|
||||
edit.Text = info.Value?.ToString();
|
||||
edit.Parent = this;
|
||||
edit.Name = "Edit_" + info.DataPropertyName;
|
||||
edit.EnterAsTab = true;
|
||||
@ -100,7 +100,7 @@ namespace Sunny.UI
|
||||
edit.Left = option.LabelWidth;
|
||||
edit.Width = option.ValueWidth;
|
||||
edit.Top = top;
|
||||
edit.Text = info.Value.ToString();
|
||||
edit.Text = info.Value?.ToString();
|
||||
edit.Parent = this;
|
||||
edit.PasswordChar = '*';
|
||||
edit.Name = "Edit_" + info.DataPropertyName;
|
||||
|
Loading…
x
Reference in New Issue
Block a user