I am try to use Owner-Draw menu. The only problem I can not solve is that I don't know how to implement (or enable?) the Menu Accelerator Keys (underline). I am using Win32, and what I am concerning is the main menu, not the submenu. How can I implement or enable underlines when I use Owner-Draw menu?
p.s. The Menu Accelerator Keys is a letter with a underline, which is used when users press Alt to access menu items. It is created by & character such as Save &As.
Use DrawTextEx() to draw the text, it takes care of it automatically. Use the DT_HIDEPREFIX option if you need to hide the underline, DT_NOPREFIX if you need to display the & for some reason.
The & before a char to underline it works also for DrawText(); the DT_HIDEPREFIX works as well. At least this works fine for an owner-draw button control.
Related
I am unable to perform multi-file text search and replace (in Visual Studio).
In the past, when I opened the "Replace in Files" dialog, there were 4 buttons in the lower right. One of the bottom two buttons allowed me to "Replace All".
The two lower buttons (including "Replace All") are no longer present.
I believe this occurred after I changed some Windows settings so that I could use menus without the Magnifier.
It is not just a matter of the buttons being off-screen because the window is too large (although it is too large - they would be off-screen, if they were present).
I can drag the window and see the bottom, even though the top is then off-screen (I use AltWindowDrag, allowing me to hold the ALT key, and drag by any part of the window, not just the title bar).
The two lower buttons are not present. I'm unable to resize the window - when I try, nothing happens, or the window repositions so that I can see the title bar, but can no longer see the bottom.
The two buttons that are still present (Find Next and Replace) don't have keyboard shortcuts, so I presume that Replace All doesn't either. Nor can I select either of those two buttons using Tab, so probably can't select an "invisible" "Replace All" button that way.
Any help appreciated.
You can use Find and Replace by pressing Ctrl+H and to Replace All just use Alt+A.
If I use Alt+Drag to make a rectangular selection in PhpStorm, the program moves focus to the menu bar (like when you press just Alt in Windows apps). I then need to do click Esc to restore focus, thus making the short-cut rather pointless.
I've tried checking the Disable mnemonics in menu option at File → Settings → IDE Settings → Window Options but it only hides the underline character in menu items.
Is there a decent way to make rectangular selections with the mouse?
Known issue, please see IDEA-87408
Being able to use Ctrl+. and Enter save me alot of time. I would like to be able to do this with the Resharper Icon that shows in the left margin. Is there a way to do this?
The default shortcut key for it is Alt+Enter.
I can choose the navigator I want using ⌘+1, ⌘+2, etc. and I can jumpt to the filter bar using opt+⌘+j.
Is there a shortcut that can clear the filter that is better than option-command-j, then command-a, followed by a backspace?
Yes. Just press the Esc key.
"Option-Command-J", "Esc"
Is it possible in Gtk+ to have an add-tab button inline with the tabs in a notebook, ala Opera or Google Chrome? I do know that Opera uses Qt and Chrome uses custom tabs, but is it possible in pure Gtk+?
Well, if it is not possible, there is a simple workaround:
Create a tab with the title "New Tab" or "+" or whatever
Detect when the tab is selected and, when such happens, create a new tab. Focus on that new tab so that the "New tab" tab isn't ever selected.
Sure. Check out the class BrandedNotebook at line 1384 of this file.
Unfortunately Gtk+ doesn't give you a "nice" way to do this, but you should be able to determine the amount of space available, and use it as you wish. In the case of BrandedNotebook, a pixbuf is drawn in the space, and mouse clicks are handled within the coordinates of the pixbuf.