Panel user stretchable

Develop and Deploy Cross-Browser Web Apps .

Panel user stretchable

Postby joedarock » Wed Feb 15, 2017 2:47 pm

I have a panel that contains a grid control. I want the user to be able to stretch the panel's width and height and the grid size should follow to fill the panel. Is there a property for this?
joedarock
 
Posts: 161
Joined: Thu Nov 19, 2015 8:39 pm

Re: Panel user stretchable

Postby support » Thu Feb 16, 2017 9:12 am

You can add a Panel in a Block.

   
xui.Class('App', 'xui.Module',{
Instance:{
iniComponents : function(){
// [[Code created by CrossUI RAD Studio
var host=this, children=[], append=function(child){children.push(child.get(0));};

append(
xui.create("xui.UI.Block")
.setHost(host,"xui_ui_block2")
.setLeft("8.333333333333334em")
.setTop("5.833333333333333em")
.setWidth("29.166666666666668em")
.setHeight("17.5em")
.setResizer(true)
.setBorderType("none")
);

host.xui_ui_block2.append(
xui.create("xui.UI.Panel")
.setHost(host,"xui_ui_panel3")
.setLeft("4.166666666666667em")
.setTop("1.6666666666666667em")
.setCaption("Panel in a block wich dock='fill'")
);

host.xui_ui_panel3.append(
xui.create("xui.UI.TreeGrid")
.setHost(host,"xui_ui_treegrid2")
.setLeft("0em")
.setTop("0em")
.setRowNumbered(true)
.setHeader([{
"id":"col1",
"width":"8em",
"type":"input",
"caption":"col1"
},
{
"id":"col2",
"width":"8em",
"type":"input",
"caption":"col2"
},
{
"id":"col3",
"width":"8em",
"type":"input",
"caption":"col3"
},
{
"id":"col4",
"width":"8em",
"type":"input",
"caption":"col4"
}])
.setRows([{
"cells":[{
"value":"row1 col1"
},
{
"value":"row1 col2"
},
{
"value":"row1 col3"
},
{
"value":"row1 col4"
}]
},
{
"cells":[{
"value":"row2 col1"
},
{
"value":"row2 col2"
},
{
"value":"row2 col3"
},
{
"value":"row2 col4"
}]
},
{
"cells":[{
"value":"row3 col1"
},
{
"value":"row3 col2"
},
{
"value":"row3 col3"
},
{
"value":"row3 col4"
}],
"sub":[{
"cells":["sub31","sub32","sub33","sub34"]
}]
},
{
"iniFold":false,
"cells":[{
"value":"row4 col1"
},
{
"value":"row4 col2"
},
{
"value":"row4 col3"
},
{
"value":"row4 col4"
}],
"sub":[{
"cells":[{
"value":"sub41"
},
{
"value":"sub42"
},
{
"value":"sub43"
},
{
"value":"sub44"
}]
}]
}])
);

return children;
// ]]Code created by CrossUI RAD Studio
}
}
});
   
support
 
Posts: 350
Joined: Sat Apr 27, 2013 9:22 am


Return to CrossUI for Web Apps

Who is online

Users browsing this forum: No registered users and 0 guests

cron