Brad Campbell wrote:
Mattias Gaertner wrote:
On Wed, 08 Oct 2008 21:10:38 +0400
Brad Campbell <[EMAIL PROTECTED]> wrote:

G'day Guys,

Is there a TTabControl or TPageControl style control I can use where
I can assign a popupmenu to the actual tab area? Both TTabControl and
TPageControl seem to give me a popup with the list of tab names
there, but I can't get the user assigned popup menu to have any
affect in that area.
It is a todo to add the popup menu to this gtk menu.

Right, yes I just tested in on Win32 under Wine and it works perfectly.
I'll have a look and see if I can get a clue :)

This makes it work for me in my application and in the lazarus editor (although I think the menus are now somewhat mismatched for the tab purpose). I can now determine which tab the menu was opened on using IndexOfTabAt()

I don't know if it's the *right* fix.. but it's working here.

Regards,
Brad

--
Dolphins are so intelligent that within a few weeks they can
train Americans to stand at the edge of the pool and throw them
fish.
Index: gtkwsextctrls.pp
===================================================================
--- gtkwsextctrls.pp	(revision 16923)
+++ gtkwsextctrls.pp	(working copy)
@@ -362,7 +362,7 @@
   DebugGtkWidgets.MarkCreated(Pointer(AWidget), dbgsName(AWinControl));
   {$ENDIF}
   gtk_notebook_set_scrollable(AWidget, True);
-  gtk_notebook_popup_enable(AWidget);
+  gtk_notebook_popup_disable(AWidget);
   if TCustomNotebook(AWinControl).PageCount=0 then
     // a gtk notebook needs a page -> add dummy page
     GTKWidgetSet.AddDummyNoteBookPage(AWidget);
_______________________________________________
Lazarus mailing list
[email protected]
http://www.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to