Table Of Contents

Previous topic

expando

Next topic

fancytext

This Page

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

Inheritance diagram of ExpandoTextCtrl


super_classes Known Superclasses

TextCtrl


method_summary Methods Summary

__init__  
AppendText  
GetMaxHeight Sets the max height that the control will expand to on its own
OnSize  
OnTextChanged  
SetFont  
SetMaxHeight Sets the max height that the control will expand to on its
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.


Methods



__init__(self, parent, id=-1, value="", pos=DefaultPosition, size=DefaultSize, style=0, validator=DefaultValidator, name="expando")


AppendText(self, text)


GetMaxHeight(self)

Sets the max height that the control will expand to on its own



OnSize(self, evt)


OnTextChanged(self, evt)


SetFont(self, font)


SetMaxHeight(self, h)

Sets the max height that the control will expand to on its own, and adjusts it down if needed.



WriteText(self, text)