View Issue Details

IDProjectCategoryView StatusLast Update
0037171LazarusLCLpublic2020-06-04 22:46
ReporterAnton Kavalenka Assigned ToJuha Manninen  
Status assignedResolutionopen 
Product Version2.1 (SVN) 
Summary0037171: tabcontrol: Allow specified PopupMenu work when page-selector menu disabled
DescriptionThere is TTabControl option nboHidePageListPopup which disables popping menu for page selection.
Either with this option set or not the specified PopupMenu (either in designtime or runtime) does not shown on mouse right-click or keyboard [=] context menu button.
Steps To ReproduceRun the attached test. Try to get popup menu specified in design.
Apply the patch and test again.
TagsNo tags attached.
Fixed in Revision
WidgetsetGTK 2, GTK 3, Win32/Win64, Cocoa, QT5
Attached Files


related to 0037178 resolvedZeljan Rikalo QT5: Changing TabControl.Options causes an access violation inside QT5 libs 


Anton Kavalenka

2020-06-03 14:45

reporter (108,277 bytes)
tabcontrol.diff (1,139 bytes)   
Index: lcl/comctrls.pp
--- lcl/comctrls.pp	(revision 63281)
+++ lcl/comctrls.pp	(working copy)
@@ -733,6 +733,7 @@
     procedure MouseUp(Button: TMouseButton; Shift:TShiftState; X,Y:Integer); override;
     procedure MouseEnter; override;
     procedure MouseLeave; override;
+    function GetPopupMenu: TPopupMenu; override;
     class procedure WSRegisterClass; override;
   TNoteBookStringsTabControlClass = class of TNoteBookStringsTabControl;
Index: lcl/include/
--- lcl/include/	(revision 63281)
+++ lcl/include/	(working copy)
@@ -198,6 +198,14 @@
+function TNoteBookStringsTabControl.GetPopupMenu: TPopupMenu;
+  if (Parent is TTabControl) and (nboHidePageListPopup in Self.Options) then
+    Result:=TTabControl(Parent).PopupMenu
+  else
+    Result:=inherited GetPopupMenu;
 class procedure TNoteBookStringsTabControl.WSRegisterClass;
   inherited WSRegisterClass;
tabcontrol.diff (1,139 bytes)   

Juha Manninen

2020-06-04 08:54

developer   ~0123214

Last edited: 2020-06-04 08:54

View 2 revisions

Interesting. With QT5 bindings the demo crashes. Actually changing the Options in any way creates an Access violation. I must make a separate bug report about it.

Q: Is there a reason why Options is not published for TabControl? The exact same Options is published for PageControl.
I will publish it if OK.

Juha Manninen

2020-06-04 22:10

developer   ~0123228

I applied the patch in r63287 and published Options. Please test.

Issue History

Date Modified Username Field Change
2020-06-03 14:45 Anton Kavalenka New Issue
2020-06-03 14:45 Anton Kavalenka File Added:
2020-06-03 14:45 Anton Kavalenka File Added: tabcontrol.diff
2020-06-04 08:54 Juha Manninen Note Added: 0123214
2020-06-04 08:54 Juha Manninen Note Edited: 0123214 View Revisions
2020-06-04 22:05 Juha Manninen Assigned To => Juha Manninen
2020-06-04 22:05 Juha Manninen Status new => assigned
2020-06-04 22:10 Juha Manninen Note Added: 0123228
2020-06-04 22:46 Juha Manninen Relationship added related to 0037178