On Jul 27, 2008, at 5:58 PM, Steve Rose wrote:

> As a rank beginner, I've probably missed something silly.

        Not silly at all - it is a little confusing. There are two distinct  
controls: dListBox and dListControl. The former is the traditional  
listbox common in UIs; the latter is a hybrid of grids and lists that  
can do some pretty cool things, but is overkill for most common uses.

        ListSelection events only apply to dListControl, not dListBox. For  
dListBox, you want to bind to the Hit method.

> lstBox.bindEvent(dabo.dEvents.ListSelection, self.onListSelection)
>
> def onListSelection(self,evt):
> print 'list hit'

        One thing I should point out: if you create a method whose name is  
on<EventName>, and that event is raised by the class, then it will be  
automatically bound to the event for you. So in this code you've tried  
to bind to the event twice: once with the explicit binding, and once  
with the auto-binding.

-- Ed Leafe





_______________________________________________
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]

Reply via email to