function HTMLLabeledComponent(sys, formID, code, posX, posY, width, height, description, value) {
  this.create(sys, formID, code, posX, posY, width, height, description, value);
}

HTMLLabeledComponent.inherits(HTMLElementBase);

//*** Constantes
HTMLLabeledComponent.prototype.name = 'HTMLLabeledComponent';
HTMLLabeledComponent.prototype.labelDivHeight = 15;
//***

HTMLLabeledComponent.prototype.createLabelDiv = function() {
    this.labeldiv = this.getDiv('WFRComponentLabel'+this.code, 0, -1*this.labelDivHeight, 0, this.labelDivHeight, 2, true);

    this.label = document.createElement("font");
    this.label.className = 'label';
    this.label.innerHTML = this.decorateRequired(this.description.replace(/\s/g, '&nbsp;'), this.required);
    this.label.style.whiteSpace = "nowrap";
    this.label.style.cursor = 'default';
    this.label.onmousedown = function() { return false; };
    this.label.onselectstart = function() { return false; };

    this.labeldiv.appendChild(this.label);
}

HTMLLabeledComponent.prototype.design = function(doc, tabControl) {
  this.doc = doc;
  if (this.description != '') {
    this.div      = this.getDiv('WFRComponent'+this.code, this.posX, this.posY, this.width, this.height+this.labelDivHeight, this.zindex, true);
    this.createLabelDiv();
    this.context = this.getDiv('WFRComponentContext'+this.code, 0, 0, this.width, this.height, 2, true);
  } else
    this.div = this.getDiv('WFRComponent'+this.code, this.posX, this.posY, this.width, this.height, this.zindex, true);

  if (this.labeldiv) this.div.appendChild(this.labeldiv);
  if (this.context)
    this.div.appendChild(this.context);
  else
    this.context = this.div;

  this.designComponent(doc);
  doc.appendChild(this.div);

  if (this.label) {
    this.label.draggable = false;
    this.label.resizable = false;
  }

  this.init(tabControl);
}

HTMLLabeledComponent.prototype.setDescription = function(description) {
  this.description = description.toString(); //Força o tipo para String
  if (this.label) {
    this.label.innerHTML = this.description.replace(/\s/g, '&nbsp;');
  }
}

HTMLLabeledComponent.prototype.flush = function() {
  if (this.label) {
    if (this.label.onmousedown) this.label.onmousedown = null;
    if (this.label.onselectstart) this.label.onselectstart = null;
    this.label = null;
  }
  this.labeldiv = null;
  this.callMethod(HTMLElementBase, "flush");
}