how to hide scrollbar in gecko webbrowser control in c# - c#-3.0

i am trying to hide scrollbar of GeckoFx WebBrowser control,in Windows forms there is method to hide scrollbar
webBrowser1.ScrollBarsEnabled = false;
but in GeckoFx Webbrowser there is no property like that
i am using Navigate Method
geckowebbrowser.Navigate("Url");

This works. You can create your own ScrollBarsEnabled property if you want.
webBrowser1.Document.Body.Style.CssText = "overflow: hidden ! important;";

Related

jxBrowser not resetting focus

I am running into a focus issue for the jxBrowser. I integrated the jxBrowser into eclipse as a view and editor, using JavaFX FXCanvas as a container of the jxBrowser. When switching between views within Eclipse, the browser no longer receive focus. It is not possible to use the keyboard, and it is not possible to scroll around the view. Any one know any workaround?
Here is an example of the code:
container = new javafx.embed.swt.FXCanvas(parent, SWT.NONE);
container.setLayout(gridLayout);
container.setLayoutData(gridData);
browser = new Browser();
browserView = new BrowserView(browser);
container.setScene(new javafx.scene.Scene(browserView));
Thanks!

How to create Android app WITHOUTH action bar?

I can not create an android app with an SDK < 14 (4.0) because all of the templates (including the so-called "Blank") include the "Action Bar", which is a 14+ feature.
How do I create an app WITHOUT an action bar? Does somebody have an old template for Blank without an Action Bar?
You can instantiate the Action Bar object and using the method hide() you will be able to hide it.
final ActionBar bar = getActionBar();
And from the documentation:
Instead of calling this function directly, you can also cause an
ActionBar using the overlay feature to hide through
View.SYSTEM_UI_FLAG_FULLSCREEN. Hiding the ActionBar through this
system UI flag allows you to more seamlessly hide it in conjunction
with other screen decorations
Hope it helps

How to detect if a hyperlink has been clicked in a WebView in Metro?

Is there anyway i can get the hyperlink click in webview to my c# with Hyperlink value in Metro?. I am using WebView..NavigateToString() to generate the content?.
You can call InvokeScript with some of your own Javascript to set up a listener for when the user navigates away from your page. This would look something like the following in C#:
var navigationListenerString = #"
(function() {
function leavingPage() {
window.external.notify("LEAVING PAGE");
}
window.onbeforeunload = leavingPage;
})()";
webView.InvokeScript("eval", new string[] { navigationListenerString });
Then you can use ScriptNotify to listen for your particular message to determine that the page is unloading and the user is leaving. Unfortunately you cannot detect where a user is going. Also, if the hyperlink opens in a new window and the webview does not unload, you cannot detect that either.
Since WebView in windows 8 doesn't support Navigating() events like the Silverlight WebBrowser control, thus it is not possible to get hyperlink or cancel navigation.
But since you're using NavigateToString() method, you can write some manual javascript code and achieve same with the help of WebView.ScriptNotify() event.

Fancybox Modal control location

I'm using Fancybox afterShow to display image descriptions on the side via overlay like so:
afterShow : function (){
var description = "<div class='hidden_tab'>"+$("#tab").html()+"</div>"
$('#fancybox-overlay').html(description);
}
The problem is that I need modal to be false so users can click out. But the hidden_tab tabs, when clicked, also exit fancybox.
Is there a way to section where modal takes affect? Or a workaround? I have tried setting z-index for the hidden_tab to be high but this did not do the trick.
If you need to set modal : false then try adding closeClick : false (which prevents closing when clicking INSIDE fancybox)
BTW, the default value of modal is false. Don't assume that people will necessarily understand why modal was set to true in your script.

AutoCompleteExtender positioning menu incorrectly when scrolled

We have an AutoCompleteExtender linked to a TextBox. Both controls are placed inside an UpdatePanel, and the UpdatePanel is displayed as a pop-up dialog using a Javascript library (Ext.BasicDialog).
The pop-up is a div on the page, not a separate window.
The problem is that when the user scrolls inside the pop-up, the AutoCompleteExtender shows its menu in the wrong place. It looks like it is taking the visible distance from the top of the popup and positioning the menu from the top of the inner html of the popup (which is not visible)
We are using Version 1.0.20229.20821 of the AjaxControlToolkit, and we are targetting ASP.NET Framework vewrsion 2.0.
I have tried to fix the menu by attaching the following Javascript to the OnClientShown event, but it pretty much does the same thing:
function resetPosition(object, args) {
var tb = object._element; // tb is the associated textbox.
var offset = $('#' + tb.id).offset();
var ex = object._completionListElement;
if (ex) {
$('#' + ex.id).offset(offset);
}
}
I fixed this by setting position:relative on a div containing the TextBox and the auto-complete extender. The extender must have been using the wrong element to position on when inside the popup panel.
Add an empty <div id="AutoCompleteContainer"></div> element right after the AutoCompleteExtender. In AutoCompleteExtender, add an attribute pointing to this container, CompletionListElementID="AutoCompleteContainer". The list items should be contained in that div then.
I know this is an old post, but thought this information may help someone else. There is a newer version 15.x of the Ajaxtoolkit now (April 2015) and it fixes this issue. From my reading the CompletionListElementID property was deprecated some time ago, and at the least seems to behave differently in different versions. I upgraded my references to the 15.x version and it just started working as needed.