1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210
|
.. wxPython Phoenix documentation
This file was generated by Phoenix's sphinx generator and associated
tools, do not edit by hand.
Copyright: (c) 2011-2018 by Total Control Software
License: wxWindows License
.. include:: headings.inc
.. module:: wx.lib.sized_controls
.. currentmodule:: wx.lib.sized_controls
.. highlight:: python
.. _wx.lib.sized_controls:
==========================================================================================================================================
|phoenix_title| **wx.lib.sized_controls**
==========================================================================================================================================
The sized controls default HIG compliant sizers under the hood and provides
a simple interface for customizing those sizers.
The following sized controls exist:
:class:`SizedFrame`
:class:`SizedDialog`
:class:`SizedPanel`
:class:`SizedScrolledPanel`
:class `SizedStaticBox`
Description
===========
The sized controls allow you to create sizer based layouts without having to
code the sizers by hand, but still provide you the manual detailed control of
the sizer and sizer items if necessary.
Usage
=====
Sample usage::
import wx
import wx.lib.sized_controls as sc
app = wx.App(0)
frame = sc.SizedFrame(None, -1, "A sized frame")
pane = frame.GetContentsPane()
pane.SetSizerType("horizontal")
b1 = wx.Button(pane, wx.ID_ANY)
t1 = wx.TextCtrl(pane, -1)
t1.SetSizerProps(expand=True)
frame.Show()
app.MainLoop()
|function_summary| Functions Summary
====================================
================================================================================ ================================================================================
:func:`~wx.lib.sized_controls.GetDefaultBorder` Return the platform specific default border.
:func:`~wx.lib.sized_controls.GetDefaultPanelBorder` Default panel border is set to 0 by default as the child control
:func:`~wx.lib.sized_controls.GetDialogBorder` Get the platform specific dialog border.
:func:`~wx.lib.sized_controls.GetHGrow` Get the horizontal grow value.
:func:`~wx.lib.sized_controls.GetSizerProps` Returns a dictionary of prop name + value.
:func:`~wx.lib.sized_controls.GetVGrow` Get the vertical grow value.
:func:`~wx.lib.sized_controls.SetDefaultSizerProps` Set default sizer properties.
:func:`~wx.lib.sized_controls.SetHGrow` Set horizontal grow proportion.
:func:`~wx.lib.sized_controls.SetSizerProp` Sets a sizer property
:func:`~wx.lib.sized_controls.SetSizerProps` Allows to set multiple sizer properties
:func:`~wx.lib.sized_controls.SetVGrow` Set vertical grow proportion.
================================================================================ ================================================================================
|
|class_summary| Classes Summary
===============================
================================================================================ ================================================================================
:ref:`~wx.lib.sized_controls.SizedDialog` A sized dialog
:ref:`~wx.lib.sized_controls.SizedFrame` A sized frame.
:ref:`~wx.lib.sized_controls.SizedPanel` A sized panel.
:ref:`~wx.lib.sized_controls.SizedParent` Mixin class for some methods used by the ``Sized*`` classes.
:ref:`~wx.lib.sized_controls.SizedScrolledPanel` A sized scrolled panel.
:ref:`~wx.lib.sized_controls.SizedStaticBox`
================================================================================ ================================================================================
|
.. toctree::
:maxdepth: 1
:hidden:
wx.lib.sized_controls.SizedDialog
wx.lib.sized_controls.SizedFrame
wx.lib.sized_controls.SizedPanel
wx.lib.sized_controls.SizedParent
wx.lib.sized_controls.SizedScrolledPanel
wx.lib.sized_controls.SizedStaticBox
Functions
------------
.. function:: GetDefaultBorder(self)
Return the platform specific default border.
:rtype: `int`
.. function:: GetDefaultPanelBorder(self)
Default panel border is set to 0 by default as the child control
will set their borders.
.. function:: GetDialogBorder(self)
Get the platform specific dialog border.
:rtype: `int`
.. function:: GetHGrow(self)
Get the horizontal grow value.
:rtype: `int`
.. function:: GetSizerProps(self)
Returns a dictionary of prop name + value.
.. function:: GetVGrow(self)
Get the vertical grow value.
:rtype: `int`
.. function:: SetDefaultSizerProps(self)
Set default sizer properties.
.. function:: SetHGrow(self, proportion)
Set horizontal grow proportion.
:param int `proportion`: proportion to use
.. function:: SetSizerProp(self, prop, value)
Sets a sizer property
Sample usages::
control.SetSizerProp('expand', True)
:param string `prop`: valid strings are "proportion", "hgrow", "vgrow",
"align", "halign", "valign", "border", "minsize" and "expand"
:param `value`: corresponding value for the prop
.. function:: SetSizerProps(self, props={}, \*\*kwargs)
Allows to set multiple sizer properties
Sample usages::
control.SetSizerProps(expand=True, proportion=1)
control.SetSizerProps(expand=True, valign='center', border=(['top',
'bottom'], 5))
control.SetSizerProps({'growable_row': (1, 1),
'growable_col': (0, 1),})
:param dict `props`: a dictionary of prop name + value
:param `kwargs`: keywords can be used for properties, e.g. expand=True
.. function:: SetVGrow(self, proportion)
Set vertical grow proportion.
:param int `proportion`: proportion to use
|