Jean-Yves F. Barbier wrote: > Ron a écrit : > >> Is it possible to catch events from a DataBrowser object? >> >> Lets say >> PUBLIC SUB DataBrowser1_MouseUp() >> ... >> END >> PUBLIC SUB DataBrowser1_DblClick() >> ... >> END >> >> The docs say those are valid but I cannot get it to work, they dont seem >> to get called, anyone use these? >> >> Gambas 2.15.2, qt. >> > > Wild guess: they're preempted by the sorting command it applies to a column > when you click on its header. > > JY > Ok, found it out myself just now.
I wanted to catch a click on a row of a DataBrowsers GridView so I can display an image alongside with the name of the text in column 0 of the row clicked. So I implemented an Observer to peek at the DataBrowser.GridView events, and it worked! Something like this: PRIVATE hObserver AS Observer PUBLIC SUB Form_Open() hObserver = NEW Observer(DataBrowser1.GridView) AS "GridObserver" END PUBLIC SUB GridObserver_Click() DisplayProduct(DataBrowser1.GridView[DataBrowser1.GridView.Row, 0].Text) END I love this language! Regards, Ron_2nd. ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user