Updated PyCrust contrib from Patrick O'Brian.
Added an enhanced wxEditor from Steve Howell and Adam Feuer. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12782 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
22
wxPython/samples/frogedit/StatusBar.py
Normal file
22
wxPython/samples/frogedit/StatusBar.py
Normal file
@@ -0,0 +1,22 @@
|
||||
from wxPython.wx import *
|
||||
|
||||
import os.path
|
||||
|
||||
class CustomStatusBar(wxStatusBar):
|
||||
def __init__(self, parent):
|
||||
wxStatusBar.__init__(self, parent, -1)
|
||||
self.SetFieldsCount(3)
|
||||
|
||||
def setFileName(self, fn):
|
||||
path, fileName = os.path.split(fn)
|
||||
self.SetStatusText(fileName, 0)
|
||||
|
||||
def setRowCol(self, row, col):
|
||||
self.SetStatusText("%d,%d" % (row,col), 1)
|
||||
|
||||
def setDirty(self, dirty):
|
||||
if dirty:
|
||||
self.SetStatusText("...", 2)
|
||||
else:
|
||||
self.SetStatusText(" ", 2)
|
||||
|
Reference in New Issue
Block a user