Ed Leafe wrote:
> On Jun 1, 2007, at 11:38 AM, Paul McNett wrote:
>
>> But this is stuff that should probably get discussed on dabo-dev, not
>> dabo-users, as the whole point of Dabo is to shield users from
>> having to
>> know such uninteresting minutia.
>
> Good point. The thing to remember, unless you're coding the
> implementation of Dabo events, is that the event object passed to
> every event handler not only contains a reference to the object that
> raised the event, but lots of other potentially useful things that are:
>
> mouse events: x,y position, meta keys that were pressed
> menu events: text of the menu that was selected
> key events: key code, key character, unicode key, unicode character,
> modifier keys also pressed
> window close events: whether this is a 'forced' close
> tree events: selected node, selected caption, item ID
> splitter events: sash position, panel removed on unsplit events
> grid events: row, col, meta key presses
> calendar events: selected date, selected weekday
> foldPanelBar events: the panel affected and its expanded/collapsed state
>
> This information is passed in the evt.EventData dict.
... and one tip: When coding a UI using a control I've not had much
experience with (there are quite a few ui controls), one of the first
things I'll do is find out what is available from the EventData dict.
IOW, I'll write code like:
def onHit(self, evt):
for item, val in evt.EventData.items():
print item, val, type(val)
This tells me the interesting things that I have to work with.
--
pkm ~ http://paulmcnett.com
_______________________________________________
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/dabo-users/[EMAIL PROTECTED]