Location: PHPKode > projects > Aukyla Platform > aukyla/doc/html/a00108.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
  <head>
    <title>Aukyla PHP Framework</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <link rel="StyleSheet" href="auton.css" type="text/css" media="screen">
  </head>

  <body>
    <div id="mainmenu">
      <a href="http://www.auton.nl/" class="home">Home</a>
    </div>
    <div id="submenu">
      <a class="logo" href="http://www.auton.nl/"></a>

      <div class="head">Ads</div>
      <a href="http://sourceforge.net/"><img src="http://sourceforge.net/sflogo.php?group_id=116358&amp;type=1" alt="SourceForge.net Logo" style="padding: 2px 4px; width: 88px; height: 31px; border: 0px"></a>
      <a href="http://getfirefox.com/" title="Get Firefox - The Browser, Reloaded."><img src="http://www.mozilla.org/products/firefox/buttons/getfirefox_small.png" alt="Get Firefox" style="width: 110px; height: 32px; border: 0px"></a>
    </div>
    <div id="main">
<!-- Generated by Doxygen 1.3.9.1 -->
<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical&nbsp;List</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>
<h1>GridLayout Class Reference</h1><p>Inheritance diagram for GridLayout:
<p><center><img src="a00108.png" usemap="#GridLayout_map" border="0" alt=""></center>
<map name="GridLayout_map">
<area href="a00155.html" alt="Table" shape="rect" coords="0,112,74,136">
<area href="a00096.html" alt="Container" shape="rect" coords="0,56,74,80">
<area href="a00166.html" alt="Widget" shape="rect" coords="0,0,74,24">
</map>
<a href="a00070.html">List of all members.</a><hr><a name="_details"></a><h2>Detailed Description</h2>
A grid used to layout widgets. 
<p>
A grid layout provides an easy way to align widgets in a grid. A grid by default is not visible itself, only the child widgets are visible.<p>
Grids work by setting up a maximum number of columns and adding all child widgets in rows with this number of columns beneith each other. So if you create a grid with a width of 3 columns and you add 9 widgets, the 1st, 4th and 7th widgets will be aligned below each other. The same applies for the 2nd, 5th and 8th widgets and for the 3rd, 6th and 9th widgets.<p>
The <a class="el" href="a00155.html">Table</a> functions <a class="el" href="a00155.html#a1">setRowsAlternate()</a> and <a class="el" href="a00155.html#a3">setColumnsAlternate()</a> are normally available for this class. 
<p>

<p>
Definition at line <a class="el" href="a00236.html#l00454">454</a> of file <a class="el" href="a00236.html">Tables.php</a>.<table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00108.html#a0">__construct</a> (<a class="el" href="a00096.html">Container</a> $parent, $columns)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00108.html#a1">setColumnWidths</a> ($widths)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00108.html#a2">addWidget</a> (<a class="el" href="a00166.html">Widget</a> $widget)</td></tr>

</table>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="a0" doxytag="GridLayout::__construct"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">GridLayout::__construct           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a00096.html">Container</a> $&nbsp;</td>
          <td class="mdname" nowrap> <em>parent</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>$&nbsp;</td>
          <td class="mdname" nowrap> <em>columns</em></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Constructor. Creates an empty grid layout.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>parent</em>&nbsp;</td><td>Parent widget to add the table to. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>columns</em>&nbsp;</td><td>The number of columns the layout should be wide.</td></tr>
  </table>
</dl>

<p>
Reimplemented from <a class="el" href="a00096.html#a0">Container</a>.
<p>
Definition at line <a class="el" href="a00236.html#l00462">462</a> of file <a class="el" href="a00236.html">Tables.php</a>.
<p>
References <a class="el" href="a00239.html#l00161">Widget::addCssStyle()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="a2" doxytag="GridLayout::addWidget"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">GridLayout::addWidget           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="a00166.html">Widget</a> $&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>widget</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Adds a widget to the children list.<p>
<dl compact><dt><b>Note:</b></dt><dd>You shouldn't have to call this function directly as the constructor of child widgets will already call this function for you.</dd></dl>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>widget</em>&nbsp;</td><td>The widget to add to the children list.</td></tr>
  </table>
</dl>

<p>
Reimplemented from <a class="el" href="a00096.html#a1">Container</a>.
<p>
Definition at line <a class="el" href="a00236.html#l00494">494</a> of file <a class="el" href="a00236.html">Tables.php</a>.    </td>
  </tr>
</table>
<a class="anchor" name="a1" doxytag="GridLayout::setColumnWidths"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">GridLayout::setColumnWidths           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">$&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>widths</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Applies widths to the grid's columns.<p>
Use this function to determine the width of the grid's columns.<p>
Example, if you have a grid layout with 3 columns, you can set widths like this:<p>
<div class="fragment"><pre class="fragment"> $gridLayout-&gt;setColumnWidths(array('45%', '10%', '45%'));
</pre></div><p>
<dl compact><dt><b>Note:</b></dt><dd>Call this function before adding widgets to the grid.</dd></dl>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>widths</em>&nbsp;</td><td>An array containing widths for the respective columns. Use CSS units like percentages or pixels to set the widths.</td></tr>
  </table>
</dl>

<p>
Definition at line <a class="el" href="a00236.html#l00489">489</a> of file <a class="el" href="a00236.html">Tables.php</a>.    </td>
  </tr>
</table>
<hr>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="a00236.html">Tables.php</a></ul>
    </div>
  </body>
</html>
Return current item: Aukyla Platform