Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 101 lines (77 sloc) 3.094 kB
fcc4fff @phiggins42 monster commit from moinconverter, which is always done prior to the …
phiggins42 authored
1 .. _dojox/widget/TitleGroup:
d608cc5 @phiggins42 \r\n -> \n conversion.
phiggins42 authored
2
149841c @phiggins42 mostly dojox.widget cleanups
phiggins42 authored
3 =======================
9dd52dc @phiggins42 mondo whitespace change
phiggins42 authored
4 dojox.widget.TitleGroup
5 =======================
d608cc5 @phiggins42 \r\n -> \n conversion.
phiggins42 authored
6
9dd52dc @phiggins42 mondo whitespace change
phiggins42 authored
7 :since: 1.6.0
149841c @phiggins42 mostly dojox.widget cleanups
phiggins42 authored
8
9 .. contents ::
10 :depth: 2
d608cc5 @phiggins42 \r\n -> \n conversion.
phiggins42 authored
11
9dd52dc @phiggins42 mondo whitespace change
phiggins42 authored
12 A container widget which delegates a connection between children :ref:`TitlePanes <dijit/TitlePane>`. Behaves similarly to an :ref:`AccordionContainer <dijit/layout/AccordionContainer>` though has a variable overall height and does not "dock" to other layout widgets, such as a :ref:`BorderContainer <dijit/layout/BorderContainer>`.
d608cc5 @phiggins42 \r\n -> \n conversion.
phiggins42 authored
13
9dd52dc @phiggins42 mondo whitespace change
phiggins42 authored
14 Examples
15 ========
d608cc5 @phiggins42 \r\n -> \n conversion.
phiggins42 authored
16
9a8ab5a @wkeese remove colons from level 3 headers
wkeese authored
17 A simple declarative example
18 ----------------------------
d608cc5 @phiggins42 \r\n -> \n conversion.
phiggins42 authored
19
9dd52dc @phiggins42 mondo whitespace change
phiggins42 authored
20 .. code-example::
d608cc5 @phiggins42 \r\n -> \n conversion.
phiggins42 authored
21
9dd52dc @phiggins42 mondo whitespace change
phiggins42 authored
22 .. css::
d608cc5 @phiggins42 \r\n -> \n conversion.
phiggins42 authored
23
9dd52dc @phiggins42 mondo whitespace change
phiggins42 authored
24 <style type="text/css">
25 @import "{{baseUrl}}dojox/widget/TitleGroup/TitleGroup.css";
26 </style>
d608cc5 @phiggins42 \r\n -> \n conversion.
phiggins42 authored
27
9dd52dc @phiggins42 mondo whitespace change
phiggins42 authored
28 .. javascript::
d608cc5 @phiggins42 \r\n -> \n conversion.
phiggins42 authored
29
9dd52dc @phiggins42 mondo whitespace change
phiggins42 authored
30 <script>
31 dojo.require("dojox.widget.TitleGroup");
32 dojo.require("dijit.TitlePane");
33 dojo.require("dijit.form.Button");
34 </script>
d608cc5 @phiggins42 \r\n -> \n conversion.
phiggins42 authored
35
9dd52dc @phiggins42 mondo whitespace change
phiggins42 authored
36 .. html::
d608cc5 @phiggins42 \r\n -> \n conversion.
phiggins42 authored
37
9dd52dc @phiggins42 mondo whitespace change
phiggins42 authored
38 <h2>Content before</h2>
39 <div id="titleGroupA" data-dojo-type="dojox.widget.TitleGroup">
40 <div dojoType="dijit.TitlePane" open="true" title="Pane 1">Lorem</div>
41 <div dojoType="dijit.TitlePane" open="false" title="Pane 2">Lorem <br> <div data-dojo-type="dijit.form.Button">click</div></div>
42 <div dojoType="dijit.TitlePane" open="false" title="Pane 3"><p>Lorem</p><p>lorem</p></div>
43 <div dojoType="dijit.TitlePane" open="false" title="Pane 4"><p>Lorem</p></div>
44 </div>
45 <h2>Content after</h2>
d608cc5 @phiggins42 \r\n -> \n conversion.
phiggins42 authored
46
9a8ab5a @wkeese remove colons from level 3 headers
wkeese authored
47 Adding and removing children
48 ----------------------------
d608cc5 @phiggins42 \r\n -> \n conversion.
phiggins42 authored
49
9dd52dc @phiggins42 mondo whitespace change
phiggins42 authored
50 .. code-example::
d608cc5 @phiggins42 \r\n -> \n conversion.
phiggins42 authored
51
9dd52dc @phiggins42 mondo whitespace change
phiggins42 authored
52 .. css::
d608cc5 @phiggins42 \r\n -> \n conversion.
phiggins42 authored
53
9dd52dc @phiggins42 mondo whitespace change
phiggins42 authored
54 <style type="text/css">
55 @import "{{baseUrl}}dojox/widget/TitleGroup/TitleGroup.css";
56 </style>
d608cc5 @phiggins42 \r\n -> \n conversion.
phiggins42 authored
57
9dd52dc @phiggins42 mondo whitespace change
phiggins42 authored
58 .. javascript::
d608cc5 @phiggins42 \r\n -> \n conversion.
phiggins42 authored
59
9dd52dc @phiggins42 mondo whitespace change
phiggins42 authored
60 <script>
61 dojo.require("dojox.widget.TitleGroup");
62 dojo.require("dijit.TitlePane");
63 dojo.require("dijit.form.Button");
64 </script>
d608cc5 @phiggins42 \r\n -> \n conversion.
phiggins42 authored
65
9dd52dc @phiggins42 mondo whitespace change
phiggins42 authored
66 .. html::
d608cc5 @phiggins42 \r\n -> \n conversion.
phiggins42 authored
67
9dd52dc @phiggins42 mondo whitespace change
phiggins42 authored
68 <h2>Content before</h2>
69 <div data-dojo-type="dijit.form.Button">
70 click to add
71 <script type="dojo/method" data-dojo-event="onClick">
72 var group = dijit.byId("titleGroupB");
73 var tp = new dijit.TitlePane({ open:false, title: "Added " + dijit.registry.length });
74 group.addChild(tp);
75 </script>
76 </div>
77 <div data-dojo-type="dijit.form.Button">
78 pop one off
79 <script type="dojo/method" data-dojo-event="onClick">
80 dijit.registry.byClass("dijit.TitlePane").some(function(widget){
81 dijit.byId("titleGroupB").removeChild(widget);
82 widget.destroy();
83 return true; // only once
84 });
85 </script>
86 </div>
87 <div id="titleGroupB" style="width:500px" data-dojo-type="dojox.widget.TitleGroup">
88 <div dojoType="dijit.TitlePane" open="true" title="Pane 1">
89 Pane 1
90 </div>
91 </div>
92 <h2>Content after</h2>
93 <div id="graveyard"></div>
d608cc5 @phiggins42 \r\n -> \n conversion.
phiggins42 authored
94
80f0c17 @wkeese fixing headers
wkeese authored
95 See Also
96 ========
d608cc5 @phiggins42 \r\n -> \n conversion.
phiggins42 authored
97
9dd52dc @phiggins42 mondo whitespace change
phiggins42 authored
98 * :ref:`dijit.TitlePane <dijit/TitlePane>`
99 * :ref:`dijit.layout.AccordionContainer <dijit/layout/AccordionContainer>`
100 * `The original blog and motivation <http://www.sitepen.com/blog/2008/10/21/quick-fixes-and-dojo-support/>`_
Something went wrong with that request. Please try again.