It is currently Wed Nov 22, 2017 6:22 pm

News News of CrossUI Code Snaps

Site map of CrossUI Code Snaps » Forum : CrossUI Code Snaps

Find code here before you post.

xui.UI.Pane

Class('App.xui_UI_Pane', 'xui.Com',{
Instance:{
iniComponents:function(){
// [[code created by CrossUI RAD Tools
var host=this, children=, append=function(child){children.push(child.get(0))};

append(
(new xui.UI.Pane)
.setHost(host,"pane1")
.setLeft(60)
.setTop(40)
.setWidth(110)
.setHeight(178)
.setHtml("pane1")
);

host.pane1.append(
(new xui.UI.Button)
.setHost(host,"button15")
.setLeft(10)
.setTop(70)
.setWidth(60)
.setCaption("btn")
);

append(
(new xui.UI.Pane)
.setHost(host,"pane2")
.setLeft(190)
.setTop(40)
.setWidth(110)
.setHeight(178)
.setHtml("pane2")
.setCustomStyle({"KEY":"background:#00ff00;border:solid 1px #888"})
);

host.pane2.append(
(new xui.UI.Button)
.setHost(host,"button16")
.setLeft(20)
.setTop(80)
.setWidth(60)
.setCaption("btn")
);

append(
(new xui.UI.Pane)
.setHost(host,"pane3")
.setLeft(320)
.setTop(40)
.setWidth(110)
.setHeight(178)
.setHtml("<strong>pane3</strong>")
);

host.pane3.append(
(new xui.UI.Button)
.setHost(host,"button17")
.setLeft(20)
.setTop(70)
.setWidth(60)
.setCaption("btn")
); ...
Read more : xui.UI.Pane | Views : 1465 | Replies : 0


xui.UI.Group

Class('App.xui_UI_Group', 'xui.Com',{
Instance:{
iniComponents:function(){
// [[code created by CrossUI RAD Tools
var host=this, children=, append=function(child){children.push(child.get(0))};

append(
(new xui.UI.Group)
.setHost(host,"group2")
.setTips("this is group2")
.setLeft(40)
.setTop(20)
.setWidth(200)
.setHeight(150)
.setCaption("group2")
.setImage("img/demo.gif")
);

host.group2.append(
(new xui.UI.Input)
.setHost(host,"input2")
.setLeft(24)
.setTop(64)
);

host.group2.append(
(new xui.UI.Button)
.setHost(host,"button1")
.setLeft(24)
.setTop(24)
.setCaption("button1")
);

append(
(new xui.UI.Group)
.setHost(host,"group3")
.setLeft(270)
.setTop(20)
.setWidth(370)
.setHeight(150)
.setCaption("group3")
.setToggleBtn(false)
);

host.group3.append(
(new xui.UI.Group)
.setHost(host,"group5")
.setLeft(170)
.setTop(10)
.setWidth(120)
.setHeight(108)
.setCaption("group5")
);

host.group3.append(
(new xui.UI.Group)
.setHost(host,"group4")
.setLeft(30)
.setTop(10)
.setWidth(110)
.setHeight(108)
.setCaption("group4")
.setToggleBtn(false) ...
Read more : xui.UI.Group | Views : 1464 | Replies : 0


xui.UI.StatusButtons

Class('App.xui_UI_StatusButtons', 'xui.Com',{
Instance:{
iniComponents:function(){
// [[code created by CrossUI RAD Tools
var host=this, children=, append=function(child){children.push(child.get(0))};

append(
(new xui.UI.StatusButtons)
.setHost(host,"linklist1")
.setItems()
.setLeft(40)
.setTop(40)
.setWidth(250)
.setHeight(50)
);

append(
(new xui.UI.StatusButtons)
.setHost(host,"linklist2")
.setItems()
.setLeft(40)
.setTop(90)
.setWidth(250)
.setHeight(50)
.setItemMargin("4px")
.setSelMode('multi')
.setItemLinker("none")
.onItemSelected("_linklist2_sel")
);

append(
(new xui.UI.StatusButtons)
.setHost(host,"ctl_statusbuttons5")
.setItems([{"id":"a", "caption":"itema", "tips":"item a", "itemLinker":"right"}, {"id":"b", "caption":"itemb", "tips":"item b", "itemLinker":"none","itemMargin":"0 ...
Read more : xui.UI.StatusButtons | Views : 1225 | Replies : 0


xui.UI.RadioBox

Class('App.xui_UI_RadioBox', 'xui.Com',{
Instance:{
iniComponents:function(){
// [[code created by CrossUI RAD Tools
var host = this,
children = ,
append = function(child){
children.push(child.get(0))
};

append((new xui.UI.Label)
.setHost(host,"label1")
.setLeft(272)
.setTop(136)
.setWidth(216)
.setCaption("")
);

append((new xui.UI.RadioBox)
.setHost(host,"radiobox2")
.setValue("a")
.setLeft(128)
.setTop(40)
.setItems()
.setWidth(72)
.setHeight(256)
.beforeUIValueSet("_radiobox2_beforevalueupdated")
.afterUIValueSet("_radiobox2_aftervalueupdated")
);

append((new xui.UI.RadioBox)
.setHost(host,"radiobox3")
.setLeft(230)
.setTop(40)
.setWidth(118)
.setHeight(208)
.setItems()
.afterUIValueSet("_radiobox2_aftervalueupdated")
);

return children;
// ]]code created by CrossUI RAD Tools
},
_radiobox2_beforevalueupdated:function (profile, oldValue, newValue) {
if(newValue=='b'){
xui.message("You can't select 'b'");
return false; ...
Read more : xui.UI.RadioBox | Views : 1514 | Replies : 0


xui.UI.Slider

Class('App.xui_UI_Slider', 'xui.Com',{
Instance:{
iniComponents:function(){
// [[code created by CrossUI RAD Tools
var host=this, children=, append=function(child){children.push(child.get(0))};

append((new xui.UI.Slider)
.setHost(host,"slider2")
.setLeft(170)
.setTop(220)
.setWidth(360)
.setValue("30:50")
.afterUIValueSet("_slider2_afteruivalueset")
);

append((new xui.UI.Slider)
.setHost(host,"slider1")
.setLeft(170)
.setTop(40)
.setIsRange(false)
.afterUIValueSet("_slider1_afteruivalueset")
);

append((new xui.UI.Div)
.setHost(host,"div14")
.setLeft(570)
.setTop(50)
.setWidth(100)
.setHeight(30)
);

append((new xui.UI.Div)
.setHost(host,"div15")
.setLeft(570)
.setTop(90)
.setWidth(100)
.setHeight(30)
);

append((new xui.UI.Div)
.setHost(host,"div20")
.setLeft(570)
.setTop(130)
.setWidth(100)
.setHeight(30)
);

append((new xui.UI.Slider)
.setHost(host,"slider16")
.setLeft(170)
.setTop(160)
.setWidth(230)
.setSteps(100)
.setIsRange(false)
.afterUIValueSet("_slider16_afteruivalueset")
);

append((new xui.UI.Div)
.setHost(host,"div24")
.setLeft(570)
.setTop(170)
.setWidth(100)
.setHeight(30)
);

append((new ...
Read more : xui.UI.Slider | Views : 1855 | Replies : 0


xui.UI.ProgressBar

Class('App.xui_UI_ProgressBar', 'xui.Com',{
Instance:{
iniComponents:function(){
// [[code created by CrossUI RAD Tools
var host=this, children=, append=function(child){children.push(child.get(0))};

append((new xui.UI.ProgressBar)
.setHost(host,"progressbar1")
.setLeft(50)
.setTop(100)
.setCaptionTpl("{value}% finished")
);

append((new xui.UI.ProgressBar)
.setHost(host,"progressbar2")
.setLeft(50)
.setTop(20)
.setHeight(24)
.setValue(60)
);

append((new xui.UI.ProgressBar)
.setHost(host,"progressbar3")
.setLeft(50)
.setTop(160)
.setHeight(20)
.setBorder(true)
.setShadow(true)
.setResizer(true)
.setFillBG("blue")
.setValue(30)
);

append((new xui.UI.Button)
.setHost(host,"button21")
.setLeft(370)
.setTop(100)
.setCaption("start")
.onClick("_button21_onclick")
);

append((new xui.UI.ProgressBar)
.setHost(host,"progressbar4")
.setLeft(50)
.setTop(70)
.setCaptionTpl("")
);

append((new xui.UI.Button)
.setHost(host,"button7")
.setLeft(370)
.setTop(70)
.setCaption("start")
.onClick("_button7_onclick")
);

append((new xui.UI.Button)
.setHost(host,"button14")
.setLeft(370)
.setTop(160)
.setCaption("start")
.onClick("_button14_onclick")
);

return ...
Read more : xui.UI.ProgressBar | Views : 3018 | Replies : 0


xui.UI.RichEditor

   
Class('App.xui_UI_RichEditor', 'xui.Com',{
Instance:{
iniComponents:function(){
// [[code created by CrossUI RAD Tools
var host=this, children=, append=function(child){children.push(child.get(0))};

append((new xui.UI.RichEditor)
.setHost(host,"richeditor1")
.setLeft(50)
.setTop(30)
.setHeight(140)
.setValue("<font style=\"background-color: rgb(0, 255, 0);\" size=\"4\">A</font> <font size=\"4\" face=\"Arial Black\">RichEditor </font><b><font color=\"#9400d3\">powered by</font></b> <font face=\"Comic Sans MS\">xui.</font><br>")
);

append((new xui.UI.RichEditor)
.setHost(host,"richeditor2")
.setLeft(50)
.setTop(180)
.setHeight(140)
.setCmdList("font1;font2;font3;font4")
.setValue("Customized command button group.")
);

append((new xui.UI.RichEditor)
.setHost(host,"richeditor3")
.setDisabled(true)
.setLeft(50)
.setTop(330)
.setHeight(140)
.setValue("Disabled")
);

return children;
// ]]code created by CrossUI RAD Tools
}
}
});
   
Read more : xui.UI.RichEditor | Views : 1459 | Replies : 0


xui.UI.List

Class('App.xui_UI_List', 'xui.Com',{
Instance:{
iniComponents:function(){
// [[code created by CrossUI RAD Tools
var host=this, children=, append=function(child){children.push(child.get(0))};

append(
(new xui.UI.List)
.setHost(host,"list2")
.setItems()
.setDisabled(true)
.setLeft(30)
.setTop(240)
.setHeight(100)
.onItemSelected("_list5_onitemselected")
);

append(
(new xui.UI.Div)
.setHost(host,"div36")
.setLeft(30)
.setTop(50)
.setWidth(120)
.setHeight(20)
.setHtml("select mode : single")
);

append(
(new xui.UI.Div)
.setHost(host,"div37")
.setLeft(200)
.setTop(50)
.setWidth(120)
.setHeight(20)
.setHtml("select mode : multi")
); ...
Read more : xui.UI.List | Views : 1659 | Replies : 0


xui.UI.ComboInput

Class('App.xui_UI_ComboInput', 'xui.Com',{
Instance:{
iniComponents:function(){
// [[code created by CrossUI RAD Tools
var host=this, children=, append=function(child){children.push(child.get(0))};

append(
(new xui.UI.Label)
.setHost(host,"label6")
.setLeft(32)
.setTop(200)
.setWidth(104)
.setCaption("ongetshowvalue")
);

append(
(new xui.UI.Label)
.setHost(host,"label11")
.setLeft(8)
.setTop(96)
.setWidth(136)
.setCaption("combobox (textarea)")
);

append(
(new xui.UI.Label)
.setHost(host,"label3")
.setLeft(320)
.setTop(110)
.setWidth(104)
.setCaption("getter")
);

append(
(new xui.UI.Label)
.setHost(host,"label2")
.setLeft(8)
.setTop(144)
.setWidth(136)
.setCaption("combobox (integer only)")
);

append(
(new xui.UI.Label)
.setHost(host,"label12")
.setLeft(320)
.setTop(80)
.setWidth(104)
.setCaption("listbox(disabled)")
);

append(
(new xui.UI.Label)
.setHost(host,"label5")
.setLeft(320)
.setTop(140)
.setWidth(104)
.setCaption("pop box")
);

append(
(new ...
Read more : xui.UI.ComboInput | Views : 1585 | Replies : 0


xui.UI.Input

Class('App.xui_UI_Input', 'xui.Com',{
Instance:{
iniComponents:function(){
// [[code created by CrossUI RAD Tools
var host=this, children=, append=function(child){children.push(child.get(0))};

append((new xui.UI.Label)
.setHost(host,"label13")
.setLeft(58)
.setTop(340)
.setWidth(296)
.setCaption("Input 'allow' only, using 'beforeFormatCheck' event")
);

append((new xui.UI.Label)
.setHost(host,"label10")
.setLeft(346)
.setTop(274)
.setWidth(104)
.setCaption("integer")
);

append((new xui.UI.Label)
.setHost(host,"label7")
.setLeft(26)
.setTop(242)
.setWidth(104)
.setCaption("email")
);

append((new xui.UI.Label)
.setHost(host,"label12")
.setLeft(346)
.setTop(306)
.setWidth(104)
.setCaption("MM/DD/YYYY")
);

append((new xui.UI.Label)
.setHost(host,"label9")
.setLeft(26)
.setTop(274)
.setWidth(104)
.setCaption("alpha")
);

append((new xui.UI.Label)
.setHost(host,"label8")
.setLeft(346)
.setTop(242)
.setWidth(104)
.setCaption("letter")
);

append((new xui.UI.Label)
.setHost(host,"label6")
.setLeft(10)
.setTop(178)
.setWidth(168)
.setCaption("border/resizer/shadow") ...
Read more : xui.UI.Input | Views : 1483 | Replies : 0


 

Login  •  Register


Statistics

Total posts 992 • Total topics 330 • Total members 35

cron