wx.html.HtmlContainerCell

Inheritance diagram for 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

Class API

Methods

__init__(parent)

Constructor.

Parameters:


Returns:

wx.html.HtmlContainerCell


GetAlignHor()

Returns container’s horizontal alignment.


Returns:

int


GetAlignVer()

Returns container’s vertical alignment.


Returns:

int


GetBackgroundColour()

Returns the background colour of the container or wx.NullColour if no background colour is set.


Returns:

wx.Colour


GetIndent(ind)

Returns the indentation.

ind is one of the wx.HTML_INDENT_* constants, see SetIndent for constants details.

Parameters:

  • ind (int)

Returns:

int

Note

You must call GetIndentUnits with same ind parameter in order to correctly interpret the returned integer value. It is not always in pixels!

See also

SetIndent


GetIndentUnits(ind)

Returns the units of indentation for ind where ind is one of the wx.HTML_INDENT_* constants, see SetIndent for constants details.

Parameters:

  • ind (int)

Returns:

int

See also

SetIndent


InsertCell(cell)

Inserts new cell into the container.

Parameters:


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 and SetAlignVer.

Parameters:


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.


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:

../_images/alignv.png

SetBackgroundColour(clr)

Sets the background colour for this container.

Parameters:


SetBorder(clr1, clr2)

Sets the border (frame) colours. A border is a rectangle around the container.

Parameters:

  • clr1 (wx.Colour): Colour of top and left lines
  • clr2 (wx.Colour): Colour of bottom and right lines

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:

    ../_images/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.


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.

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.


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:


Properties

AlignHor
See GetAlignHor and SetAlignHor
AlignVer
See GetAlignVer and SetAlignVer
BackgroundColour
See GetBackgroundColour and SetBackgroundColour
Indent
See GetIndent and SetIndent
IndentUnits
See GetIndentUnits