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.
 
 
 
 
 

317 lines
14 KiB

<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8" />
<meta name="generator" content="Docutils 0.17: http://docutils.sourceforge.net/" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>TermTk.TTkLayouts.boxlayout &mdash; pyTermTk 0.2.0a documentation</title>
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/theme_overrides.css" type="text/css" />
<link rel="stylesheet" href="../_static/ttk.css" type="text/css" />
<!--[if lt IE 9]>
<script src="../_static/js/html5shiv.min.js"></script>
<![endif]-->
<script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
<script src="../_static/jquery.js"></script>
<script src="../_static/underscore.js"></script>
<script src="../_static/doctools.js"></script>
<script type="text/javascript" src="../_static/js/theme.js"></script>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="TermTk.TTkLayouts.gridlayout" href="TermTk.TTkLayouts.gridlayout.html" />
<link rel="prev" title="TermTk.TTkLayouts" href="TermTk.TTkLayouts.html" />
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="../index.html" class="icon icon-home"> pyTermTk
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<p><span class="caption-text">Tutorials</span></p>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../tutorial/001-helloworld.html">pyTermTk - Hello World</a></li>
<li class="toctree-l1"><a class="reference internal" href="../tutorial/002-layout.html">pyTermTk - Layouts</a></li>
<li class="toctree-l1"><a class="reference internal" href="../tutorial/003-signalslots.html">pyTermTk - Signal &amp; Slots</a></li>
<li class="toctree-l1"><a class="reference internal" href="../tutorial/004-logging.html">pyTermTk - Logging</a></li>
<li class="toctree-l1"><a class="reference internal" href="../tutorial/005-calculator.html">pyTermTk - Your first Calculator</a></li>
</ul>
<p><span class="caption-text">API Reference</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="TermTk.TTkAbstract.html">TermTk.TTkAbstract</a></li>
<li class="toctree-l1"><a class="reference internal" href="TermTk.TTkCore.html">TermTk.TTkCore</a></li>
<li class="toctree-l1"><a class="reference internal" href="TermTk.TTkCore.TTkTerm.html">TermTk.TTkCore.TTkTerm</a></li>
<li class="toctree-l1"><a class="reference internal" href="TermTk.TTkGui.html">TermTk.TTkGui</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="TermTk.TTkLayouts.html">TermTk.TTkLayouts</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="TermTk.TTkLayouts.html#layouts">Layouts</a></li>
<li class="toctree-l2 current"><a class="current reference internal" href="#">TermTk.TTkLayouts.boxlayout</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#ttkhboxlayout">TTkHBoxLayout</a></li>
<li class="toctree-l3"><a class="reference internal" href="#ttkvboxlayout">TTkVBoxLayout</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="TermTk.TTkLayouts.gridlayout.html">TermTk.TTkLayouts.gridlayout</a></li>
<li class="toctree-l2"><a class="reference internal" href="TermTk.TTkLayouts.layout.html">TermTk.TTkLayouts.layout</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="TermTk.TTkTemplates.html">TermTk.TTkTemplates</a></li>
<li class="toctree-l1"><a class="reference internal" href="TermTk.TTkTestWidgets.html">TermTk.TTkTestWidgets</a></li>
<li class="toctree-l1"><a class="reference internal" href="TermTk.TTkTypes.html">TermTk.TTkTypes</a></li>
<li class="toctree-l1"><a class="reference internal" href="TermTk.TTkWidgets.html">TermTk.TTkWidgets</a></li>
<li class="toctree-l1"><a class="reference internal" href="TermTk.TTkWidgets.TTkPickers.html">TermTk.TTkWidgets.TTkPickers</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../index.html">pyTermTk</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="../index.html" class="icon icon-home"></a> &raquo;</li>
<li><a href="TermTk.TTkLayouts.html">TermTk.TTkLayouts</a> &raquo;</li>
<li>TermTk.TTkLayouts.boxlayout</li>
<li class="wy-breadcrumbs-aside">
<a href="../_sources/autogen.TermTk/TermTk.TTkLayouts.boxlayout.rst.txt" rel="nofollow"> View page source</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<section id="module-TermTk.TTkLayouts.boxlayout">
<span id="termtk-ttklayouts-boxlayout"></span><h1>TermTk.TTkLayouts.boxlayout<a class="headerlink" href="#module-TermTk.TTkLayouts.boxlayout" title="Permalink to this headline"></a></h1>
<p><strong>Box Layout</strong> [<a class="reference external" href="https://ceccopierangiolieugenio.github.io/pyTermTk/tutorial/002-layout.html#simple-ttkvboxlayout">Tutorial</a>]</p>
<section id="ttkhboxlayout">
<h2>TTkHBoxLayout<a class="headerlink" href="#ttkhboxlayout" title="Permalink to this headline"></a></h2>
<dl class="py class">
<dt id="TermTk.TTkLayouts.boxlayout.TTkHBoxLayout">
<em class="property"><span class="pre">class</span> </em><code class="sig-name descname"><span class="pre">TTkHBoxLayout</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">args</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/TermTk/TTkLayouts/boxlayout.html#TTkHBoxLayout"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#TermTk.TTkLayouts.boxlayout.TTkHBoxLayout" title="Permalink to this definition"></a></dt>
<dd><p>The TTkHBoxLayout class lines up widgets horizontally</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>TTkHBoxLayout
╔═════════╤═════════╤═════════╗
║ Widget1 │ Widget2 │ Widget3 ║
║ │ │ ║
║ │ │ ║
║ │ │ ║
║ │ │ ║
║ │ │ ║
╚═════════╧═════════╧═════════╝
</pre></div>
</div>
</dd></dl>
</section>
<section id="ttkvboxlayout">
<h2>TTkVBoxLayout<a class="headerlink" href="#ttkvboxlayout" title="Permalink to this headline"></a></h2>
<dl class="py class">
<dt id="TermTk.TTkLayouts.boxlayout.TTkVBoxLayout">
<em class="property"><span class="pre">class</span> </em><code class="sig-name descname"><span class="pre">TTkVBoxLayout</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">args</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/TermTk/TTkLayouts/boxlayout.html#TTkVBoxLayout"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#TermTk.TTkLayouts.boxlayout.TTkVBoxLayout" title="Permalink to this definition"></a></dt>
<dd><p>The TTkVBoxLayout class lines up widgets vertically</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>TTkVBoxLayout
╔═════════════════════════════╗
║ Widget 1 ║
╟─────────────────────────────╢
║ Widget 2 ║
╟─────────────────────────────╢
║ Widget 3 ║
╟─────────────────────────────╢
║ Widget 4 ║
╚═════════════════════════════╝
</pre></div>
</div>
<dl class="py method">
<dt id="TermTk.TTkLayouts.boxlayout.TTkVBoxLayout.addItem">
<code class="sig-name descname"><span class="pre">addItem</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">item</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/TermTk/TTkLayouts/boxlayout.html#TTkVBoxLayout.addItem"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#TermTk.TTkLayouts.boxlayout.TTkVBoxLayout.addItem" title="Permalink to this definition"></a></dt>
<dd><p>Add the item to this <code class="xref py py-class docutils literal notranslate"><span class="pre">TTkGridLayout</span></code></p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>item</strong> (<a class="reference internal" href="TermTk.TTkLayouts.layout.html#TermTk.TTkLayouts.layout.TTkLayoutItem" title="TermTk.TTkLayouts.layout.TTkLayoutItem"><code class="xref py py-class docutils literal notranslate"><span class="pre">TTkLayoutItem</span></code></a>) – the item to be added</p></li>
<li><p><strong>row</strong> (<em>int</em>) – the row of the grid, optional, defaults to None</p></li>
<li><p><strong>col</strong> (<em>int</em>) – the col of the grid, optional, defaults to None</p></li>
<li><p><strong>rowspan</strong> (<em>int</em>) – the rows used by the item, optional, defaults to 1</p></li>
<li><p><strong>colspan</strong> (<em>int</em>) – the cols used by the item, optional, defaults to 1</p></li>
</ul>
</dd>
</dl>
</dd></dl>
<dl class="py method">
<dt id="TermTk.TTkLayouts.boxlayout.TTkVBoxLayout.addWidget">
<code class="sig-name descname"><span class="pre">addWidget</span></code><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">widget</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/TermTk/TTkLayouts/boxlayout.html#TTkVBoxLayout.addWidget"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#TermTk.TTkLayouts.boxlayout.TTkVBoxLayout.addWidget" title="Permalink to this definition"></a></dt>
<dd><p>Add the widget to this <code class="xref py py-class docutils literal notranslate"><span class="pre">TTkGridLayout</span></code>, this function uses <a class="reference internal" href="#TermTk.TTkLayouts.boxlayout.TTkVBoxLayout.addItem" title="TermTk.TTkLayouts.boxlayout.TTkVBoxLayout.addItem"><code class="xref py py-meth docutils literal notranslate"><span class="pre">addItem()</span></code></a></p>
<dl class="field-list simple">
<dt class="field-odd">Parameters</dt>
<dd class="field-odd"><ul class="simple">
<li><p><strong>widget</strong> (<a class="reference internal" href="TermTk.TTkWidgets.widget.html#TermTk.TTkWidgets.widget.TTkWidget" title="TermTk.TTkWidgets.widget.TTkWidget"><code class="xref py py-class docutils literal notranslate"><span class="pre">TTkWidget</span></code></a>) – the widget to be added</p></li>
<li><p><strong>row</strong> (<em>int</em>) – the row of the grid, optional, defaults to None</p></li>
<li><p><strong>col</strong> (<em>int</em>) – the col of the grid, optional, defaults to None</p></li>
<li><p><strong>rowspan</strong> (<em>int</em>) – the rows used by the widget, optional, defaults to 1</p></li>
<li><p><strong>colspan</strong> (<em>int</em>) – the cols used by the widget, optional, defaults to 1</p></li>
</ul>
</dd>
</dl>
</dd></dl>
</dd></dl>
</section>
</section>
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="TermTk.TTkLayouts.gridlayout.html" class="btn btn-neutral float-right" title="TermTk.TTkLayouts.gridlayout" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
<a href="TermTk.TTkLayouts.html" class="btn btn-neutral float-left" title="TermTk.TTkLayouts" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
</div>
<hr/>
<div role="contentinfo">
<p>
&#169; Copyright 2021, Eugenio Parodi.
</p>
</div>
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>