Start typing in the text area until it starts to grow. Notice that instead of pushing the button down, the textarea continues to grow behind it.
Code:
isc.ClassFactory.defineClass("CwButtonItem", "CanvasItem");
isc.CwButtonItem.addProperties({
init:function () {
var canvasProperties = {
shouldSaveValue: false,
cwUploadControl: this.cwUploadControl,
$isCwButton: this.$isCwButton,
icon: this.icon,
iconOrientation: this.iconOrientation,
hoverStyle: this.hoverStyle,
hoverWidth: this.hoverWidth,
//baseStyle: this.buttonStyle,
ID: this.widgetID,
width: this.width,
height: this.height,
action: this.cwClick,
showRollOver: this.showRollOver,
showDown: false,
iconWidth: this.iconWidth,
iconHeight: this.iconHeight,
iconSpacing: this.iconSpacing,
name: this.name,
autoFit: this.autoFit,
title: this.buttonLabel,
align: this.textAlign,
auditor: this.auditor,
$cwname: this.$cwname,
autoFit: this.autoFit,
iconWidth: this.iconWidth,
iconHeight: this.iconHeight,
keyPress: this.keyPress,
showFocused: this.showFocused,
$cwValidate: this.$cwValidate
};
if (this.buttonStyle != null) {
canvasProperties.baseStyle = this.buttonStyle;
if (this.cwAutoFit)
canvasProperties.overflow = "visible";
}
if (this.cwStretchButton) {
canvasProperties.autoFit = this.cwAutoFit;
canvasProperties.showRollOver = true;
canvasProperties.src = this.cwImageSrc;
if (this.cwCapSize)
canvasProperties.capSize = this.cwCapSize;
if (canvasProperties.autoFit) {
canvasProperties.overflow = "visible";
}
canvasProperties.titleSuffix = "";
if (canvasProperties.autoFit && this.cwLabelLengthPad)
canvasProperties.labelLengthPad = this.cwLabelLengthPad;
this.canvas = isc.StretchImgButton.create(canvasProperties);
}
else
this.canvas = isc.Button.create(canvasProperties);
//this.showTitle = false;
this.title = ""; //this is needed for the canvasItem otherwise a title will appear on top of the button or beside it
return this.Super("init", arguments);
},
setCwDynStyle:function(style) {
this.buttonStyle = style;
if (this.canvas != null) {
this.canvas.setProperty("baseStyle", style);
this.canvas.markForRedraw();
if (this.canvas.autoFit && this.form)
this.form.markForRedraw();
}
},
setCwDynIcon:function(icon) {
if (this.canvas != null) {
this.canvas.setProperty("icon", style);
this.canvas.markForRedraw();
if (this.canvas.autoFit && this.form)
this.form.markForRedraw();
}
},
setCwDynImage:function(image) {
if (this.canvas != null) {
this.canvas.setProperty("src", image);
this.canvas.markForRedraw();
}
}
});
isc.DynamicForm.create({numCols:4,
fields: [
{title:"Description",_constructor:"AutoFitTextAreaItem",height:20},{_constructor:"SpacerItem",colSpan:2, title:"test",align: "right"} , {_constructor: "CwButtonItem", buttonLabel:"test",align: "right",width:100,height:20}
]
});
Comment