1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126
|
.. wxPython Phoenix documentation
This file was generated by Phoenix's sphinx generator and associated
tools, do not edit by hand.
Copyright: (c) 2011-2018 by Total Control Software
License: wxWindows License
.. include:: headings.inc
.. currentmodule:: wx.lib.masked.ipaddrctrl
.. highlight:: python
.. _wx.lib.masked.ipaddrctrl.IpAddrCtrl:
==========================================================================================================================================
|phoenix_title| **wx.lib.masked.ipaddrctrl.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| Class Hierarchy
=================================
.. raw:: html
<div id="toggleBlock" onclick="return toggleVisibility(this)" class="closed" style="cursor:pointer;">
<img id="toggleBlock-trigger" src="_static/images/closed.png"/>
Inheritance diagram for class <strong>IpAddrCtrl</strong>:
</div>
<div id="toggleBlock-summary" style="display:block;"></div>
<div id="toggleBlock-content" style="display:none;">
<p class="graphviz">
<center><img src="_static/images/inheritance/wx.lib.masked.ipaddrctrl.IpAddrCtrl_inheritance.png" alt="Inheritance diagram of IpAddrCtrl" usemap="#dummy" class="inheritance"/></center>
</div>
<script type="text/javascript">toggleVisibilityOnLoad(document.getElementById('toggleBlock'))</script>
<map id="dummy" name="dummy"> <area shape="rect" id="node1" href="wx.TextCtrl.html" title="wx.TextCtrl" alt="" coords="579,392,668,421"/> <area shape="rect" id="node9" href="wx.lib.masked.textctrl.BaseMaskedTextCtrl.html" title="wx.lib.masked.textctrl.BaseMaskedTextCtrl" alt="" coords="369,469,660,499"/> <area shape="rect" id="node2" href="wx.Control.html" title="wx.Control" alt="" coords="520,315,608,344"/> <area shape="rect" id="node3" href="wx.TextEntry.html" title="wx.TextEntry" alt="" coords="633,315,732,344"/> <area shape="rect" id="node4" href="wx.Trackable.html" title="wx.Trackable" alt="" coords="456,5,557,35"/> <area shape="rect" id="node5" href="wx.EvtHandler.html" title="wx.EvtHandler" alt="" coords="508,83,619,112"/> <area shape="rect" id="node8" href="wx.WindowBase.html" title="wx.WindowBase" alt="" coords="503,160,624,189"/> <area shape="rect" id="node6" href="wx.Object.html" title="wx.Object" alt="" coords="581,5,663,35"/> <area shape="rect" id="node7" href="wx.lib.masked.maskededit.MaskedEditMixin.html" title="wx.lib.masked.maskededit.MaskedEditMixin" alt="" coords="256,392,553,421"/> <area shape="rect" id="node12" href="wx.Window.html" title="wx.Window" alt="" coords="519,237,608,267"/> <area shape="rect" id="node10" href="wx.lib.masked.ipaddrctrl.IpAddrCtrl.html" title="wx.lib.masked.ipaddrctrl.IpAddrCtrl" alt="" coords="223,547,465,576"/> <area shape="rect" id="node11" href="wx.lib.masked.ipaddrctrl.IpAddrCtrlAccessorsMixin.html" title="wx.lib.masked.ipaddrctrl.IpAddrCtrlAccessorsMixin" alt="" coords="5,469,344,499"/> </map>
</p>
|
|super_classes| Known Superclasses
==================================
:class:`wx.lib.masked.ipaddrctrl.IpAddrCtrlAccessorsMixin`, :class:`wx.lib.masked.textctrl.BaseMaskedTextCtrl`
|
|method_summary| Methods Summary
================================
================================================================================ ================================================================================
:meth:`~wx.lib.masked.ipaddrctrl.IpAddrCtrl.__init__` Default class constructor.
:meth:`~wx.lib.masked.ipaddrctrl.IpAddrCtrl.GetAddress` Returns the control value, with any spaces removed.
:meth:`~wx.lib.masked.ipaddrctrl.IpAddrCtrl.OnDot` Defines what action to take when the '.' character is typed in the
:meth:`~wx.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 = wx.DefaultPosition, size = wx.DefaultSize, style = wx.TE_PROCESS_TAB, validator = wx.DefaultValidator, name = 'IpAddrCtrl', setupEventHandling = True, \*\*kwargs)
Default class constructor.
:param wx.Window `parent`: the window parent. Must not be ``None``;
:param integer `id`: window identifier. A value of -1 indicates a default value;
:param string `value`: value to be shown;
:param `pos`: the control position. A value of (-1, -1) indicates a default position,
chosen by either the windowing system or wxPython, depending on platform;
:type `pos`: tuple or :class:`wx.Point`
:param `size`: the control size. A value of (-1, -1) indicates a default size,
chosen by either the windowing system or wxPython, depending on platform;
:param integer `style`: the window style;
:param wx.Validator `validator`: this is mainly provided for data-transfer, as control does
its own validation;
:param string `name`: the window name;
:param boolean `setupEventHandling`: setup event handling by default.
.. 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.
:param string `value`: the IP address in the form '000.000.000.000'
|