Webbrowser Control, Screen Resolution and scrollbars - scrollbar

I have an Click Once application that utilizes a webbrowser control inside of a tab control that functions like a tabbed browser. When it is used at 1280x960 and lower resolutions the bottom scrollbar disappears and the right side of the web page is cut off. Looking for any ideas on what may be causing it and/or how to resolve it.
I add add the webbrower control using code:
TabControl.TabPages.Add("New Page")
WebBrowser1 = New WebBrowser
WebBrowser1.Name = "Browse Web"
WebBrowser1.Doc = DockStyle.Fill
TabControl.SelectedTab.Controls.Add(WebBrowser1)
CType(TabControl.SelectedTablControls.Item(0), WebBrowser).GoHome()

The problem turned out to be unrelated to the code. The main form had a width of 1500 and when it displayed on the 1280 resolution the webbrowser control apparently went to that width. Changing the main form width to 1200 resolved the issue.

Related

Layout items on QToolBox page to expand with page

In Qt Designer, how do you lay out the items on the pages of a QToolBox so that they expand with the toolbox? I have tried adding a table-view widget on a QToolBox page. Please see image:
But when the QToolBox is expanded along with my application main window, the table-view does not expand with the toolbox page.
Is there something I am missing ?
To answer my own question, first I had to have a layout on the desired page of the toolbox.
Then I had to highlight the toolbox itself in the object inspector pane (while the page I want to layout on is active AND has a layout object !!).
Then I chose the desired layout from the toolbox context menu (i.e. right mouse click on the toolbox object and choose Layout). This changed the layout on the active page. Not sure why this worked but it worked.
Thanks #ekhumoro for pointing me in the right direction.
You need to click on the toolbox page to select it, and then set a layout on the page itself. Each page in the toolbox will need its own layout set in this way.
If you look in the Object Inspector, you will see that each page has a QWidget automatically added to it. The layout for each toolbox page is actually set on that container widget, which then holds whatever other widgets you add to the page. Once the layout has been set properly, you should see the icon in the Object Inspector change to the appropriate layout icon.

How i can adjust the all elements that web page has?

I have a web page, and when I am zooming, all the elements that are there in the page move.
How do I modify my CSS file in order to fix this issue?
When you zoom the page using: CTRL+ OR CTRL- your browser is changing the layout of your page.
The is no way in JS to capture this zoom event , the only thing you can do it to catch the resize event and "fix" your page layout there.

Visual studio debugger still shows old removed pages from iframes

I use modal dialogs. A modal dialog is build up with a mask div, and a container div. The container div contains an iFrame with the modal aspx page. When the modal dialog is initialized, the mask and container are added to the page body. When I close the modal dialog, the mask and container are removed from the body.
Everything works fine, and when I start debugging in Visual Studio, and open a new modal dialog, I see the new page in the debugger at 'script documents - Windows Internet Explorer - somePage.aspx'
But when I close and remove the dialog, the page just stays 'alive' in the VS debugger, until I refresh the complete page.
Is this bad? Does the page 'stay alive' somewhere even tho its removed from the body? Or is it just a Visual Studio debugger UI thingy?
I found this question, about endlessly growing script block files. I think thats the same issue, but that question is not really answered there.
It is not enough to remove the container div that contains the iframe.
I expected that this would be sufficient to remove and destroy the iframe:
$(this.mask).remove();
$(this.container).remove();
The container contains one other div (the modal dialog title) and an iframe.
That iframe is not removed by killing the container using the above code.
It looks like its not just a Visual Studio debugger issue, because the memory of the iexplore.exe process in windows task manager is also going up, and up, and up, every time I close and open a new dialog.
Solution:
When I explicitly remove the iframe, then the page does disapear from the debugger!
I can do that by saving the the iframe in a var on initializing the modal dialog, and then explicity remove the iframe when removing the modal dialog. This way:
on create / initialize modal dialog:
this.frame = this.container.childNodes[0].childNodes[1];
and on close modal dialog:
$(this.frame).remove();

navigateToURL ... set modal property

When a user clicks a button, I need a separate browser window to popup. How can I set the modal property of the application? (ie, when a popup window opens, the main application is disabled until that popup is closed ... I need to use a browser window rather than a popup window, but can't figure out how to disable the main application)
PopUpManager.createPopUp (this, navigateToURL( url, "http://www.google.com" ) , true );
thanks!
[[Updated Answer]]
Ok, my modal dialog looks like so:
cg = mx.managers.PopUpManager.createPopUp(this, ChoiceGrid, true) as ChoiceGrid;
PopUpManager.centerPopUp(cg);
But, what I would do instead of what you're asking, is embed an IFrame in the modal popup. This is exactly what we're doing in our app to collect CC data (well, not the popup part, just the IFrame bit. http://code.google.com/p/flex-iframe/
This way, you have the standard modal dialog you're looking for, AND an internally managed 'view' out to your checkout server. Something like this:
<code:IFrame id="iFrameWithJSfunctions"
src="{checkoutURL}" />
The flex-iframe is pretty easy to work with, for the most part. You shouldn't have many problems with it.
[[Original Answer]]
I'm not sure you need a PopUp to do this.
Why don't you simply do:
navigateToURL(urlRequest,"_blank");
instead?
You should think of a Flex App as a self contained entity. The PopUpManager is designed to create Windows (Panels / any UIComponent) that reside over another component inside the SWF. It does not create items that pop up out of the SWF or in new browser windows.
navigateToURL could be used to create a HTML pop-up from your Flex application. However, there is very little--if any--communication between the SWF and the browser pop up. And there is no way to make a modal pop-up.
You might investigate performing an ExternalInterface call and creating your new pop up in JavaScript. Here is an article about creating modal windows in JavaScript. Before going too far down that road, I would think carefully about your requirements. How would feel if one browser window popped open another browser window and prevented you from doing any browsing until you addressed the issues in that window. Or to put it another way, how would you feel if Microsoft Word opened a word document and wouldn't let you edit any other document until you shut down the first one? I'd be pretty upset.
Modal application dialogs are one thing. And the PopUpManager allows you to create those. I would consider Model application windows a bad UI decision.

Asp.net ajax combobox doesn't display correctly when inserted inside a tab control

I have a display problem when I try to use a ajax combobox inside a tab control:
when my tab control loads on the page where the combobox is, everything works fine; however, if it loads on a another page, the you change to the page which contains the combobox, the right button (which opens the list of the combobox) isn't displayed at all.
Has someone been through this behavior? And maybe found a solution ?
Thanks in advance !
Use Firebug in FireFox (this tool is very good if you dont use it) and right-click the area where your drop arrow should be, then select "Inspect Element". At the bottom of your browser screen, you will see a couple windows. One window will detail teh styles being applied to the arrow area.
Look for a style that is making visibility of either a <td> or <img> to be hidden. The Ajax ComboBox control, sadly, is laid out in a table.

Resources