ivan avdonin
|
Sep 03, 2014 12:26 AM
|
Active user
Rating:
7
Joined: Sep 26, 2012
Company: individual |
Yes, you can. i have some example, may be it help to you
Code |
---|
// add attributes to form
FormAttribute_1 = New FormAttribute("id1", new TypeDescription("DynamicList"));
FormAttribute_2 = New FormAttribute("id2", new TypeDescription("String"));
addAttributes = New Array;
addAttributes.add(FormAttribute_1 );
addAttributes.add(FormAttribute_2 );
someForm.ChangeAttributes(addAttributes);
// add items to form
curItem_1 = someForm.Items.add("id1", Type("FormTable"));
curItem_1.DataPath = "id1"; //add attribute id1 before
curItem_1.ChangeRowSet = False;
curItem_1.ChangeRowOrder = False;
curItem_1.CommandBarLocation = FormItemCommandBarLabelLocation.None;
curItem_1.Height = 4;
curItem_2 = someForm.Items.add("id2", Type("FormField"));
curItem_2.Type = FormFieldType.InputField;
curItem_2.DataPath = "id2"; //add attribute id2 before
curItem_2.TitleLocation = FormItemTitleLocation.Right;
curItem_2.Title = "some text";
curItem_2.SetAction("AutoComplete", "id2AutoComplete");
curItem_2.SetAction("OnChange", "id2OnChange");
// add command
new_command = someForm.Commands.Add("new_command");
new_command.Title = "title of command";
new_command.Action = "someAction";
new_command.ToolTip = "tooltip of command";
new_command.Picture = PictureLib.ListSettings;
new_button = someForm.Items.add("button_1", Type("FormButton"), someForm.CommandBar);
new_button.On lyInAllActions = True;
new_button.CommandName = "new_command";
|
|
|
|