How i can call the system popup menu from a TSynEdit component - delphi

When I make a right click in a TMemocomponent the system display a popup menu like this
but when I use a TSynEdit component this popup menu is not shown, the question is exist any way to activate this system popup menu in a TSynEdit component or do I have to implement myself a right-click popup menu for the TSynEdit component to get right-click Cut,Copy,Paste,Delete functionality ?

The popup menu you're showing is added by Windows itself to Edit controls (TMemo is a wrapper around a multiline Edit control). Since SynEdit isn't based on the Windows Edit control, but is implemented fully itself, Windows doesn't provide that menu.
If SynEdit doesn't provide a popup menu itself, you'll have to implement your own.

Related

How to close TPopupMenu programamaticly [duplicate]

I've got an MDI win32 application in Delphi.
It has many forms, all of them and their inner components have own popup menus.
After some time when application idles trigger starts and it closes all child windows.
But it doesn't close popup menu if it is showing. (For example user clickes right button and leaved computer -the popup menu should be closed also when trigger starts.)
GetWindow function doesn't find the popup menu.
How to find the popup menu and close it?
SendMessage(PopupList.Window, WM_CANCELMODE, 0, 0);
The global Menus.PopupList object manages the window that handles all messages for VCL popup menus in the application.

How to disable the popup menu of TMemo?

I'm using Firemonkey TMemo component in my desktop application, I hope that when the user right-clicks or Long-Taps on the Memo , the default menu will not been pop up.
This is actually easy.
Just drop a new TPopupMenu on your form and give it a good name (pmRecipe, say). Make sure not to add any menu items to it! Then simply assign it to your memo's PopupMenu property.
However, as a user of your application, I expect a context menu, so I might get annoyed by the lack of such a menu. (I'd also be annoyed by the fact that the app is FMX and not VCL and that the control isn't the native Windows EDIT control, but maybe that's just me.)

delphi TRibbon rightToLeft AppliactionMenu cover the [X] Close Window Button

Creating a new Delphi Vcl Forms Application.
Drop TRibbon
Drop ActionManager
Connect Between them.
Right click the Ribbon1 to add Tabs and Groups.
Right click the Ribbon1 to add Application Menu.
In the Object Inspector choose the Ribbon1, and set BidiMode to bdRightToLeft.
Run.
The Form that is created is deffrent from design time, as the application menu covers the Close Appliaction button.
What can be done to lower the Application Button?

How to find and close popup menu in Delphi?

I've got an MDI win32 application in Delphi.
It has many forms, all of them and their inner components have own popup menus.
After some time when application idles trigger starts and it closes all child windows.
But it doesn't close popup menu if it is showing. (For example user clickes right button and leaved computer -the popup menu should be closed also when trigger starts.)
GetWindow function doesn't find the popup menu.
How to find the popup menu and close it?
SendMessage(PopupList.Window, WM_CANCELMODE, 0, 0);
The global Menus.PopupList object manages the window that handles all messages for VCL popup menus in the application.

put designer window in background

This is annoying ... In Delphi 7 when you clicked on the code window the form would automatically hide. Now it stays on top. I have to minimize it to remove it from focus. Are there any settings that correct this behaviour ? Also I must play hide and seek with component pallete on the right. I have it open but soon as I try and click on the scroll bar to try and search for my components I get everything replaced by Delphi projects etc. Then I must click inside the form for the component pallete to come back again. Annoying... Any way to disable this ?
For the first part of your question you can disable the embedded designer in order which the switch between the form and the code will be like the Delphi 7 IDE.
Tools-> Options -> Environment Options -> Vcl Designer -> Embedded designer (uncheck)
Also you can take a look to the Simon Stuart plugin RADSplit
Now for the component palette part, this windows change depending of the current active form , so if you active window is the form designer the Tool palette show the components else show the Delphi projects menu. Anyway Delphi XE2 includes the classic palette component which always show the components in top toolbar even if you are in the source code view.

Resources