It's not in QControl.inc but it QLabel.inc
protected function GetControlHtml() {
$strStyle = $this->GetStyleAttributes();
if ($strStyle)
$strStyle = sprintf('style=“%s”', $strStyle);
$strToReturn = sprintf('<span id=“%s” %s%s>%s</span>',
$this->strControlId,
$this->GetAttributes(),
$strStyle,
$this->strText);
return $strToReturn;
}
this would need to be changed to something like this:
protected function GetControlHtml() {
$strStyle = $this->GetStyleAttributes();
if ($strStyle)
$strStyle = sprintf('style=“%s”', $strStyle);
$strToReturn = sprintf('<label for=“%s” id=“%s” %s%s>%s</label>',
$this->strForControlId,
$this->strControlId,
$this->GetAttributes(),
$strStyle,
$this->strText);
return $strToReturn;
}
This would be a “correct” label control. the $this->strForControlId would need to be set when creating a new label ex. $lblMyLabel = new QLabel($txtText->ControlId);
You would ofcource need to set the $this->strForControlId in the _contstruct.
I could make my own QCustomLabel.inc, but I think this would add some good functionality for people that at used to using desktopapplications.