.. include:: headings.inc .. currentmodule:: lib.masked.ipaddrctrl .. highlight:: python .. _lib.masked.ipaddrctrl.IpAddrCtrl: ========================================================================================================================================== |phoenix_title| **IpAddrCtrl** ========================================================================================================================================== This class is a particular type of MaskedTextCtrl that accepts and understands the semantics of IP addresses, reformats input as you move from field to field, and accepts '.' as a navigation character, so that typing an IP address can be done naturally. | |class_hierarchy| Inheritance Diagram ===================================== Inheritance diagram for class **IpAddrCtrl** .. raw:: html

Inheritance diagram of IpAddrCtrl

| |super_classes| Known Superclasses ================================== :class:`lib.masked.ipaddrctrl.IpAddrCtrlAccessorsMixin`, :class:`lib.masked.textctrl.BaseMaskedTextCtrl` | |method_summary| Methods Summary ================================ ================================================================================ ================================================================================ :meth:`~lib.masked.ipaddrctrl.IpAddrCtrl.__init__` :meth:`~lib.masked.ipaddrctrl.IpAddrCtrl.GetAddress` Returns the control value, with any spaces removed. :meth:`~lib.masked.ipaddrctrl.IpAddrCtrl.OnDot` Defines what action to take when the '.' character is typed in the :meth:`~lib.masked.ipaddrctrl.IpAddrCtrl.SetValue` Takes a string value, validates it for a valid IP address, ================================================================================ ================================================================================ | |api| Class API =============== .. class:: IpAddrCtrl( BaseMaskedTextCtrl, IpAddrCtrlAccessorsMixin ) This class is a particular type of MaskedTextCtrl that accepts and understands the semantics of IP addresses, reformats input as you move from field to field, and accepts '.' as a navigation character, so that typing an IP address can be done naturally. .. method:: __init__( self, parent, id=-1, value = '', pos = DefaultPosition, size = DefaultSize, style = TE_PROCESS_TAB, validator = DefaultValidator, name = 'IpAddrCtrl', setupEventHandling = True, \*\*kwargs) .. method:: GetAddress(self) Returns the control value, with any spaces removed. .. method:: OnDot(self, event) Defines what action to take when the '.' character is typed in the control. By default, the current field is right-justified, and the cursor is placed in the next field. .. method:: SetValue(self, value) Takes a string value, validates it for a valid IP address, splits it into an array of 4 fields, justifies it appropriately, and inserts it into the control. Invalid values will raise a ValueError exception.