JavaScript DHTML/SmartClient/StretchImgButton
Содержание
Disabled StretchImgButton
<source lang="html4strict">
<HTML><HEAD>
<SCRIPT>var isomorphicDir="isomorphic/";</SCRIPT> <SCRIPT SRC=isomorphic/system/modules/ISC_Core.js></SCRIPT> <SCRIPT SRC=isomorphic/system/modules/ISC_Foundation.js></SCRIPT> <SCRIPT SRC=isomorphic/system/modules/ISC_Containers.js></SCRIPT> <SCRIPT SRC=isomorphic/system/modules/ISC_Grids.js></SCRIPT> <SCRIPT SRC=isomorphic/system/modules/ISC_Forms.js></SCRIPT> <SCRIPT SRC=isomorphic/system/modules/ISC_DataBinding.js></SCRIPT> <SCRIPT SRC=isomorphic/skins/standard/load_skin.js></SCRIPT>
</HEAD><BODY> <SCRIPT> Label.create({
ID:"results", height:20, width:200, top:300, left:35
}) function showClicked(name) {
results.setContents(name + " clicked");
} // Buttons StretchImgButton.create({
ID:"b2", left:20, top:80, width:80, height:33, vertical:false, capSize:16, title:"Disabled", click:"showClicked(this.title)", disabled:true
});
var selectedStretchImgButton = rb1;
</SCRIPT>
</BODY>
</HTML>
</source>
Group StretchImgButton to create RadioButtons
<source lang="html4strict">
<HTML><HEAD>
<SCRIPT>var isomorphicDir="isomorphic/";</SCRIPT> <SCRIPT SRC=isomorphic/system/modules/ISC_Core.js></SCRIPT> <SCRIPT SRC=isomorphic/system/modules/ISC_Foundation.js></SCRIPT> <SCRIPT SRC=isomorphic/system/modules/ISC_Containers.js></SCRIPT> <SCRIPT SRC=isomorphic/system/modules/ISC_Grids.js></SCRIPT> <SCRIPT SRC=isomorphic/system/modules/ISC_Forms.js></SCRIPT> <SCRIPT SRC=isomorphic/system/modules/ISC_DataBinding.js></SCRIPT> <SCRIPT SRC=isomorphic/skins/standard/load_skin.js></SCRIPT>
</HEAD><BODY> <SCRIPT> Label.create({
ID:"results", height:20, width:200, top:300, left:35
}) function showClicked(name) {
results.setContents(name + " clicked");
} // Buttons StretchImgButton.create({
ID:"rb1", left:20, top:200, width:120, height:33, vertical:false, capSize:16, title:"Radio Button 1", click:"if (selectedStretchImgButton != this) {selectedStretchImgButton.deselect(); selectedStretchImgButton=this}; showClicked(this.title)", selected:true, actionType:"radio"
});
StretchImgButton.create({
ID:"rb2", left:160, top:200, width:120, height:33, vertical:false, capSize:16, title:"Radio Button 2", click:"if (selectedStretchImgButton != this) {selectedStretchImgButton.deselect(); selectedStretchImgButton=this}; showClicked(this.title)", actionType:"radio"
});
StretchImgButton.create({
ID:"rb3", left:300, top:200, width:120, height:33, vertical:false, capSize:16, title:"Radio Button 3", click:"if (selectedStretchImgButton != this) {selectedStretchImgButton.deselect(); selectedStretchImgButton=this}; showClicked(this.title)", actionType:"radio"
}); var selectedStretchImgButton = rb1; </SCRIPT> </BODY> </HTML>
</source>
Selected and Disabled StretchImgButton
<source lang="html4strict">
<HTML><HEAD>
<SCRIPT>var isomorphicDir="isomorphic/";</SCRIPT> <SCRIPT SRC=isomorphic/system/modules/ISC_Core.js></SCRIPT> <SCRIPT SRC=isomorphic/system/modules/ISC_Foundation.js></SCRIPT> <SCRIPT SRC=isomorphic/system/modules/ISC_Containers.js></SCRIPT> <SCRIPT SRC=isomorphic/system/modules/ISC_Grids.js></SCRIPT> <SCRIPT SRC=isomorphic/system/modules/ISC_Forms.js></SCRIPT> <SCRIPT SRC=isomorphic/system/modules/ISC_DataBinding.js></SCRIPT> <SCRIPT SRC=isomorphic/skins/standard/load_skin.js></SCRIPT>
</HEAD><BODY> <SCRIPT> Label.create({
ID:"results", height:20, width:200, top:300, left:35
}) function showClicked(name) {
results.setContents(name + " clicked");
} // Buttons
StretchImgButton.create({
ID:"cb3", left:20, top:20, width:150, height:33, vertical:false, capSize:16, title:"Selected & Disabled", click:"showClicked(this.title)", disabled:true, selected:true, actionType:"checkbox"
});
var selectedStretchImgButton = rb1; </SCRIPT> </BODY> </HTML>
</source>
StretchImgButton: title and action event handler
<source lang="html4strict">
<HTML><HEAD>
<SCRIPT>var isomorphicDir="isomorphic/";</SCRIPT> <SCRIPT SRC=isomorphic/system/modules/ISC_Core.js></SCRIPT> <SCRIPT SRC=isomorphic/system/modules/ISC_Foundation.js></SCRIPT> <SCRIPT SRC=isomorphic/system/modules/ISC_Containers.js></SCRIPT> <SCRIPT SRC=isomorphic/system/modules/ISC_Grids.js></SCRIPT> <SCRIPT SRC=isomorphic/system/modules/ISC_Forms.js></SCRIPT> <SCRIPT SRC=isomorphic/system/modules/ISC_DataBinding.js></SCRIPT> <SCRIPT SRC=isomorphic/skins/standard/load_skin.js></SCRIPT>
</HEAD><BODY> <SCRIPT> Label.create({
ID:"results", height:20, width:200, top:300, left:35
}) function showClicked(name) {
results.setContents(name + " clicked");
} // Buttons StretchImgButton.create({
ID:"b1", left:20, top:80, width:80, height:33, vertical:false, capSize:16, title:"Button", click:"showClicked(this.title)"
});
var selectedStretchImgButton = rb1;
</SCRIPT>
</BODY>
</HTML>
</source>
Turn StretchImgButton a checkbox
<source lang="html4strict">
<HTML><HEAD>
<SCRIPT>var isomorphicDir="isomorphic/";</SCRIPT> <SCRIPT SRC=isomorphic/system/modules/ISC_Core.js></SCRIPT> <SCRIPT SRC=isomorphic/system/modules/ISC_Foundation.js></SCRIPT> <SCRIPT SRC=isomorphic/system/modules/ISC_Containers.js></SCRIPT> <SCRIPT SRC=isomorphic/system/modules/ISC_Grids.js></SCRIPT> <SCRIPT SRC=isomorphic/system/modules/ISC_Forms.js></SCRIPT> <SCRIPT SRC=isomorphic/system/modules/ISC_DataBinding.js></SCRIPT> <SCRIPT SRC=isomorphic/skins/standard/load_skin.js></SCRIPT>
</HEAD><BODY> <SCRIPT> Label.create({
ID:"results", height:20, width:200, top:300, left:35
}) function showClicked(name) {
results.setContents(name + " clicked");
} // Buttons
StretchImgButton.create({
ID:"cb1", left:20, top:140, width:100, height:33, vertical:false, capSize:16, title:"Checkbox 1", click:"showClicked(this.title)", selected:true, actionType:"checkbox"
});
var selectedStretchImgButton = rb1;
</SCRIPT>
</BODY>
</HTML>
</source>