Table Of Contents

Previous topic

Button

Next topic

Calendar

This Page

phoenix_title ButtonLabel

Helper class allowing to use either stock id or string labels.

This class should never be used explicitly and is not really part of wxWidgets API but rather is just an implementation helper allowing the methods such as SetYesNoLabels and SetOKCancelLabels below to be callable with either stock ids (e.g. ID_CLOSE) or strings (“Close”).


class_hierarchy Inheritance Diagram

Inheritance diagram for class ButtonLabel

Inheritance diagram of ButtonLabel


method_summary Methods Summary

__init__ Construct the label from a stock id.
GetAsString Return the associated label as string.
GetStockId Return the stock id or ID_NONE if this is not a stock label.

property_summary Properties Summary

AsString See GetAsString
StockId See GetStockId

api Class API



class ButtonLabel(object)

Helper class allowing to use either stock id or string labels.

Possible constructors:

ButtonLabel(stockId)

ButtonLabel(label)

Methods



__init__(self, *args, **kw)

overload Overloaded Implementations:



__init__ (self, stockId)

Construct the label from a stock id.

Parameters:stockId (int) –



__init__ (self, label)

Construct the label from the specified string.

Parameters:label (string) –





GetAsString(self)

Return the associated label as string.

Get the string label, whether it was originally specified directly or as a stock id – this is only useful for platforms without native stock items id support

Return type:string


GetStockId(self)

Return the stock id or ID_NONE if this is not a stock label.

Return type:int

Properties



AsString

See GetAsString



StockId

See GetStockId