Aah sure - because of the containers... I tried it, and it runs well, but I cannot catch action on the scroll bars of the treeview - and nothing comes from the menu and from the program window as well.
But it wouldn't disturb so much, so I think, this is a pretty good solution, thank you! What do you think of Jorge's way? It simply catches all mouse movements over the window you want to monitor. Rolf Am 07.09.2011 19:12, schrieb Fabien Bodard: > Private Sub SetAllObservers(hCont as Container) > > dim hObj as Object > Dim hObs as Observer > For each hObj in hCont.Children > hObs = new Observer(hObj) As "WatchAll" > if hObj Is Container then SetAllObservers(hObj) > Next > > End > > > in Form_Open or in _New : > > Public Sub _New() > > SetAllObservers(Me) > > End > > > Public sub WatchAll_MouseUp() > > Print Object.Type(Last) > > End > > 2011/9/7 Fabien Bodard<gambas...@gmail.com>: >> normal ... the function must be iterative... to take all the child of >> containers into account >> >> 2011/9/7 Rolf-Werner Eilert<eilert-sprac...@t-online.de>: >>> Hi Andreas, >>> >>> Thanks! Looks nice... I tried to integrate it into the program. It DOES >>> function, but only if I click on the panel below the menu. All other >>> controls in the program seem to be ignored. Same with MouseUp. KeyPress >>> doesn't react at all. Here is it: >>> >>> PUBLIC SUB Form_Open() >>> DIM OBJ AS Object >>> DIM OBSwatchall AS Observer >>> >>> 'Start an Observer for Each Control on this Form >>> FOR EACH OBJ IN ME.Children >>> OBSwatchall = NEW Observer(OBJ) AS "WatchAll" >>> NEXT >>> >>> >>> ini.DateiLesen >>> >>> ME.Width = ini.FensterBreite() >>> ME.Height = ini.FensterHoehe() >>> >>> IF ini.FensterZentrieren() THEN >>> ME.Center >>> ELSE >>> ME.X = ini.FensterX() >>> ME.Y = ini.FensterY() >>> END IF >>> >>> ME.Title = "Kartei 7.3" >>> ME.Font.Size = ini.FontGroesse() >>> >>> 'ldsv.DateisperrenAufraeumen >>> >>> EinrichtenBaum >>> >>> Log.Check >>> >>> END >>> >>> PUBLIC SUB WatchAll_MouseDown() >>> Suche.text = LAST.Name& "_MouseDown()" >>> END >>> >>> Any idea what is wrong? >>> >>> Rolf >>> >>> >>> Am 07.09.2011 10:11, schrieb Andreas Fröhlke: >>>> Hello, >>>> >>>> here's my idea. In Form_Open use the following Code: >>>> >>>> DIM OBJ as Object >>>> DIM OBSwatchall AS Observer >>>> >>>> 'Start an Observer for Each Control on this Form >>>> FOR EACH OBJ IN ME.Children >>>> OBSwatchall = NEW Observer(OBJ) AS "WatchAll" >>>> NEXT >>>> >>>> >>>> Then you only need one Function Like: >>>> >>>> Public SUB WatchAll_MouseDown() >>>> PRINT LAST.Name& "_MouseDown()" >>>> END >>>> >>>> You also can use other Events which must be available for each control >>>> like: >>>> >>>> MouseUp, MouseDown, KeyPress, KeyRelease, GotFocus, LostFocus, ... >>>> >>>> >>>> Regards A.Fröhlke >>>> >>>> -----Ursprüngliche Nachricht----- >>>> Von: Rolf-Werner Eilert [mailto:eilert-sprac...@t-online.de] >>>> Gesendet: Mittwoch, 7. September 2011 08:34 >>>> An: gambas-user@lists.sourceforge.net >>>> Betreff: Re: [Gambas-user] Does really nobody have an idea? >>>> >>>> Thank you Jorge, at a first glance this looks promising. I'll try to >>>> understand it when I've got some more time, maybe this afternoon or so... >>>> >>>> Regards >>>> >>>> Rolf >>>> >>>> >>>> Am 06.09.2011 20:35, schrieb Jorge Carrión: >>>>> Here there is a class that do exactly what you want (I hope). >>>>> >>>>> http://www.gambas-es.org/download.php?id=82 >>>>> I included a little proyect with example. >>>>> >>>>> Hope it'll be usefull. >>>>> >>>>> Regards. >>>>> >>>>> >>>>> 2011/9/6 Rolf-Werner Eilert<eilert-sprac...@t-online.de> >>>>> >>>>>> Thanks for your idea, Dag-Jarle, but isn't this effort exactly what I >>>>>> would like to avoid? >>>>>> >>>>>> I guess the whole thing depends on the question of how QT or GTK handle >>>>>> the events of the controls within a window/application. I cannot imagine >>>>>> that the controls are accessed by the GUI (X) directly. That would imply >>>>>> an event loop for each control. Instead, I would expect one event loop >>>>>> for the application within which you have one event request for each >>>>>> window within which you have one event request for each control of that >>>>>> window. >>>>>> >>>>>> If there is a slot for the overall mouse activities of one window or >>>>>> application in QT (on the C++ side), it should be easy for Benoit to >>>>>> connect this to a Gambas event. If not, things are different :-) >>>>>> >>>>>> Regards >>>>>> >>>>>> Rolf >>>>>> >>>>>> >>>>>> Am 06.09.2011 17:04, schrieb Dag-Jarle Johansen: >>>>>>> Something happened.... >>>>>>> >>>>>>> public sub WriteLogg() >>>>>>> print GetMe.name (and or other options) >>>>>>> end >>>>>>> >>>>>>> And the heavy stuff is here: >>>>>>> >>>>>>> for every Object you want to control, you will have to: >>>>>>> >>>>>>> private sub xxx_control_click() >>>>>>> GetMet=xxx_control >>>>>>> m.WriteLogg >>>>>>> >>>>>>> Alternate WriteLogg as function >>>>>>> >>>>>>> public WriteLogg(xctrl as control) >>>>>>> print xctrl.name.... >>>>>>> >>>>>>> I am sure one of the guys here have more sophisticated solutions for >>>>>> you., >>>>>>> f.eks the event-handler on every form, but I am not so good at that yet. >>>>>>> >>>>>>> Regards, >>>>>>> Dag-Jarle >>>>>>> >>>>>>> 2011/9/6 Dag-Jarle Johansen<dag.jarle.johan...@gmail.com> >>>>>>> >>>>>>>> Hi, >>>>>>>> >>>>>>>> I had to write something like that in VB for QM. Even though the effort >>>>>>>> might be overwhelming, I would do some thing like this: >>>>>>>> >>>>>>>> make a global object in some module, >>>>>>>> f.eks. >>>>>>>> m.module >>>>>>>> public GetMe as object >>>>>>>> >>>>>>>> in the same module you save or do anything f.eks >>>>>>>> >>>>>>>> puclic sub WriteLogg() >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> 2011/9/6 Fabien Bodard<gambas...@gmail.com> >>>>>>>> >>>>>>>>> good question rolf :/ >>>>>>>>> >>>>>>>>> 2011/9/6 Fabien Bodard<gambas...@gmail.com>: >>>>>>>>>> first answer for steve >>>>>>>>>> >>>>>>>>>> Public Sub Slider1_MouseUp() >>>>>>>>>> >>>>>>>>>> Print "Mouse is released" >>>>>>>>>> >>>>>>>>>> End >>>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> -- >>>>>>>>> Fabien Bodard >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>> ------------------------------------------------------------------------------ >>>>>>>>> Special Offer -- Download ArcSight Logger for FREE! >>>>>>>>> Finally, a world-class log management solution at an even better >>>>>>>>> price-free! And you'll get a free "Love Thy Logs" t-shirt when you >>>>>>>>> download Logger. Secure your free ArcSight Logger TODAY! >>>>>>>>> http://p.sf.net/sfu/arcsisghtdev2dev >>>>>>>>> _______________________________________________ >>>>>>>>> Gambas-user mailing list >>>>>>>>> Gambas-user@lists.sourceforge.net >>>>>>>>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>>>>>>>> >>>>>>>> >>>>>>>> >>>>>>> >>>>>> ------------------------------------------------------------------------------ >>>>>>> Special Offer -- Download ArcSight Logger for FREE! >>>>>>> Finally, a world-class log management solution at an even better >>>>>>> price-free! And you'll get a free "Love Thy Logs" t-shirt when you >>>>>>> download Logger. Secure your free ArcSight Logger TODAY! >>>>>>> http://p.sf.net/sfu/arcsisghtdev2dev >>>>>>> _______________________________________________ >>>>>>> Gambas-user mailing list >>>>>>> Gambas-user@lists.sourceforge.net >>>>>>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>>>>>> >>>>>> >>>>>> >>>>>> >>>>>> ------------------------------------------------------------------------------ >>>>>> Special Offer -- Download ArcSight Logger for FREE! >>>>>> Finally, a world-class log management solution at an even better >>>>>> price-free! And you'll get a free "Love Thy Logs" t-shirt when you >>>>>> download Logger. Secure your free ArcSight Logger TODAY! >>>>>> http://p.sf.net/sfu/arcsisghtdev2dev >>>>>> _______________________________________________ >>>>>> Gambas-user mailing list >>>>>> Gambas-user@lists.sourceforge.net >>>>>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>>>>> >>>>> ------------------------------------------------------------------------------ >>>>> Malware Security Report: Protecting Your Business, Customers, and the >>>>> Bottom Line. Protect your business and customers by understanding the >>>>> threat from malware and how it can impact your online business. >>>>> http://www.accelacomm.com/jaw/sfnl/114/51427462/ >>>>> _______________________________________________ >>>>> Gambas-user mailing list >>>>> Gambas-user@lists.sourceforge.net >>>>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>>>> >>>> >>>> >>>> ------------------------------------------------------------------------------ >>>> Using storage to extend the benefits of virtualization and iSCSI >>>> Virtualization increases hardware utilization and delivers a new level of >>>> agility. Learn what those decisions are and how to modernize your storage >>>> and backup environments for virtualization. >>>> http://www.accelacomm.com/jaw/sfnl/114/51434361/ >>>> _______________________________________________ >>>> Gambas-user mailing list >>>> Gambas-user@lists.sourceforge.net >>>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>>> >>> >>> >>> ------------------------------------------------------------------------------ >>> Using storage to extend the benefits of virtualization and iSCSI >>> Virtualization increases hardware utilization and delivers a new level of >>> agility. Learn what those decisions are and how to modernize your storage >>> and backup environments for virtualization. >>> http://www.accelacomm.com/jaw/sfnl/114/51434361/ >>> _______________________________________________ >>> Gambas-user mailing list >>> Gambas-user@lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/gambas-user >>> >> >> >> >> -- >> Fabien Bodard >> > > > ------------------------------------------------------------------------------ Doing More with Less: The Next Generation Virtual Desktop What are the key obstacles that have prevented many mid-market businesses from deploying virtual desktops? How do next-generation virtual desktops provide companies an easier-to-deploy, easier-to-manage and more affordable virtual desktop model.http://www.accelacomm.com/jaw/sfnl/114/51426474/ _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user