CodeCharge Studio

Visible Run-Time Property (PHP)

Applies to

Button Control, Label Control, TextBox Control, TextArea Control, Checkbox Control, Image Control, ImageLink Control, DatePicker Control, Hidden Control, Grid Form, ListBox Control, CheckboxList Control, RadioButton Control, Record Form, Sorter Control, EditableGrid Form, Path Control, Directory Form, FileUpload Control, Panel

Type

boolean

Access

read/write

Syntax

object->Visible [= value]

Description

Specifies whether the control is visible. Setting this field to false will prevent the object from being displayed.

Note: Property is tested before calling Before Show Event. In order for the property change to be taken into consideration it should be set earlier. For instance in parent component's Before Show Event.

Note: Most of the controls need Extended HTML property checked, which allows them to be hidden. This property is available after selecting Edit ... from the context menu of the control during design-time.

Examples

The following example shows how to hide a form if there are no records retrieved from the database.

global $items;
if ($items->DataSource->RecordsCount<1)
{
  $items->Visible = false;
}
where $items is the name of the form.

Other examples

Hiding a Grid If No Records are Found,
Hiding a Record Form Control


On-line, printable versions and updates