.. include:: headings.inc .. currentmodule:: lib.expando .. highlight:: python .. _lib.expando.ExpandoTextCtrl: ========================================================================================================================================== |phoenix_title| **ExpandoTextCtrl** ========================================================================================================================================== The ExpandoTextCtrl is a multi-line wx.TextCtrl that will adjust its height on the fly as needed to accomodate the number of lines needed to display the current content of the control. It is assumed that the width of the control will be a fixed value and that only the height will be adjusted automatically. If the control is used in a sizer then the width should be set as part of the initial or min size of the control. When the control resizes itself it will attempt to also make necessary adjustments in the sizer hierarchy it is a member of (if any) but if that is not suffiecient then the programmer can catch the EVT_ETC_LAYOUT_NEEDED event in the container and make any other layout adjustments that may be needed. | |class_hierarchy| Inheritance Diagram ===================================== Inheritance diagram for class **ExpandoTextCtrl** .. raw:: html

Inheritance diagram of ExpandoTextCtrl

| |super_classes| Known Superclasses ================================== :class:`TextCtrl` | |method_summary| Methods Summary ================================ ================================================================================ ================================================================================ :meth:`~lib.expando.ExpandoTextCtrl.__init__` :meth:`~lib.expando.ExpandoTextCtrl.AppendText` :meth:`~lib.expando.ExpandoTextCtrl.GetMaxHeight` Sets the max height that the control will expand to on its own :meth:`~lib.expando.ExpandoTextCtrl.OnSize` :meth:`~lib.expando.ExpandoTextCtrl.OnTextChanged` :meth:`~lib.expando.ExpandoTextCtrl.SetFont` :meth:`~lib.expando.ExpandoTextCtrl.SetMaxHeight` Sets the max height that the control will expand to on its :meth:`~lib.expando.ExpandoTextCtrl.WriteText` ================================================================================ ================================================================================ | |api| Class API =============== .. class:: ExpandoTextCtrl(TextCtrl) The ExpandoTextCtrl is a multi-line wx.TextCtrl that will adjust its height on the fly as needed to accomodate the number of lines needed to display the current content of the control. It is assumed that the width of the control will be a fixed value and that only the height will be adjusted automatically. If the control is used in a sizer then the width should be set as part of the initial or min size of the control. When the control resizes itself it will attempt to also make necessary adjustments in the sizer hierarchy it is a member of (if any) but if that is not suffiecient then the programmer can catch the EVT_ETC_LAYOUT_NEEDED event in the container and make any other layout adjustments that may be needed. .. method:: __init__(self, parent, id=-1, value="", pos=DefaultPosition, size=DefaultSize, style=0, validator=DefaultValidator, name="expando") .. method:: AppendText(self, text) .. method:: GetMaxHeight(self) Sets the max height that the control will expand to on its own .. method:: OnSize(self, evt) .. method:: OnTextChanged(self, evt) .. method:: SetFont(self, font) .. method:: SetMaxHeight(self, h) Sets the max height that the control will expand to on its own, and adjusts it down if needed. .. method:: WriteText(self, text)