I'm afraid I'm out of my element here, because I've never used
dListControl. The other list-type controls (dListBox, dComboBox,
dChoice) have a Choices property that would let you populate by doing
something like:
class MyListBox(dabo.ui.dListBox):
def initProperties(self):
choices = []
biz = self.Form.getBizobj()
biz.first()
for i in range(biz.RowCount):
choices.append(biz.<fieldname>)
biz.next()
self.Choices = choices
Adi J. Sieker wrote:
Hi,
I have a BizObj assigned to my dForm.
and I have a Panel on that Form which contains a dabo.ui.dListControl.
Sample code below.
The question now is what is the Dabo way of filling the ListCtrl with
data from the rows in the BizObj?
adi
class noteListPanel(dabo.ui.dPanel):
def initProperties(self):
self.pages = {}
def afterInit(self):
self.Sizer = dabo.ui.dSizer("vertical")
self.pageFrame = self.addObject(dabo.ui.dPageFrame)
assert(isinstance(self.pageFrame,dabo.ui.dPageFrame))
self.Sizer.append(self.pageFrame, "grow", 1)
list =
self.pageFrame.insertPage(NOTE_PAGE_LIST,dabo.ui.dListControl, "List")
self.pages['list'] = list
assert(isinstance(list,dabo.ui.dListControl))
list.addColumn('Notes')
tree =
self.pageFrame.insertPage(NOTE_PAGE_TREE,dabo.ui.dTreeView, "Tree")
self.pages['tree'] = tree
assert(isinstance(tree,dabo.ui.dTreeView))
def activatePage(self, page):
try:
page = self.pageFrame.Pages[page]
page.Raise()
except:
pass
class freeNotesFrame(dabo.ui.dForm):
def initProperties(self):
self.Caption = "freeNotes"
def afterInit(self):
self.lPanel = self.splitter.addObject(noteListPanel)
primaryBizobj = bizNotes(self.connection)
# Register it with dForm:
self.addBizobj(primaryBizobj)
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
--
Paul McNett
http://paulmcnett.com
http://dabodev.com
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users