It is currently Sun Nov 17, 2019 3:04 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.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 : 2258 | 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 : 2318 | 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 : 2279 | 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 : 2438 | Replies : 0


xui.UI.Label & xui.UI.SLabel

Class('App.xui_UI_Label', '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,"group1")
.setLeft(50)
.setTop(20)
.setWidth(690)
.setHeight(100)
.setCaption("xui.UI.SLabel (recommended)")
.setToggleBtn(false)
);

host.group1.append((new xui.UI.SLabel)
.setHost(host,"slabel2")
.setLeft(280)
.setTop(10)
.setWidth(220)
.setCaption("simple label 1")
);

host.group1.append((new xui.UI.SLabel)
.setHost(host,"slabel3")
.setLeft(280)
.setTop(30)
.setWidth(220)
.setCaption("simple label 1-1")
);

host.group1.append((new xui.UI.SLabel)
.setHost(host,"slabel4")
.setLeft(280)
.setTop(50)
.setWidth(220)
.setCaption("simple label 1-1-1")
);

host.group1.append((new xui.UI.SLabel)
.setHost(host,"slabel5")
.setLeft(10)
.setTop(10)
.setCaption("simple label 1")
);

host.group1.append((new xui.UI.SLabel)
.setHost(host,"slabel6")
.setLeft(10)
.setTop(30)
.setCaption("simple label 1-1")
);

host.group1.append((new ...
Read more : xui.UI.Label & xui.UI.SLabel | Views : 2254 | Replies : 0


xui.UI.Div

Class('App.xui_UI_Div', '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.Image)
.setHost(host,"ctl_image5")
.setClassName("xui-uicmd-max")
.setLeft(240)
.setTop(10)
.setZIndex(10)
);

append(
(new xui.UI.Span)
.setHost(host,"ctl_span5")
.setClassName("xui-uicmd-min")
.setLeft(210)
.setTop(10)
.setWidth(30)
.setHeight(16)
.setZIndex(10)
);

append(
(new xui.UI.Div)
.setHost(host,"div1")
.setWidth("auto")
.setHeight(68)
.setPosition("relative")
.setHtml("text string")
.setCustomStyle({"KEY":"border:solid 1px #888"})
);

append(
(new xui.UI.Div)
.setHost(host,"div2")
.setWidth("auto")
.setHeight("auto")
.setPosition("relative")
.setHtml("<strong>auto height</strong>")
.onShowTips("_showtips")
.setCustomStyle({"KEY":"background:#00ff00;border:solid 1px #888"})
);

append(
(new xui.UI.Div)
.setHost(host,"div3")
.setWidth("auto")
.setHeight(100)
.setRenderer(function (data, uidata) {
uidata.html = ""; ...
Read more : xui.UI.Div | Views : 2866 | Replies : 0


 

Login


Statistics

Total posts 1003 • Total topics 337 • Total members 42

cron