View Issue Details

IDProjectCategoryView StatusLast Update
0038098LazarusPackagespublic2020-11-17 23:47
Reporterwp Assigned To 
PrioritynormalSeverityminorReproducibilityhave not tried
Status newResolutionopen 
Summary0038098: Context menu of a T(Float)SpinEdit(Ex) opens by right-click only on edit field, but not on spin buttons.
DescriptionWhen a PopupMenu is assigned to a control of the TSpinEdit family of components a right click opens the menu only when the click occured on the edit field, but not on the spin buttons. This is in contradition to Delphi where it does not matter where the right click occurs, on the edit field or on the buttons.

The same happens with the button-edit combinations, such as T(Float)SpinEditEx, TFileNameEdit, TDirectoryEdit, TCalcEdit, TDateEdit, TTimeEdit. Only the TDateTimePakcer opens the context menu also by right-clicking on the button.
Steps To ReproduceRun the attached demo. Right-click on the controls to open the (dummy) popup menu. The menu opens only when the right click is made on the edit field, it does not open when it is made on the button associated with the edit field.
TagsNo tags attached.
Fixed in Revision
Attached Files



2020-11-17 16:52


Bart Broersma

2020-11-17 18:48

developer   ~0127012

I am inclined not to implement this for controls derived from TCustomAbstractGroupedEdit.
You can bet that if we implement this, somebody will complain that he can no longer assign a popup-menu to the Buddy.
Also, I think it is not really necessary.

B.t.w. TLabeledEdit has the same "bug", no popup menu if you right click on the label.


2020-11-17 20:05

developer   ~0127014

How can I assign a popup menu to the Buddy?

Bart Broersma

2020-11-17 21:09

developer   ~0127018

(Buddy {protected property} as TWinControl).PopupMenu := SomePopupMenu?
You need the cast, since FBuddy is a TControl (in hindsight should have made that a TWinControl?)
Since e.g. for TEditButton Buddy is TSpeedbutton, this should work out of the box.
I never tested this though.


2020-11-17 21:58

developer   ~0127020

> I think it is not really necessary.

Agreed, I never missed it personally but I came across this issue in the context of a related forum post (,52167.msg384051). So, since there is a way to assign a popup menu to the button of the combined controls it is ok for me when you resolve this as "no change required".

Bart Broersma

2020-11-17 23:37

developer   ~0127021

TSpinEdit is a different beast (not related to the "grouped edit" controls).
If Delphi supports this, then Lazarus not doing so is an incompatibility.

Bart Broersma

2020-11-17 23:44

developer   ~0127022

Last edited: 2020-11-17 23:47

View 4 revisions

As for TLabeledEdit: Delphi 7 doesn't show a popup either if you right-click on the label.
My D7 doesn't seem to have TSpinEdit (my D3 did), so I can't test that.

Issue History

Date Modified Username Field Change
2020-11-17 16:52 wp New Issue
2020-11-17 16:52 wp File Added:
2020-11-17 18:48 Bart Broersma Note Added: 0127012
2020-11-17 20:05 wp Note Added: 0127014
2020-11-17 21:09 Bart Broersma Note Added: 0127018
2020-11-17 21:58 wp Note Added: 0127020
2020-11-17 23:37 Bart Broersma Note Added: 0127021
2020-11-17 23:44 Bart Broersma Note Added: 0127022
2020-11-17 23:44 Bart Broersma Note Edited: 0127022 View Revisions
2020-11-17 23:46 Bart Broersma Note Edited: 0127022 View Revisions
2020-11-17 23:47 Bart Broersma Note Edited: 0127022 View Revisions