File: StatusBar.py

package info (click to toggle)
wxwindows2.4 2.4.3.1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 59,948 kB
  • ctags: 97,286
  • sloc: cpp: 613,806; ansic: 111,966; python: 103,278; makefile: 3,640; sh: 3,316; lex: 192; yacc: 128; xml: 95; pascal: 74
file content (22 lines) | stat: -rw-r--r-- 536 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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)