dabo Commit
Revision 4139
Date: 2008-06-16 16:55:11 -0700 (Mon, 16 Jun 2008)
Author: Ed
Trac: http://svn.dabodev.com/trac/dabo/changeset/4139
Changed:
U trunk/dabo/ui/uiwx/dFormMixin.py
U trunk/dabo/ui/uiwx/dPemMixin.py
Log:
Moved the Transparency property from dFormMixin to dPemMixin, as it is possible
to set it for individual controls. This doesn't break any existing uses at the
form level, but enables control-by-control adjustment of transparency.
Diff:
Modified: trunk/dabo/ui/uiwx/dFormMixin.py
===================================================================
--- trunk/dabo/ui/uiwx/dFormMixin.py 2008-06-15 18:43:22 UTC (rev 4138)
+++ trunk/dabo/ui/uiwx/dFormMixin.py 2008-06-16 23:55:11 UTC (rev 4139)
@@ -60,8 +60,6 @@
self._autoUpdateStatusText = False
# Flag to denote temporary forms
self._tempForm = False
- # Transparency level
- self._transparency = None
# Defaults for window sizing
self._defaultLeft = 50
self._defaultTop = 50
@@ -957,18 +955,6 @@
val.Form = self
- def _getTransparency(self):
- return self._transparency
-
- def _setTransparency(self, val):
- if self._constructed():
- val = min(max(val, 0), 255)
- self._transparency = val
- self.SetTransparent(val)
- else:
- self._properties["Transparency"] = val
-
-
def _getWindowState(self):
try:
if self.IsFullScreen():
@@ -1115,11 +1101,6 @@
ToolBar = property(_getToolBar, _setToolBar, None,
_("Tool bar for this form. (dToolBar)"))
- Transparency = property(_getTransparency, _setTransparency, None,
- _("""Transparency level of the form; ranges from 0
(transparent) to 255 (opaque).
- Default=0. Does not currently work on Gtk/Linux.
(int)"""))
-
-
WindowState = property(_getWindowState, _setWindowState, None,
_("""Specifies the current state of the form. (int)
@@ -1141,5 +1122,4 @@
DynamicStatusBar = makeDynamicProperty(StatusBar)
DynamicStatusText = makeDynamicProperty(StatusText)
DynamicToolBar = makeDynamicProperty(ToolBar)
- DynamicTransparency = makeDynamicProperty(Transparency)
DynamicWindowState = makeDynamicProperty(WindowState)
Modified: trunk/dabo/ui/uiwx/dPemMixin.py
===================================================================
--- trunk/dabo/ui/uiwx/dPemMixin.py 2008-06-15 18:43:22 UTC (rev 4138)
+++ trunk/dabo/ui/uiwx/dPemMixin.py 2008-06-16 23:55:11 UTC (rev 4139)
@@ -37,6 +37,8 @@
# Holds event binding expressed as strings to be eval'd after
this object
# has been constructed.
self._delayedEventBindings = []
+ # Transparency level
+ self._transparency = 255
# There are a few controls that don't yet support 3-way inits
(grid, for
# one). These controls will send the wx classref as the
preClass argument,
@@ -2469,7 +2471,19 @@
else:
self._properties["Top"] = val
-
+
+ def _getTransparency(self):
+ return self._transparency
+
+ def _setTransparency(self, val):
+ if self._constructed():
+ val = min(max(val, 0), 255)
+ self._transparency = val
+ self.SetTransparent(val)
+ else:
+ self._properties["Transparency"] = val
+
+
def _getVisible(self):
try:
return self.IsShown()
@@ -2702,6 +2716,10 @@
Top = property(_getTop, _setTop, None,
_("The top position of the object. (int)") )
+ Transparency = property(_getTransparency, _setTransparency, None,
+ _("""Transparency level of the control; ranges from 0
(transparent) to 255 (opaque).
+ Default=0. Does not currently work on Gtk/Linux.
(int)"""))
+
Visible = property(_getVisible, _setVisible, None,
_("Specifies whether the object is visible at runtime.
(bool)") )
@@ -2736,6 +2754,7 @@
DynamicTag = makeDynamicProperty(Tag)
DynamicToolTipText = makeDynamicProperty(ToolTipText)
DynamicTop = makeDynamicProperty(Top)
+ DynamicTransparency = makeDynamicProperty(Transparency)
DynamicVisible = makeDynamicProperty(Visible)
DynamicWidth = makeDynamicProperty(Width)
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: http://leafe.com/archives/byMID/[EMAIL PROTECTED]