You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

176 line
7.4 KiB

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  2. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4. <head>
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  6. <title>Tabbed Page &mdash; Documentation</title>
  7. <link rel="stylesheet" href="_static/sphinxdoc.css" type="text/css" />
  8. <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
  9. <script type="text/javascript">
  10. var DOCUMENTATION_OPTIONS = {
  11. URL_ROOT: '',
  12. VERSION: '',
  13. COLLAPSE_MODINDEX: false,
  14. FILE_SUFFIX: '.html',
  15. HAS_SOURCE: true
  16. };
  17. </script>
  18. <script type="text/javascript" src="_static/jquery.js"></script>
  19. <script type="text/javascript" src="_static/doctools.js"></script>
  20. <link rel="top" title="Documentation" href="index.html" />
  21. <link rel="up" title="4. Client Side API" href="client_side_widgets.html" />
  22. <link rel="next" title="Autosuggest" href="autosuggest.html" />
  23. <link rel="prev" title="Tree" href="tree.html" />
  24. </head>
  25. <body>
  26. <div style="background-color: #FFF; text-align: left; padding: 8px 0px"><img src="_static/banner300910.gif"></div>
  27. <div class="related">
  28. <h3>Navigation</h3>
  29. <ul>
  30. <li class="right" style="margin-right: 10px">
  31. <a href="genindex.html" title="General Index"
  32. accesskey="I">index</a></li>
  33. <li class="right" >
  34. <a href="modindex.html" title="Global Module Index"
  35. accesskey="M">modules</a> |</li>
  36. <li class="right" >
  37. <a href="autosuggest.html" title="Autosuggest"
  38. accesskey="N">next</a> |</li>
  39. <li class="right" >
  40. <a href="tree.html" title="Tree"
  41. accesskey="P">previous</a> |</li>
  42. <li><a href="index.html">Documentation</a> &raquo;</li>
  43. <li><a href="client_side_widgets.html" accesskey="U">4. Client Side API</a> &raquo;</li>
  44. </ul>
  45. </div>
  46. <div class="sphinxsidebar">
  47. <div class="sphinxsidebarwrapper">
  48. <h3><a href="index.html">Table Of Contents</a></h3>
  49. <ul>
  50. <li><a class="reference external" href="">Tabbed Page</a><ul>
  51. <li><a class="reference external" href="#tabbedpage-class">TabbedPage Class</a></li>
  52. <li><a class="reference external" href="#example">Example</a></li>
  53. </ul>
  54. </li>
  55. </ul>
  56. <h4>Previous topic</h4>
  57. <p class="topless"><a href="tree.html"
  58. title="previous chapter">Tree</a></p>
  59. <h4>Next topic</h4>
  60. <p class="topless"><a href="autosuggest.html"
  61. title="next chapter">Autosuggest</a></p>
  62. <h3>This Page</h3>
  63. <ul class="this-page-menu">
  64. <li><a href="_sources/tabbed_page.txt"
  65. rel="nofollow">Show Source</a></li>
  66. </ul>
  67. <div id="searchbox" style="display: none">
  68. <h3>Quick search</h3>
  69. <form class="search" action="search.html" method="get">
  70. <input type="text" name="q" size="18" />
  71. <input type="submit" value="Go" />
  72. <input type="hidden" name="check_keywords" value="yes" />
  73. <input type="hidden" name="area" value="default" />
  74. </form>
  75. <p class="searchtip" style="font-size: 90%">
  76. Enter search terms or a module, class or function name.
  77. </p>
  78. </div>
  79. <script type="text/javascript">$('#searchbox').show(0);</script>
  80. </div>
  81. </div>
  82. <div class="document">
  83. <div class="documentwrapper">
  84. <div class="bodywrapper">
  85. <div class="body">
  86. <div class="section" id="tabbed-page">
  87. <h1>Tabbed Page<a class="headerlink" href="#tabbed-page" title="Permalink to this headline">¶</a></h1>
  88. <p>The TabbedPage class defines a simple tabbing system</p>
  89. <div class="section" id="tabbedpage-class">
  90. <h2>TabbedPage Class<a class="headerlink" href="#tabbedpage-class" title="Permalink to this headline">¶</a></h2>
  91. <dl class="class">
  92. <dt id="TabbedPage">
  93. <em class="property">class </em><tt class="descname">TabbedPage</tt><big>(</big><em>parent</em>, <em>only_labels</em><big>)</big><a class="headerlink" href="#TabbedPage" title="Permalink to this definition">¶</a></dt>
  94. <dd><p>create a new TabbedPage in <cite>parent</cite>. If <cite>only_labels</cite> is set, do not create the page bodies only create
  95. labels</p>
  96. <dl class="attribute">
  97. <dt id="TabbedPage.tabs">
  98. <tt class="descname">tabs</tt><a class="headerlink" href="#TabbedPage.tabs" title="Permalink to this definition">¶</a></dt>
  99. <dd>A dictionary containing the tab labels. the key is the label name</dd></dl>
  100. <dl class="attribute">
  101. <dt id="TabbedPage.cur_tab">
  102. <tt class="descname">cur_tab</tt><a class="headerlink" href="#TabbedPage.cur_tab" title="Permalink to this definition">¶</a></dt>
  103. <dd>A reference to the current tab</dd></dl>
  104. <dl class="method">
  105. <dt id="TabbedPage.add_tab">
  106. <tt class="descname">add_tab</tt><big>(</big><em>n</em>, <em>onshow</em><big>)</big><a class="headerlink" href="#TabbedPage.add_tab" title="Permalink to this definition">¶</a></dt>
  107. <dd><p>Will create a new Tab with label n. Call <cite>onshow</cite> when the tab is displayed. The tab has an
  108. element <cite>tab_body</cite> that is the Element in which the content of the tab is added.</p>
  109. <p>The tab can be accessed by <cite>tabs</cite> dictionary</p>
  110. </dd></dl>
  111. <dl class="method">
  112. <dt id="TabbedPage.disable_tab">
  113. <tt class="descname">disable_tab</tt><big>(</big><em>n</em><big>)</big><a class="headerlink" href="#TabbedPage.disable_tab" title="Permalink to this definition">¶</a></dt>
  114. <dd>Disable tab with label n</dd></dl>
  115. <dl class="method">
  116. <dt id="TabbedPage.enable_tab">
  117. <tt class="descname">enable_tab</tt><big>(</big><em>n</em><big>)</big><a class="headerlink" href="#TabbedPage.enable_tab" title="Permalink to this definition">¶</a></dt>
  118. <dd>Enable tab with label n</dd></dl>
  119. </dd></dl>
  120. </div>
  121. <div class="section" id="example">
  122. <h2>Example<a class="headerlink" href="#example" title="Permalink to this headline">¶</a></h2>
  123. <p>Example using TabbedPage:</p>
  124. <div class="highlight-python"><pre>var mytabs = new TabbedPage(parent);
  125. mytabs.add_tab('Tab 1', function() { refresh_list1(); })
  126. mytabs.add_tab('Tab 2', function() { refresh_list1(); })
  127. mytabs.add_tab('Tab 3', function() { refresh_list1(); })
  128. // add pages
  129. mytabs.tabs['Tab 1'].tab_body.innerHTML = "Some content in Tab 1"</pre>
  130. </div>
  131. </div>
  132. </div>
  133. </div>
  134. </div>
  135. </div>
  136. <div class="clearer"></div>
  137. </div>
  138. <div class="related">
  139. <h3>Navigation</h3>
  140. <ul>
  141. <li class="right" style="margin-right: 10px">
  142. <a href="genindex.html" title="General Index"
  143. >index</a></li>
  144. <li class="right" >
  145. <a href="modindex.html" title="Global Module Index"
  146. >modules</a> |</li>
  147. <li class="right" >
  148. <a href="autosuggest.html" title="Autosuggest"
  149. >next</a> |</li>
  150. <li class="right" >
  151. <a href="tree.html" title="Tree"
  152. >previous</a> |</li>
  153. <li><a href="index.html">Documentation</a> &raquo;</li>
  154. <li><a href="client_side_widgets.html" >4. Client Side API</a> &raquo;</li>
  155. </ul>
  156. </div>
  157. <div class="footer">
  158. &copy; Copyright 2010, Rushabh Mehta.
  159. Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 0.6.3.
  160. </div>
  161. </body>
  162. </html>