Is there any way to get subnames of TGLVEntry? There is a method SetSubnames, but no GetSubnames or GetSubname…
How should a double click on the TGListView be handled? It seems my program sees dblclick from TGLVContainer, but not from the TGListView. The sample is on the pyROOT forum: TGListView signals
[quote=“LeWhoo”]1. Is there any way to get subnames of TGLVEntry? There is a method SetSubnames, but no GetSubnames or GetSubname…[/quote]Well, you’re right, there is no getter…[quote=“LeWhoo”]How should a double click on the TGListView be handled? It seems my program sees dblclick from TGLVContainer, but not from the TGListView.[/quote]Well, this should work, if you connect to DoubleClicked() instead of Clicked(). Which version of ROOT? Which platform? Which compiler?
[quote=“LeWhoo”]I understand that this is “lacking feature”, beacuse getter with index like GetSubname(Int_t indx) should be extremely easy to write [/quote]Indeed. I will add the missing methods.
And concerning signal slots, it works perfectly fine with 5-34-00-patches, and it should work with older versions as well. Just try the attached macro and let me know if it doesn’t work for you…
[quote=“LeWhoo”]Btw. Scrolling a mouse wheel produces DblClick event. Not sure if it is the expected behaviour…[/quote]Well, I don’t see this… Anyway, you can still check for the mouse button id (mouse wheel should be 4 or 5)
OK, I solved the problem, I was associating container with the main window not the list window. Maybe you could add the example you posted to tutorials? It is not really clear how to use TGListView, since it is not well documented.
Well, we are going to review all tutorials, so maybe I will add this one (or similar) but there are several example showing signal/slots anyway, and the principle is the same for all classes…
For signals/slots yes. But not for the TGListView as a gui element. I spent some time trying to figure out how to use it and encountered lot’s of crashes before. These simple things like a need for container, need to Associate it with list, need to SetContainer for the list, etc.