Intellij toolwindow close/open or show/hide programatically - intellij-idea

I have used the Intellij's tool window as the main frame. On click of a button from the same window, another window (jdialog) opens. When the jDialog box opens, i want to hide or close the tool window. And when the user clicks the stop button in the jDialog box, I want the tool window to appear again.
I have tried to set the visible property to false, like
toolWindow.getComponent().setVisible(false);
This just hides the content, but not the tool window itself.
Can you please suggest me a way to achieve this.

This is how you show/active it:
toolWindow.activate(null);
so hide could be like this:
toolWindow.hide(null);
and close like this:
ContentManager contentManager = toolWindow.getContentManager();
contentManager.removeAllContents(true);
contentManager.dispose();
(but I have not tried it :))

Related

Showing Tool-tips while Application is in the System Tray?

In my application when it is iconized in the system tray, and through a ContextMenuStrip1 displays a context menu and when I click the icon I can choose what to display; the application, close it etc.
Now, when the mouse is over the icon I would like to show a tooltip (property that unfortunately does not have, but that have the individual menu items), it always shows me the name of the menu object: ContextMenuStrip1, even in its text property set something else.
Since at some times the app makes updates in background I would like to show under the icon a small progressbar as do some application. How is this possible in vb.net? (I'm using VB2012)
Thank you all.
I resolved you need to use the Text property of the notifyIcon object.

How to handle a window control in Selenium

I'm currently automating an application using selenium ,and when a button is clicked a new pop up window appears.I have to switch to that window..its like a form in which I have to fill the persons name, city etc
I am new to selenium..so any help would be appreciated.
After click, popup window appears..... now
1. use Firebug to inspect fields(username) are available in Form
if you are able to inspect, then no need to move control to window etc task
Just find the object path and do Actions on each fields in form.
Basically it is Hidden division popup window.
If a new pop-up window is shown and you want to perform actions in the new window, you have to first switch to the frame/window.
Use driver.switchTo().frame(1)
or Use driver.switchTo().frame("dropboxIframe") [Example switching to dropbox window]
You will have to know the name of the frame, which you can find using inspect element.
Also after switching to different window, always provide some Thread.sleep for few seconds for that page to load.
Once you are done with work on pop-up window and want to come back to default frame, use this:
driver.switchTo().defaultContent()
As #Bravana AS said, you need to switch to a frame:
If you have only a new frame, this one will be '1', your previous page is '0', so, use:
driver.switchTo().frame("1");
you can pass INDEX and ID to frame()
to back to your previous page:
driver.switchTo().defaultContent();
OR
driver.switchTo().frame("0");

Not able to click on a button in a new window

I trigger a click on a button which then opens another window (which is neither a new browser nor a frame).
In the new window I wish to click a button but my code is not triggering the click.
I tried to switch to keyword matching but it is still not working.
My code:
driver.findElement(By.xpath("//span[text()='Continue to General Information']")).click();
…which I am sure is not correct to click the button in the new window.
What syntax should I use to click the button?
You can try something like this:
driver.SwitchTo().Window(driver.WindowHandles.Last());
I found it here. There is bit of an explanation of how it works there.

dojox form uploader button is clickable only on the border, but not on the full button

I am using IE8
I have created dojo button as below
It has displayed button "Select Files".
Problem
When I click on top border of button its working fine. When I click on any other places on button file picker dialogbox is not displaying.
When I right click on button and select zoom in option once, I am able to click on all the coordinates of button(after selecting zoom option, it works similar to html button).
Note: I have used flash for multiple file selection.
Please tell how to make this button work by clicking in any place.
Have you checked if there is other element's borders in front of the button? Try to check with the developer tools option activated on your browser and select "inspect element" (or similar). If another element is detected when you hover over the button, you have your answer.
Apart from that I have no more ideas.

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.