John wrote: > On Thursday 16 July 2009 11:52:26 am Mike Mabey wrote: >> Hi All, >> >> I have a question about manually setting the value of a dCheckBox. It >> doesn't specify in the API >> Documentation<http://paul.dabodev.com/doc/api/dabodoc/dabo.ui.uiwx.dCheckBo >> x.dCheckBox.html#Properties_Value>whether this property is read/write at >> runtime or not, though I assume it >> is, just like all the other data controls. In my app, I have been unable >> to set this property at all, and I was wondering if there's something I >> should know concerning setting this particular property. >> >> In case you need more detail about my specific project, I'm running Win >> Vista with Python 2.5.4 with Dabo r5279. I've developed this app in the >> ClassDesigner. I'm trying to set the value in the afterInitAll() method of >> dForm with a 1 or 0 for True/False, but never reflects the given value and >> doesn't give an error. It wouldn't make sense to try binding this field to >> a data set since there's no associated database, just a configuration file >> I wrote myself with values in it for each of the data controls. >> >> Any help would be very appreciated, > > Show us the code that sets the value. Make sure you are using "Value" and > not 'value'. Also make sure you haven't set the 'UserThreeState'.
I just ran this test, which worked: 1 import dabo 2 dabo.ui.loadUI("wx") 3 4 app = dabo.dApp(MainFormClass=None) 5 app.setup() 6 7 frm = dabo.ui.dForm(None) 8 cb = dabo.ui.dCheckBox(frm, Size=(120,20)) 9 frm.show() 10 cb.Value = 1 11 print cb.Value 12 app.start() Note how setting cb.Value to an int cast it to a bool. Paul _______________________________________________ Post Messages to: Dabo-users@leafe.com 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/4a5f898d.1040...@ulmcnett.com