[ROOTTALK] How to do popup menus

From: Tom Roberts <tjrob_at_fnal.gov>
Date: Thu, 12 Jul 2007 15:16:44 -0500


I am having problems getting a right-click popup menu to display correctly. the mouse event comes with X,Y relative to the TGTextEntry in which I clicked (the menu is a list of field-names to insert into the text entry). If I just display the TGPopupMenu in that frame, it is clipped and has room for only 1 entry. So I call GetParent() twice and can display in a TGFrame which clips the menu with room for 10-15 entries. But my menu can have several dozen entries.

What is the right way to display a TGPopup menu from a right click?

How can I get the menu to scroll when it has more entries than can be displayed? Or fold into several columns.

Tom Roberts Received on Thu Jul 12 2007 - 22:17:23 CEST

This archive was generated by hypermail 2.2.0 : Fri Jul 13 2007 - 17:50:01 CEST