How do I avoid using the mouse when extracting to field in IntelliJ - intellij-idea

When I press Alt+Cmd+F to extract a piece of code to a field, I'd like it to be final and initialised in the field declaration, but I have to use the mouse to click on the dropdown in the pop-up. How can I do this without using the mouse?

You can press ⌘+Alt+F twice, which will show separate dialog in which you can tab through the individual options using the keyboard.

Related

How to unfocus from all inputs/elements in Selenium without tabbing out

I have a form where I fill in textboxes through selenium (java). Some of the textboxes dynamically generate extra content when you click on them and remove the content when you focus on something else. This is a problem when I automate because if I am focused on a text box and try to click on something else, when the page removes the content it doesn't register my click and I need to click again. This leads to flakey behaviour since I need to now consider whether I need to click or double click a button depending on what element I was focused on before.
I can't send a tab key to the text box because sometimes it will tab into another textbox that has the same dynamic generation behaviour, leading to the same scenario as before.
I tried clicking the page element but it also doesn't seem to work. I also tried clicking the root div. It just doesn't seem to register my click (I also tried jsclicks)
What I would like to do is have a general way to unfocus a text box after I fill it.
Thanks!

In IntelliJ IDEA, how do I use the keyboard to highlight an arbitrary checkbox?

For example, if I press Ctrl-Alt-P to extract a parameter, pressing Tab on the resulting dialog box moves directly from "Name" to "Refactor". I know I can work around this by using Alt+key to select a checkbox (e.g., Alt+a for replace all), but as AltGr doesn't work I have to contort my left hand to hit this combination. How do I, using the keyboard, select the first checkbox, so I can use space to change it?
The only way to access the checkboxes in this dialog is via mnemonics (Alt+underlined letter).
There is also an open issue to add tabstops for checkboxes and radio buttons in the refactoring dialogs so that they can be accessed not only by the mnemonics, but also by cycling the components using Tab:
IDEA-154127 Extract refactorings: navigation and mnemonics problems
There is really nothing you can do about it until tabstops are explicitly implemented for these dialogs.

How can I remove windows right click menu?

I have a group of text boxes within my form. Whenever I right click on them or the panel they are in, I get this menu:
I want to remove this menu from showing, and leave the right click to be nothing. However, the mouseclick event never fires for any of these. Therefore, I am having trouble getting rid of it. It usually shows up when my text is highlighted.
Is there a way to remove it? Or am I looking in the wrong event?
Another option is to set the ShortcutsEnabled Property of the TextBoxes to False:
Use the ShortcutsEnabled property to enable or disable the
following shortcut key combinations and the control’s shortcut
menu
This disables the keyboard shortcuts as well; not sure if that is applicable to your scenario.

Need to change focus to another text box before buttons are activated

I am entering data into text fields in a browser via "type" command. In order for the Save and Cancel buttons to be activated (not grayed out), I need to click in another text field to change focus. This works manually, but I can't seem to figure out how to do it programmatically. I have tried click, clickAt, doubleClick, mouseOver/click/mouseOUt, mouseDown/mouseUp, focus, fireEvent ... all without luck. Thanks for any suggestions!
Does tabbing out of the input field enable the buttons? If so, maybe you can just do:
WebElement element = driver.findElement(By.id("your_input_field"));
element.sendKeys(Keys.TAB);

Is it possible to make a statusbar like notepad in VB?

I made a notepad using vb 2008 and I am facing a problem who I'd make the Statusbar.
any idea will be great.
Note: I am using the Textbox to read and write text
Thank you
You need to add a StatusStrip control to your form.
To find it, open the Toolbox, expand the "Menus & Toolbars" section, and double-click on the one named "StatusStrip".
Double-clicking on the control in the Toolbox will automatically add it to your form, and dock it along the bottom, just like it is in Notepad.
Once the control is there, you can customize it by changing properties in the Properties window. If you want to add information to the status bar, you do that by adding sub-controls inside of it. Click the drop-down arrow next to the "new" icon, and you'll see a list of possible choices:
"StatusLabel" — displays static text
"ProgressBar" — displays a progress bar, indicating the progress of a background operation
"DropDownButton" — displays a drop-down button, to allow a choice of multiple options
"SplitButton" — displays a drop-down button that allows a choice of multiple options, but also invokes the default option by a single click on the button.