Whats the quickest way to unmark all the marked items in VC++ 6.0 Ver?
(I just searched for a string, clicked 'Mark All' and then wherever the item appeared, a blue indicator is seen at the left. does anyone know reverting it back?)
I tried project->settings, but in vain.
According to this DaniWeb question Ctrl + Shift +F2 should clear them all.
Press Ctrl+F2 to mark/unmark a line of text. Press F2 to skip between marked positions within each source-file. The list of current bookmarks can be displayed by the Edit -> Bookmarks dialog or by pressing ALT+F2. You can clear all bookmarks there.
Clear all bookmarks - Ctrl+K, Ctrl+L
Ctrl+Shift+F2 will clear all bookmarks.
Related
When I have text selected in a VS 2017 text edit window and then hit ctrl+t to do ReSharper's 2017 Ultimate's "go to everything", the selected text is not automatically placed into the "go to everything" search field.
As automatically pasting selected text into search dialogs is pretty standard functionality, I'm hoping there is a way to configure ReSharper to do this but have not been able to find one.
Does anyone know? Thanks in advance!
Try ticking the checkbox Remember last search on ReSharper | Options | Environment | Search & Navigation page. According to the WebHelp page https://www.jetbrains.com/help/resharper/Reference__Options__Environment__Search_and_Navigation.html, that should help
ReSharper can remember the last input that you used to find something
with Search Everywhere/Go to Type, Go To File, and Go to Text actions.
When this option is selected, ReSharper will also use your current
selection in the editor as the initial search query. For example, you
can select a file name in a string and then press Ctrl+Shift+T to
search for files in your solution that match this name.
I am taking an existing UI component that we have based on QTableWidget and placing two of them inside QTabWidget pages. I want to allow the user to enter data into the table in the first tab and then when they press a button to move to the second tab and have the first cell in edit mode.
I am using the editItem method of QTableWidget to edit a given QTableWidgetItem. The trouble is that something is occurring to stop the edit (or maybe it never starts in the first place).
If I call editItem a second time then it fails, but if I click on the cell then it will enter the edit mode with the cell highlighted and the cursor blinking. I was just wondering if there is a way to do this programmatically that I may have missed?
One option would be to simulate a tab key press and then shift-tab but I have not been able to do this. I can simulate the tab but if I try to add the shift modifier then it jut produces a normal tab.
This is my tab code that works:
QApplication::postEvent(tableWidget, new QKeyEvent(QEvent::KeyPress, Qt::Key_Tab, Qt::NoModifier));
This is my shift-tab code that doesn't work:
QApplication::postEvent(tableWidget, new QKeyEvent(QEvent::KeyPress, Qt::Key_Tab, Qt::ShiftModifier));
Any suggestions would be appreciated.
It looks like shift-tab is actually reported as Qt::Key_Backtab rather than Qt::Key_Tab with the shift modifier as I had expected...
I think this will do the job for us but would welcome any better solutions.
Is it possible to go to the next/prev bookmark only inside the current file? I'm using VS 2010 and I find it extremly annoying that it jumps always across all files when I want to navigate inside the current file only.
Yes. Go to "customize" (right click on the toolbox area, choose customize) ->commands->keyboard, choose edit.NextBookmarkInDocument and associate it with a shortcut.
In addition, you can add it as a button in the text editor toolbar. Go to to text editor toolbar, press the little mark on the bottom-right,and choose the appropriate button to add.
Set bookmarks to stay in one file in Visual Studio 2019
In the Search box at the very top menu, put in ‘customize’ and hit Enter’.
A complex box comes up, but I simply clicked on a button at the bottom labelled ‘Keyboard’, which is where keyboard shortcuts can be set up.
That brings up another huge box. In the left hand pane is Environment and under that is Keyboard. I guess that the way I went in is why this was expanded and already selected, so there must be other ways to get to the same place.
In a right hand pane is now a huge list of commands that can have shortcuts attached!
The ones to scroll to (enlarge the box or the scroll bar is a joke. A slight move scrolls dozens of lines!) are Edit.NextBookmarkInDocument and Edit.PreviousBookmarkInDocument. (similar commands without ‘inDocument on the end are what f2/ shift f2 do by default and jumps between files rather than staying in the same document.)
When you select a command you can then just click on the field labelled ‘Press shortcut keys’ and then press the keys you want to be the shortcut for that command.
I assigned Edit.NextBookmarkInDocument to f2, which then replaces the old f2 that jumps from file to file, and shift f2 for Edit.PreviousBookmarkInDocument. You have to press the ‘Assign’ button to make VS remember the change. After this, bookmark jumps stay in the same file. I guess you could choose any shortcut you fancy, and it does at least show you if that shortcut is assigned and what it is assigned to.
There are some features which I have not explored, like when I use f2 it shows it is assigned to ‘Rename’ but it seems to not effect that function at all when you reassign and just takes it away from the jump between files command version. Maybe someone would like to delve deeper, but what I did worked without any side effects and renames outside of VS still worked with f2 so I have no idea what it was going on about.
Problem:
I wish to underline the first letter of certain static text controls (such as Login and Password). The letters become underlined when the ALT key is pressed.
What I have tried:
In C#, I was able to acheive this by using an ampersand. Such as "&Log in" or "&Password". I am trying to find a similar method in C++. The below picture shows an example in C#:
I am using MFC/C++ in Visual Studio 2010.
Edit:
Added information about the ALT key. Here is an example of what I am trying in Visual Studio 2010's properties box. I am adding an ampersand to the front of the "Caption"'s text.
When I run my program in the debugger, the first letter is not underlined (until ALT is pressed):
There's a fundamental difference between a menu and a static control.
To do this in a menu, you do it just like in C#. Here's a screen shot of editing a menu in a C++ project:
...and here's the result:
For a static control, you have to clear the SS_NOPREFIX style for the control to get the same behavior. However, it's been my observation that under some circumstances the underline doesn't show (but I haven't ever pinned down the precise circumstances under which the underline didn't show--I think when it happened, I fixed it by changing the font, but I don't remember for sure).
After help from the SO community, it seems that using the ampersand (&) symbol before the desired underlined letter is the correct way. There was a setting on my personal machine that would keep the underlined letters hidden until the ALT key was pressed.
According to the MSDN:
A user often has to press ALT in order to see access key designations. To ensure that you address them throughout the development process, set your computer to persistently display access keys.
In Windows 8: Open Control Panel -> Ease of Access Center -> Make the Keyboard easier to use.
At the bottom of the screen, check "Underline keyboard shortcuts and access keys".
The tab I'm working on has 12 editfields, the scrollpanel does not display all of it, the last 2 editfields gets chopped/cut off. They are only displayed when I click into them and put in some input. May I know how to solve this?
You can use Scrollpanel.add these edit boxes to scrollpanel and add scrollpanel to Form.