Uwe Grauer wrote:

> Ed Leafe wrote:
>> On Jan 31, 2008, at 4:39 AM, Uwe Grauer wrote:
>> 
>>> What is the best method to set the backgroundcolor of a dTextBox
>>> to the Backgroundcolor of the dForm?
>>>
>>> I want to use the same color for a dTextbox because it should look  
>>> like
>>> a dLabel.
>> 
>>      textbox.DynamicBackColor = lambda: textbox.Form.BackColor
>> 
>>      Be aware that BackColor for textboxes is not supported on all  
>> platforms.
> 
> I guess i have to do this in the afterInit of the dTextbox?

You can do it wherever you want:

1)

tb = dabo.ui.dTextBox(frm, DynamicBackColor=lambda:tb.Form.BackColor)


2)

class MyTextBox(dabo.ui.dTextBox):
        def initProperties(self):
                self.DynamicBackColor = lambda:self.Form.BackColor

3)

tb = dabo.ui.dTextBox(frm)
tb.DynamicBackColor = tb.Form.BackColor


Paul

-- 
http://paulmcnett.com


_______________________________________________
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/[EMAIL PROTECTED]

Reply via email to