I am using this routine to pop up the Shell Context Menu for a file name which is working well, except for one thing.
How to pop-up the Windows context menu for a given file using Delphi?
When I click "Copy" the menu closes as expected. If I move to another Folder or stay in the same one, when I right-click again for the Context Menu, it has no "Paste" option. Not even a grayed out one. I checked on the Poster's blog as mentioned in his Edit at the bottom, but that new routine crashes with Incorrect Parameter.
Can someone please assist with adding "Paste" to the original routine in the above link
Thanks
Look for TClipboard (library/uses ClipBrd). Using this you can manage a cliboard on Delphi.
More information: Basic CLipboard Operations
Obs.: You can use "Actions" too, depending your needs. See ActionManager component, and Action properties of your popupmenu.
Related
Recently I found out that the paste function on the source code panel of Trading View does not exist anymore. What I mean is that when I click the right mouse button, the drop down menu does not display paste option. Now it is impossible to copy and paste segments of code on the panel in order to edit an existing strategy. Very, very annoying! Does anybody know how to go around this?
I tried to make a copy of an existing strategy and then edit it but that does not work either.
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.)
I apologize in advance for this vague question but can anyone give me a pointer to this problem?
The Delete key does not work as normal in my application. e.g. The Delete key has no effect in an editbox (i.e. it will not delete highlighted text) but Shift Delete does work. This seems to be the case thoughout the application. I have disabled all keypreviews and OnKey events in case they were causing it but the problem persists.
Can anyone suggest where I might look for the problem?
Running Windows 10 Delphi 10.3.3
If this happens only in this particular application, it is likely that you have a TActionList or TActionManager with an action using Delete as its shortcut, or a simple menu item with such a shortcut.
For instance, you might have an Edit menu with a Clear item using Delete as its shortcut:
Then that action or menu item will respond to Delete, not allowing the focused control to do its own thing.
This kind of mistake is surprisingly common. For instance, in the Delphi IDE, you have an edit field above the editor, showing you the current class:
If you select this text and press Ctrl+C, you expect it to end up in the clipboard. But no! Instead, the selected text in the code editor (if any) is copied, even though the code editor didn't have keyboard focus.
We are trying to create a captivate 6 presentation by importing a powerpoint 2013 presentation that has hyperlinks in it. However, it seems that the hyperlinks don't work when the project is published as a swf file. When you mouse over the hyperlink, the mouse changes the cursor to a hand, but when you click it, nothing happens ? Any ideas on what could be the problem or the fix for this ?
Captivate doesn't understand text hyperlinks; place a click box over the link and assign it the action 'Open URL or file' to accomplish this.
Note: the dropdown immediately to the right of the URL input box allows you to set the target of the link, and whether or not the presentation will be played/paused upon clicking.
I need to set the menu help text of my shell context menu popup menu item just like winzip shellContext menu. I tried IContextMenu_GetCommandString but it is only setting menu help for sub menus of my main popup menu. Please help me and let me know how to set the menu help for my main poup menu?
Thanks
In case you haven't solved this already, here is what worked for me.
You need to insert your popup menu into the explorer menu using InsertMenuItem, as described here. This allows you to give your popup menu an ID.
The shell passes that ID into IContextMenu_GetCommandString when querying the items, by way of checking for that ID you can return any help string you need.
However, it may simply not be displayed if you right-click on a folder in the (left) folders pane of explorer, and not in the files pane to the right. On my system, if one or more elements are selected in the files pane, the properties (type, size, name and some more stuff) are displayed in the status bar, even if I right-click on any folder in the folders pane.
This seems to be standard behaviour - at least on my system it's the same for all installed custom extensions and even for the default explorer menus.