16 |
# write to the Free Software Foundation, Inc., 59 Temple Place |
# write to the Free Software Foundation, Inc., 59 Temple Place |
17 |
# - Suite 330, Boston, MA 02111-1307, USA. |
# - Suite 330, Boston, MA 02111-1307, USA. |
18 |
# |
# |
19 |
# Copyright 2002 Free Software Foundation |
# Copyright 2002-2003 Free Software Foundation |
20 |
# |
# |
21 |
# FILE: |
# FILE: |
22 |
# VButton.py |
# VButton.py |
39 |
apply(Button.__init__, (self, Parent, ButtonName, Y, X, H, Caption),properties) |
apply(Button.__init__, (self, Parent, ButtonName, Y, X, H, Caption),properties) |
40 |
self.W = 1 |
self.W = 1 |
41 |
self.H = H |
self.H = H |
42 |
self.COLOR = sio.C_SCROLL_BUTTON |
self.SetColor('SCROLL_BUTTON','SCROLL_BUTTON_FOCUS') |
|
self.FOCUSCOLOR = sio.C_SCROLL_BUTTON_FOCUS |
|
43 |
|
|
44 |
|
|
45 |
def Paint(self, HaveFocus, v2,v3): |
def Paint(self, HaveFocus, v2,v3): |
47 |
if Container == None: |
if Container == None: |
48 |
raise "Container is Nothing in def Paint!" |
raise "Container is Nothing in def Paint!" |
49 |
if HaveFocus: |
if HaveFocus: |
50 |
self.SetColor(sio.C_SCROLL_BUTTON_FOCUS) |
color = self.FOCUSCOLOR |
|
self.HiLight() |
|
51 |
else: |
else: |
52 |
self.SetColor(sio.C_SCROLL_BUTTON) |
color = self.COLOR |
53 |
self.LoLight() |
tROW, tCOL = self._ABSY, self._ABSX |
|
tROW, tCOL = self.Y, self.X |
|
54 |
tCaption = self.CAPTION |
tCaption = self.CAPTION |
55 |
tW = self.H |
tW = self.H |
56 |
tAW = tW - 2 |
tAW = tW - 2 |
70 |
tCaption = (" " * leadingSpaces) + tCaption + (" " * spaces) |
tCaption = (" " * leadingSpaces) + tCaption + (" " * spaces) |
71 |
tCaption = tCaption |
tCaption = tCaption |
72 |
for i in range(0,len(tCaption)): |
for i in range(0,len(tCaption)): |
73 |
Container.PutAt(tROW + i, tCOL, tCaption[i]) |
Container.PutAt(tROW + i, tCOL, tCaption[i], color) |
74 |
|
|
75 |
|
|