Karsten Weinert wrote: > Hello, > here I have a question on how to use Listboxes that work on the > PrimaryBizobj. I use the technique described on the wiki (how to > populate lists) to set up a list box. It's DataSource is the > PrimaryBizobj, its DataField the > primary key of that table. On the form there are other controls. I > would expect that as I move through the listbox, that these other > controls gets updated. They don't. > > Then I tried and bound the ValueChanged property of the listbox to a > method which calls moveToPK and update (see below). That gives weird > results. It seems that the primary key of the current record gets > overwritten and then the cursor is moved as requested. > > Any hint?
You are populating the listbox (correctly) by filling the keys and values. But then you are telling it to update its Value (the current key) based on the current record in the bizobj. Removing the DataSource and DataField from your listbox definition appears to me to have the desired effect of a listbox record navigator. > # the listbox > ui = dabo.ui.dListBox(panel, ValueMode="Key", RegID="lbTextval") > panel.Sizer.append1x(ui, halign="center") > self.lbTextval.bindEvent(ev.ValueChanged, > self.onLbTextvalValueChanged) Paul _______________________________________________ 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/[EMAIL PROTECTED]
