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 |
# FocusedLabel.py |
# FocusedLabel.py |
57 |
global BACKWARDS |
global BACKWARDS |
58 |
ch = Container.GetChar() |
ch = Container.GetChar() |
59 |
if self.PARENT.BreakOrder(ch) : |
if self.PARENT.BreakOrder(ch) : |
60 |
return |
return |
61 |
if ch in (Container.TokDownArrow, Container.TokNextField, Container.TokUpArrow): |
if ch in (Container.TokDownArrow, Container.TokNextField, Container.TokUpArrow): |
62 |
BACKWARDS = 0 |
BACKWARDS = 0 |
63 |
if ch == Container.TokUpArrow: |
if ch == Container.TokUpArrow: |
71 |
self.ExecMethod("SYSGOTFOCUS", None, None, None) |
self.ExecMethod("SYSGOTFOCUS", None, None, None) |
72 |
|
|
73 |
def Paint(self, HasFocus, v2, v3): |
def Paint(self, HasFocus, v2, v3): |
74 |
|
GDebug.printMesg(0,'Workin it') |
75 |
Container = self.PARENT.Screen() |
Container = self.PARENT.Screen() |
76 |
if self.active: |
if self.active: |
77 |
if HasFocus : |
if HasFocus : |
78 |
self.SetColor(2) |
color = self.FOCUSCOLOR |
79 |
else: |
else: |
80 |
self.SetColor(1) |
color = self.COLOR |
81 |
self.LoLight() |
else: |
82 |
|
color = self.COLOR |
83 |
Y = self._ABSY |
Y = self._ABSY |
84 |
X = self._ABSX |
X = self._ABSX |
85 |
caption = self.CAPTION |
caption = self.CAPTION |
86 |
Container.PrintAt(Y,X,caption) |
Container.PrintAt(Y,X,caption, color) |
|
if self.active : |
|
|
self.SetColor(1) |
|
|
self.LoLight() |
|
87 |
|
|
88 |
def GotFocus(self, v1, v2, v3): |
def GotFocus(self, v1, v2, v3): |
89 |
self.Paint(1, None, None) |
self.Paint(1, None, None) |
92 |
def LostFocus(self, v1, v2, v3): |
def LostFocus(self, v1, v2, v3): |
93 |
self.Paint(0, None, None) |
self.Paint(0, None, None) |
94 |
return 1 |
return 1 |
95 |
|
|
96 |
|
|