View Issue Details

IDProjectCategoryView StatusLast Update
0037171LazarusLCLpublic2020-07-12 20:56
ReporterAnton Kavalenka Assigned ToJuha Manninen  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
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 Revisionr63287
LazTarget-
WidgetsetGTK 2, GTK 3, Win32/Win64, Cocoa, QT5
Attached Files

Relationships

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

Activities

Anton Kavalenka

2020-06-03 14:45

reporter  

laztest120.zip (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;
   end;
   TNoteBookStringsTabControlClass = class of TNoteBookStringsTabControl;
Index: lcl/include/tabcontrol.inc
===================================================================
--- lcl/include/tabcontrol.inc	(revision 63281)
+++ lcl/include/tabcontrol.inc	(working copy)
@@ -198,6 +198,14 @@
     TTabControl(Parent).OnMouseLeave(Parent);
 end;
 
+function TNoteBookStringsTabControl.GetPopupMenu: TPopupMenu;
+begin
+  if (Parent is TTabControl) and (nboHidePageListPopup in Self.Options) then
+    Result:=TTabControl(Parent).PopupMenu
+  else
+    Result:=inherited GetPopupMenu;
+end;
+
 class procedure TNoteBookStringsTabControl.WSRegisterClass;
 begin
   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.

Juha Manninen

2020-07-11 11:12

developer   ~0123880

No complaints for publishing Options.
Resolving ...

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: laztest120.zip
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
2020-07-11 11:12 Juha Manninen Status assigned => resolved
2020-07-11 11:12 Juha Manninen Resolution open => fixed
2020-07-11 11:12 Juha Manninen Fixed in Revision => r63287
2020-07-11 11:12 Juha Manninen LazTarget => -
2020-07-11 11:12 Juha Manninen Widgetset GTK 2, GTK 3, Win32/Win64, Cocoa, QT5 => GTK 2, GTK 3, Win32/Win64, Cocoa, QT5
2020-07-11 11:12 Juha Manninen Note Added: 0123880
2020-07-12 20:56 Anton Kavalenka Status resolved => closed