SetClass("biginput"); $this->SetName($name); $this->SetSize($size); $this->SetCaption($caption); $this->SetValue($value); $this->SetReadonly($readonly); } function Show() { if(isset($this->caption)) print ($this->caption." "); parent::Show(); } function SetReadonly($value='yes') { if(is_string($value)) { if($value=='no') return $this->DelOption("readonly"); elseif($value=='yes') return $this->AddOption("readonly",'readonly'); } return $this->error("Incorrect value for SetReadonly [$value]"); } function SetName($value='textbox') { if(!is_string($value)) { return $this->error("Incorrect value for SetName [$value]"); } return $this->AddOption("name",$value); } function SetCaption($value=NULL) { if(is_null($value)) unset($this->caption); elseif(is_string($value)) $this->caption = $value; else { return $this->error("Incorrect value for SetCaption [$value]"); } return 0; } function SetValue($value=NULL) { if(is_null($value)) $value=""; if(is_numeric($value)) $value = strval($value); if(is_string($value)) { return $this->AddOption("value",$value); } return $this->error("Incorrect value for SetValue [$value]"); } function SetSize($value) { if(!is_numeric($value)) { return $this->error("Incorrect value for SetSize [$value]"); } return $this->AddOption("size",strval($value)); } } ?>