14.09.2010 21:17, Paul McNett пишет: > On 9/14/10 11:10 AM, Stanislav Colotinschi wrote: > >> Hi. I have such a question. I want to create a context menu for my grid. >> I read some pages from the mailing list about it and I found that I >> should use fillContextMenu. So I have a piece of code: >> >> mn = dabo.ui.dMenu() >> mn.append(caption="Test") >> grd = self.cltable >> grd.fillContextMenu(mn) >> >> >> That's all right, no errors, but when I click the right button of the >> mouse, nothing happens. I tried to replace the last line with: >> >> grd.bindEvent(dabo.dEvents.GridMouseRightClick, grd.fillContextMenu(mn)) >> > Try: > > grd.bindEvent(dabo.dEvents.GridMouseRightClick, grd.fillContextMenu) > > (bind the method, not the return value of calling the method) > > 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] > Thanks, that works, but how can I define my context menu in grd.fillContextMenu? I mean, can you give me a little example?
-- Regards Stanislav Colotinschi _______________________________________________ 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]
