************************* wx.html.HtmlContainerCell ************************* Inheritance diagram for `wx.html.HtmlContainerCell`: | .. inheritance-diagram:: wx.html.HtmlContainerCell | Description =========== The `wx.html.HtmlContainerCell` class is an implementation of a cell that may contain more cells in it. It is heavily used in the wxHTML layout algorithm. Derived From ^^^^^^^^^^^^^ * `wx.HtmlCell `_ Methods Summary ^^^^^^^^^^^^^^^ * `__init__ <#__init__>`_ * `GetAlignHor <#GetAlignHor>`_ * `GetAlignVer <#GetAlignVer>`_ * `GetBackgroundColour <#GetBackgroundColour>`_ * `GetIndent <#GetIndent>`_ * `GetIndentUnits <#GetIndentUnits>`_ * `InsertCell <#InsertCell>`_ * `SetAlign <#SetAlign>`_ * `SetAlignHor <#SetAlignHor>`_ * `SetAlignVer <#SetAlignVer>`_ * `SetBackgroundColour <#SetBackgroundColour>`_ * `SetBorder <#SetBorder>`_ * `SetIndent <#SetIndent>`_ * `SetMinHeight <#SetMinHeight>`_ * `SetWidthFloat <#SetWidthFloat>`_ * `SetWidthFloatFromTag <#SetWidthFloatFromTag>`_ Properties Summary ^^^^^^^^^^^^^^^^^^ * `AlignHor <#AlignHor>`_ * `AlignVer <#AlignVer>`_ * `BackgroundColour <#BackgroundColour>`_ * `Indent <#Indent>`_ * `IndentUnits <#IndentUnits>`_ Class API ========= Methods ^^^^^^^ .. method:: __init__(parent) Constructor. **Parameters:** * `parent` (`wx.html.HtmlContainerCell <`wx.html.HtmlContainerCell.html>`_): A pointer to a parent container or ``None``. | **Returns:** `wx.html.HtmlContainerCell <`wx.html.HtmlContainerCell.html>`_ -------- .. method:: GetAlignHor() Returns container's horizontal alignment. | **Returns:** `int` -------- .. method:: GetAlignVer() Returns container's vertical alignment. | **Returns:** `int` -------- .. method:: GetBackgroundColour() Returns the background colour of the container or `wx.NullColour` if no background colour is set. | **Returns:** `wx.Colour <../Widgets/wx.Colour.html>`_ -------- .. method:: GetIndent(ind) Returns the indentation. `ind` is one of the ``wx.HTML_INDENT_*`` constants, see `SetIndent <#SetIndent>`_ for constants details. **Parameters:** * `ind` (int) | **Returns:** `int` .. note:: You must call `GetIndentUnits <#GetIndentUnits>`_ with same `ind` parameter in order to correctly interpret the returned integer value. It is **not** always in pixels! .. seealso:: `SetIndent <#SetIndent>`_ -------- .. method:: GetIndentUnits(ind) Returns the units of indentation for `ind` where `ind` is one of the ``wx.HTML_INDENT_*`` constants, see `SetIndent <#SetIndent>`_ for constants details. **Parameters:** * `ind` (int) | **Returns:** `int` .. seealso:: `SetIndent <#SetIndent>`_ -------- .. method:: InsertCell(cell) Inserts new cell into the container. **Parameters:** * `cell` (`wx.html.HtmlCell `_) -------- .. method:: SetAlign(tag) Sets the container's alignment (both horizontal and vertical) according to the values stored in `tag` (Tags ``ALIGN`` parameter is extracted). In fact it is only a front-end to `SetAlignHor <#SetAlignHor>`_ and `SetAlignVer <#SetAlignVer>`_. **Parameters:** * `tag` (`wx.html.HtmlTag `_) -------- .. method:: SetAlignHor(al) Sets the container's *horizontal alignment*. During `Layout `_ each line is aligned according to `al` value. **Parameters:** * `al` (int): new horizontal alignment. May be one of these values: ========================================== =============================================== Horizontal Alignment Flag Description ========================================== =============================================== ``wx.html.HTML_ALIGN_LEFT`` Lines are left-aligned (default). ``wx.html.HTML_ALIGN_JUSTIFY`` Lines are justified. ``wx.html.HTML_ALIGN_CENTER`` Lines are centered. ``wx.html.HTML_ALIGN_RIGHT`` Lines are right-aligned. ========================================== =============================================== -------- .. method:: SetAlignVer(al) Sets the container's *vertical alignment*. This is per-line alignment! **Parameters:** * `al` (int): new vertical alignment. May be one of these values: ========================================== =============================================== Vertical Alignment Flag Description ========================================== =============================================== ``wx.html.HTML_ALIGN_BOTTOM`` Cells are over the line (default). ``wx.html.HTML_ALIGN_CENTER`` Cells are centered on line. ``wx.html.HTML_ALIGN_TOP`` Cells are under the line. ========================================== =============================================== | See this image for vertical alignment explanation: .. image:: ../images/wxWidgets/alignv.png -------- .. method:: SetBackgroundColour(clr) Sets the background colour for this container. **Parameters:** * `clr` (`wx.Colour <../Widgets/wx.Colour.html>`_) -------- .. method:: SetBorder(clr1, clr2) Sets the border (frame) colours. A border is a rectangle around the container. **Parameters:** * `clr1` (`wx.Colour <../Widgets/wx.Colour.html>`_): Colour of top and left lines * `clr2` (`wx.Colour <../Widgets/wx.Colour.html>`_): Colour of bottom and right lines -------- .. method:: SetIndent(i, what, units=wx.html.HTML_UNITS_PIXELS) Sets the indentation (free space between borders of container and subcells). **Parameters:** * `i` (int): Indentation value. * `what` (int): Determines which of the four borders we're setting. It is OR combination of following constants: ====================================== ================================================ Border Flag Description ====================================== ================================================ ``wx.html.HTML_INDENT_TOP`` top border ``wx.html.HTML_INDENT_BOTTOM`` bottom ``wx.html.HTML_INDENT_LEFT`` left ``wx.html.HTML_INDENT_RIGHT`` right ``wx.html.HTML_INDENT_HORIZONTAL`` left and right ``wx.html.HTML_INDENT_VERTICAL`` top and bottom ``wx.html.HTML_INDENT_ALL`` all 4 borders ====================================== ================================================ And this image for border explanation: .. image:: ../images/wxWidgets/indent.png | * `units` (int): Units of `i`. This parameter affects interpretation of the value: ====================================== ================================================ Units Flag Description ====================================== ================================================ ``wx.html.HTML_UNITS_PIXELS`` `i` is number of pixels. ``wx.html.HTML_UNITS_PERCENT`` `i` is interpreted as percents of width of parent container. ====================================== ================================================ -------- .. method:: SetMinHeight(h, align=wx.html.HTML_ALIGN_TOP) Sets minimal height of the container. When container's `Layout `_ is called, the height is set depending on layout of subcells to the height of area covered by layed-out subcells. Calling this method guarantees you that the height of container is never smaller than `h` - even if the subcells cover much smaller area. **Parameters:** * `h` (int): The minimal height. * `align` (int): If height of the container is lower than the minimum height, empty space must be inserted somewhere in order to ensure minimal height. This parameter is one of ``wx.html.HTML_ALIGN_TOP``, ``wx.html.HTML_ALIGN_BOTTOM``, ``wx.html.HTML_ALIGN_CENTER``. It refers to the *contents*, not to the empty place. -------- .. method:: SetWidthFloat(w, units) Sets floating width adjustment. The normal behaviour of container is that its width is the same as the width of parent container (and thus you can have only one sub-container per line). You can change this by setting FWA. **Parameters:** * `w` (int): Width of the container. If the value is negative it means complement to full width of parent container, e.g. `SetWidthFloat(-50, wx.html.HTML_UNITS_PIXELS)` sets the width of container to parent's width minus 50 pixels. This is useful when creating tables -- you can call `SetWidthFloat(50)` and `SetWidthFloat(-50)`. * `units` (int): Units of `w`. This parameter affects the interpretation of value: ====================================== ================================================ Units Flag Description ====================================== ================================================ ``wx.html.HTML_UNITS_PIXELS`` `w` is number of pixels. ``wx.html.HTML_UNITS_PERCENT`` `w` is interpreted as percents of width of parent container. ====================================== ================================================ -------- .. method:: SetWidthFloatFromTag(tag) Sets floating width adjustment. The normal behaviour of container is that its width is the same as the width of parent container (and thus you can have only one sub-container per line). You can change this by setting FWA. **Parameters:** * `tag` (`wx.html.HtmlTag `_) -------- Properties ^^^^^^^^^^ .. attribute:: AlignHor See `GetAlignHor <#GetAlignHor>`_ and `SetAlignHor <#SetAlignHor>`_ .. attribute:: AlignVer See `GetAlignVer <#GetAlignVer>`_ and `SetAlignVer <#SetAlignVer>`_ .. attribute:: BackgroundColour See `GetBackgroundColour <#GetBackgroundColour>`_ and `SetBackgroundColour <#SetBackgroundColour>`_ .. attribute:: Indent See `GetIndent <#GetIndent>`_ and `SetIndent <#SetIndent>`_ .. attribute:: IndentUnits See `GetIndentUnits <#GetIndentUnits>`_