// To create a form at Run time
static void formCreation(Args _args)
{
Form form;
FormTreeControl tree;
FormRun formRun;
Args args;
ImageList imageList;
int imageNum;
int parentIdx;
int treeItemIdx, treeItemIdx1;
ImageRes imageRes = imageNum;
TreeNode treeNode;
;
form = new Form('Folder', true);
form.design().width(350);
form.design().height(150);
form.design().caption('Folder structure');
form.design().addControl(FormControlType::Tree, 'TreeCtrl');
args = new Args(form.name());
args.name(form.name());
args.object(form);
formRun = classFactory.formRunClass(args);
formRun.init();
formRun.run();
tree = formRun.design().controlName('TreeCtrl');
tree.width(330);
tree.height(130);
tree.hasButtons(false);
tree.border(3);
tree.colorScheme(2);
tree.backgroundColor(11072224);
tree.font('Arial');
tree.fontSize(8);
tree.bold(7);
imagelist = new Imagelist(25, 25);
imageNum = imagelist.add(new Image(3114));
tree.setImagelist(imagelist);
tree.deleteAll();
parentIdx = SysFormTreeControl::addTreeItem(Tree,
'SangeethTest',
FormTreeAdd::Root,
'Data on root',
imageRes,
true);
treeItemIdx = SysFormTreeControl::addTreeItem(Tree,
'SangeethTest1',
parentIdx,
'Data on element2',
imageRes,
true);
treeItemIdx1 = SysFormTreeControl::addTreeItem(Tree,
'SangeethTest2',
treeItemIdx,
'Data on element3',
imageRes,
false);
SysFormTreeControl::expandTree(Tree, Tree.getRoot(), 3);
formRun.detach();
}
static void formCreation(Args _args)
{
Form form;
FormTreeControl tree;
FormRun formRun;
Args args;
ImageList imageList;
int imageNum;
int parentIdx;
int treeItemIdx, treeItemIdx1;
ImageRes imageRes = imageNum;
TreeNode treeNode;
;
form = new Form('Folder', true);
form.design().width(350);
form.design().height(150);
form.design().caption('Folder structure');
form.design().addControl(FormControlType::Tree, 'TreeCtrl');
args = new Args(form.name());
args.name(form.name());
args.object(form);
formRun = classFactory.formRunClass(args);
formRun.init();
formRun.run();
tree = formRun.design().controlName('TreeCtrl');
tree.width(330);
tree.height(130);
tree.hasButtons(false);
tree.border(3);
tree.colorScheme(2);
tree.backgroundColor(11072224);
tree.font('Arial');
tree.fontSize(8);
tree.bold(7);
imagelist = new Imagelist(25, 25);
imageNum = imagelist.add(new Image(3114));
tree.setImagelist(imagelist);
tree.deleteAll();
parentIdx = SysFormTreeControl::addTreeItem(Tree,
'SangeethTest',
FormTreeAdd::Root,
'Data on root',
imageRes,
true);
treeItemIdx = SysFormTreeControl::addTreeItem(Tree,
'SangeethTest1',
parentIdx,
'Data on element2',
imageRes,
true);
treeItemIdx1 = SysFormTreeControl::addTreeItem(Tree,
'SangeethTest2',
treeItemIdx,
'Data on element3',
imageRes,
false);
SysFormTreeControl::expandTree(Tree, Tree.getRoot(), 3);
formRun.detach();
}
No comments:
Post a Comment