If you define a DynamicBackColor property for a control, you don't have to then respond to events; the framework does that for you. Every time the data is updated, the function the returns the value is called to get the proper color for the current value, and the control's BackColor is then set to that.
> > Read the section of the FAQ on the wiki for more info: > http://wiki.dabodev.com/FAQs#DifferencePropertyAndDynamicProperty > ( -or- http://j.mp/WiC45Y ) > > > > -- Ed Leafe > Ok...I'm really close. I just don't know how to set the appropriate color now, and the wiki didn't make it any clearer. For my dTextBox that I want the dynamic back color I have: ## *!* ## Dabo Code ID: dTextBox-dPanel-998 def afterInit(self): self.DynamicBackColor = self.Form.setDynBackColor for my setDynBackColor function I have: def setDynBackColor(self): biz = self.getBizobj("dbo.Companies") ds = biz.getDataSet() if len(ds) == 0: pass else: testval = biz.getFieldVal("InactiveCompany") if testval == 0: print "0" #self.DynamicBackColor(255, 0, 0) else: print "1" #self.DynamicBackColor(0, 255, 0) I get the 2 print statements correctly, just don't get how to set the color. Using the lines as commented out above I get the following error. TypeError: 'NoneType' object is not callable Thanks for the help so far Carey --- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html --- _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/dabo-users Searchable Archives: http://leafe.com/archives/search/dabo-users This message: http://leafe.com/archives/byMID/CAMGTPFEESVQbnN1TCHgNSNeOWSxviHyi=_y+ypchmsbhng6...@mail.gmail.com
