AtkTabbedPane: Difference between revisions
Appearance
| Line 6: | Line 6: | ||
= Examples = | = Examples = | ||
The following code adds several attributes, and then groups them into 2 tabs: | |||
<syntaxhighlight lang="php"> | |||
$this->add(new atkAttribute("billing_street")); | |||
$this->add(new atkAttribute("billing_city")); | |||
$this->add(new atkAttribute("shipping_street")); | |||
$this->add(new atkAttribute("shipping_city")); | |||
$this->add(new atkTabbedPane("addresses", | |||
array("shipping"=>array("shipping_street", "shipping_city"), | |||
"billing"=>array("billing_street", "shipping_street"))); | |||
</syntaxhighlight> | |||
= Relevant howto's = | = Relevant howto's = | ||
* [[Grouping attributes into tabs]] | * [[Grouping attributes into tabs]] | ||
Revision as of 07:07, 26 August 2008

Description
the atkTabbedPane can be used to group attributes into tabs. An example application of this is the situation where a customer has a billing address and a shipping address. By adding all the address fields and then placing them in an atkTabbedPane, you can visually separate the fields into tabs.
Examples
The following code adds several attributes, and then groups them into 2 tabs:
$this->add(new atkAttribute("billing_street"));
$this->add(new atkAttribute("billing_city"));
$this->add(new atkAttribute("shipping_street"));
$this->add(new atkAttribute("shipping_city"));
$this->add(new atkTabbedPane("addresses",
array("shipping"=>array("shipping_street", "shipping_city"),
"billing"=>array("billing_street", "shipping_street")));