View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0038098 | Lazarus | Packages | public | 2020-11-17 16:52 | 2020-11-17 23:47 |
Reporter | wp | Assigned To | |||
Priority | normal | Severity | minor | Reproducibility | have not tried |
Status | new | Resolution | open | ||
Summary | 0038098: Context menu of a T(Float)SpinEdit(Ex) opens by right-click only on edit field, but not on spin buttons. | ||||
Description | When 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 Reproduce | Run 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. | ||||
Tags | No tags attached. | ||||
Fixed in Revision | |||||
LazTarget | |||||
Widgetset | |||||
Attached Files |
|
|
|
|
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. |
|
How can I assign a popup menu to the Buddy? |
|
(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. |
|
> 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 (https://forum.lazarus.freepascal.org/index.php/topic,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". |
|
TSpinEdit is a different beast (not related to the "grouped edit" controls). If Delphi supports this, then Lazarus not doing so is an incompatibility. |
|
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. |
Date Modified | Username | Field | Change |
---|---|---|---|
2020-11-17 16:52 | wp | New Issue | |
2020-11-17 16:52 | wp | File Added: spinedit_contextmenu.zip | |
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 |