It is currently Sat Jun 24, 2017 3:23 am

News News of CrossUI Code Snaps

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

Find code here before you post.

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 : 1231 | 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 : 1577 | 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 : 2780 | 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 : 1167 | 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 : 1430 | 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 : 1305 | 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 : 1230 | Replies : 0


xui.UI.CheckBox & xui.UI.SCheckBox

Class('App.xui_UI_CheckBox', '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")
.setLeft(50)
.setTop(110)
.setWidth(330)
.setHeight(310)
.setCaption("xui.UI.CheckBox")
.setToggleBtn(false)
);

host.group2.append((new xui.UI.CheckBox)
.setHost(host,"checkbox5")
.setLeft(30)
.setTop(50)
.setWidth(250)
.setHeight(30)
.setCaption("a advanced checkbox with image")
.setImage("img/demo.gif")
);

host.group2.append((new xui.UI.CheckBox)
.setHost(host,"checkbox4")
.setLeft(30)
.setTop(90)
.setWidth(250)
.setHeight(30)
.setShadow(true)
.setResizer(true)
.setCaption("a advanced checkbox with shadow")
);

host.group2.append((new xui.UI.CheckBox)
.setHost(host,"checkbox6")
.setLeft(30)
.setTop(210)
.setWidth(250)
.setHeight(30)
.setCaption("Check me to check all")
.afterUIValueSet("_checkbox_aftervalueupdated")
);

host.group2.append((new xui.UI.CheckBox)
.setHost(host,"checkbox1")
.setLeft(30)
.setTop(180)
.setWidth(250)
.setCaption("Cant ...
Read more : xui.UI.CheckBox & xui.UI.SCheckBox | Views : 1098 | Replies : 0


xui.UI.Button & xui.UI.SButton

Class('App.xui_UI_Button', '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")
.setLeft(30)
.setTop(10)
.setWidth(650)
.setHeight(70)
.setCaption("xui.UI.SButton (recommended)")
.setToggleBtn(false)
);

host.group2.append((new xui.UI.SButton)
.setHost(host,"sbutton1")
.setLeft(20)
.setTop(10)
.setCaption("I'm a simple button (height is fixed )")
);

host.group2.append((new xui.UI.SButton)
.setHost(host,"sbutton2")
.setLeft(360)
.setTop(10)
.setCaption("click the simple button")
.onClick("_sbutton2_onclick")
);

append((new xui.UI.Group)
.setHost(host,"group3")
.setLeft(30)
.setTop(90)
.setWidth(650)
.setHeight(290)
.setCaption("xui.UI.Button")
.setToggleBtn(false)
);

host.group3.append((new xui.UI.Button)
.setHost(host,"button20")
.setDisabled(true)
.setLeft(20)
.setTop(10)
.setWidth(180)
.setCaption("a disabled button")
.setType("status")
.onChecked("_button28_ontoggle")
);

host.group3.append((new ...
Read more : xui.UI.Button & xui.UI.SButton | Views : 1220 | Replies : 0


xui.UI.Link

Class('App.xui_UI_Link', '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.Link)
.setHost(host,"link1")
.setLeft(60)
.setTop(60)
.setCaption("A default link can't open the href")
.setHref("http://www.google.com")
.setTarget("_blank")
.onClick("_link1_onclick")
);

append((new xui.UI.Link)
.setHost(host,"link2")
.setLeft(60)
.setTop(140)
.setCaption("A link with onClick event")
.onShowTips("_shotips")
.onClick("_link2_onclick")
);

append((new xui.UI.Link)
.setHost(host,"link3")
.setDisabled(true)
.setLeft(60)
.setTop(200)
.setCaption("a disabled link")
);

append((new xui.UI.Link)
.setHost(host,"link6")
.setLeft(60)
.setTop(100)
.setCaption("A link can open the href")
.setHref("http://www.google.com")
.setTarget("_blank")
);

return children;
// ]]code created by CrossUI ...
Read more : xui.UI.Link | Views : 1261 | Replies : 0


 

Login  •  Register


Statistics

Total posts 960 • Total topics 321 • Total members 35

cron