Python wx.FONTFAMILY_TELETYPE Examples

The following are 1 code examples of wx.FONTFAMILY_TELETYPE(). You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may also want to check out all available functions/classes of the module wx , or try the search function .
Example #1
Source File: navigation_toolbar.py    From RF-Monitor with GNU General Public License v2.0 5 votes vote down vote up
def __init__(self, canvas, legend):
        NavigationToolbar2Wx.__init__(self, canvas)
        self._canvas = canvas
        self._legend = legend
        self._autoScale = True

        if matplotlib.__version__ >= '1.2':
            panId = self.wx_ids['Pan']
        else:
            panId = self.FindById(self._NTB2_PAN).GetId()
        self.ToggleTool(panId, True)
        self.pan()

        checkLegend = wx.CheckBox(self, label='Legend')
        checkLegend.SetValue(legend.get_visible())
        self.AddControl(checkLegend)
        self.Bind(wx.EVT_CHECKBOX, self.__on_legend, checkLegend, id)

        if wx.__version__ >= '2.9.1':
            self.AddStretchableSpace()
        else:
            self.AddSeparator()

        self._textCursor = wx.StaticText(self, style=wx.ALL | wx.ALIGN_RIGHT)
        font = self._textCursor.GetFont()
        if wx.__version__ >= '2.9.1':
            font.MakeSmaller()
        font.SetFamily(wx.FONTFAMILY_TELETYPE)
        self._textCursor.SetFont(font)
        w, _h = get_text_size(' ' * 18, font)
        self._textCursor.SetSize((w, -1))

        self.AddControl(self._textCursor)

        self.Realize()