3 \page Group_Control Group Control
4 \brief **Used to group controls together.**
8 The group control is one of the most important controls. It allows you to group
9 controls together, applying attributes to all of them at once. It also remembers
10 the last navigated button in the group, so you can set the <b>`<onup>`</b> of a control
11 to a group of controls to have it always go back to the one you were at before.
12 It also allows you to position controls more accurately relative to each other,
13 as any controls within a group take their coordinates from the group's top left
14 corner (or from elsewhere if you use the "r" attribute). You can have as many
15 groups as you like within the skin, and groups within groups are handled with
19 --------------------------------------------------------------------------------
20 \section Group_Control_sect1 Example
23 <control type="group" id="17">
24 <description>My first group control</description>
29 <defaultcontrol>2</defaultcontrol>
30 <visible>true</visible>
35 ... more controls go here ...
40 --------------------------------------------------------------------------------
41 \section Group_Control_sect2 Available tags
43 In addition to the [Default Control Tags](http://kodi.wiki/view/Default_Control_Tags)
44 the following tags are available. Note that each tag is **lower case** only. This is
45 important, as `xml` tags are case-sensitive.
48 |------------------:|:--------------------------------------------------------------|
49 | defaultcontrol | Specifies the default control that will be focused within the group when the group receives focus. Note that the group remembers it's previously focused item and will return to it.
52 --------------------------------------------------------------------------------
53 \section Group_Control_sect3 Notes on positioning of controls within groups
55 All controls within a group take their positions relative to the group's placement.
56 Thus, the group always requires its <b>`<posx>`</b>, <b>`<posy>`</b>,
57 <b>`<width>`</b>, and <b>`<height>`</b> attributes to be defined.
58 As this can be a pain to remember, anything that you don't specify will be
59 inherited from it's parent group (or the main window).
61 By way of example, consider the first group within a PAL full screen window
62 (720x576), and suppose we have
65 <control type="group" id="15">
69 ... more controls go here ...
73 so that the <b>`<height>`</b> hasn't been defined. Then Kodi will
74 automatically set the <b>`<height>`</b> equal to 506 by inheriting this
75 from the window's height of 576, less the <b>`<posy>`</b> amount.
77 You can align controls within a group to the right edge of the group, by
78 using the <b>"r"</b> modifier to the <b>`<posx>`</b> and <b>`<posy>`</b> fields
81 <control type="group" id="20">
82 <control type="button" id=2>
86 <control type="button" id=3>
90 <control type="button" id=4>
97 All the buttons have width 180, and are aligned 180 pixels from the right edge of the group they're within.
100 --------------------------------------------------------------------------------
101 \section Group_Control_sect4 See also
105 - [Add-on development](http://kodi.wiki/view/Add-on_development)
106 - [Skinning](http://kodi.wiki/view/Skinning)