Table Of Contents

Previous topic

ButtonPanel

Next topic

Control

This Page

phoenix_title ButtonPanelText

This class is used to hold data about the main caption in ButtonPanel.


class_hierarchy Inheritance Diagram

Inheritance diagram for class ButtonPanelText

Inheritance diagram of ButtonPanelText


super_classes Known Superclasses

lib.agw.buttonpanel.Control


method_summary Methods Summary

__init__ Default class constructor.
CreateDC Convenience function to create a DC.
Draw Draws the main caption. Actually the drawing is done in BPArt.
GetBestSize Returns the best size for the main caption in ButtonPanel.
GetText Returns the caption text.
SetText Sets the caption text.

api Class API



class ButtonPanelText(Control)

This class is used to hold data about the main caption in ButtonPanel.


Methods



__init__(self, parent, text="")

Default class constructor.

Parameters:
  • parent – the text parent object, an instance of ButtonPanel;
  • text (string) – the actual main caption string.


CreateDC(self)

Convenience function to create a DC.



Draw(self, dc, rect)

Draws the main caption. Actually the drawing is done in BPArt.

Parameters:
  • dc – an instance of DC;
  • rect (Rect) – the main caption text client rectangle.


GetBestSize(self)

Returns the best size for the main caption in ButtonPanel.

Returns:An instance of Size.


GetText(self)

Returns the caption text.

Returns:A string representing the caption text.


SetText(self, text="")

Sets the caption text.

Parameters:text (string) – the main caption string.