I subclassed dTextBox and set the DynamicBackColor and it works fine.

When I use the subclassed dTextBox in another object and "reassign" the
DynamicBackColor via a "setAll" statement from its parent panel, the new
color is being overridden by the original DynamicBackColor from the mytext
class.

I have verified that the DynamicBackColor function (setBackColor2) in
"mypanel" is in fact firing, but then is goes on and fires DynamicBackColor
function (setBackColor) in "mytext"  immediately after.

Any thoughts?

Example:

class mytext(dabo.ui.dTextBox)
        def initProperties(self):
                self.DynamicBackColor = self.setBackColor

        def setBackColor(self):
                return(dColors.colorTupleFromName('beige'))

class mypanel(dabo.ui.dPanel)
        def afterInit(self):
                self.Sizer = hs = dabo.ui.dSizer("h")
                self.kgs=mytext(self)
                self.kgs.Value=0.000
                hs.append(self.kgs,'expand',proportion=1,alignment='right')

        def afterInitAll(self):
        
self.setAll("DynamicBackColor",self.setBackColor2,filt="BaseClass ==
dabo.ui.dTextBox")

        def setBackColor2(self):
                return(dColors.colorTupleFromName('red'))
        

No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.476 / Virus Database: 269.11.8/941 - Release Date: 08/07/2007
4:06 PM
 



_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: 
http://leafe.com/archives/byMID/dabo-users/!~!UENERkVCMDkAAQACAAAAAAAAAAAAAAAAABgAAAAAAAAAafA2fnYuPUOMNFpIYnBEQcKAAAAQAAAAPL8TiEq//[EMAIL
 PROTECTED]

Reply via email to