all groups > flash (macromedia) > november 2005 >
You're in the

flash (macromedia)

group:

extending UI Components


extending UI Components dweeres
11/13/2005 9:55:36 PM
flash (macromedia):
Can anyone show an example or lead me to a tutorial on how to extend a User
Interface component such as a TextInput so that the when "set enabled" is
called that is does custom functionality.

What I have so far is:


class DC.sandbox.DCTextInput extends mx.controls.TextInput {
function DCTextInput() {}

function init() {super.init()}
function createChildren():Void{super.createChildren()}
function size(){super.size();invalidate();}

function set enabled(e:Boolean):Void {
if (!e) {
setStyle("borderStyle", "none");
_alpha=0
} else {
setStyle("borderStyle", "inset");
_alpha=100
}
super.setEnabled(e);
}
function get enabled():Boolean {return enabled}
}


but I think I am missing something because I am not able to set the other
functions such as text etc.

can anyone help me out here?

thanks

Re: extending UI Components dweeres
11/14/2005 12:00:00 AM
AddThis Social Bookmark Button