views:

9

answers:

1

In WM6.5 a have a simple form with a webbrowser control. I open a local file and fill this page data to the document.text

1. On some phones you see the page but no scrollbar?

2. On my phone and in the simulators I have a scrollbar. If you put your finger on the screen and move vertically you only highlight the text. What I would like is the page to scroll down/up with this touch.

Is there a trick for this? Below is my init and the filling of the html.

public partial class FormLicense : Form
{
    bool _CanClose = false;

    private const string _html =
                "<html><body><br><div style='top:20px;left:50px;border:solid 1px red'><a href='http://www.cnn.com'&gt;CNN&lt;/a&gt;&lt;/div&gt;&lt;br&gt;&lt;font size='14'>xx</font><a href='http://stackoverflow.com'&gt;stackoverflow&lt;/a&gt;&lt;/body&gt;&lt;/html&gt;"; 

    public FormLicense()
    {
        InitializeComponent();

        this.Load += new System.EventHandler(this.FormLicense_Load);
        this.Closed += new System.EventHandler(this.FormLicense_Closed);
        this.Closing += new System.ComponentModel.CancelEventHandler(this.FormLicense_Closing);

        this.SuspendLayout();

        this.menu1L.Text = "I Accept";
        this.menu1R.Text = "Don't Accept";
        this.Text = "License";
        using (StreamReader sr = new StreamReader(GlobalLicense.FileName, System.Text.Encoding.Default))
        {
            webBrowser1.DocumentText = sr.ReadToEnd();
        }

..... .... ... ..

private void InitializeComponent()
    {
        this.mainMenu1 = new System.Windows.Forms.MainMenu();
        this.menu1L = new System.Windows.Forms.MenuItem();
        this.menu1R = new System.Windows.Forms.MenuItem();
        this.webBrowser1 = new System.Windows.Forms.WebBrowser();
        this.SuspendLayout();
        // 
        // mainMenu1
        // 
        this.mainMenu1.MenuItems.Add(this.menu1L);
        this.mainMenu1.MenuItems.Add(this.menu1R);
        // 
        // menu1L
        // 
        this.menu1L.Text = "1L";
        this.menu1L.Click += new System.EventHandler(this.menu1L_Click);
        // 
        // menu1R
        // 
        this.menu1R.Text = "1R";
        this.menu1R.Click += new System.EventHandler(this.menu1R_Click);
        // 
        // webBrowser1
        // 
        this.webBrowser1.Dock = System.Windows.Forms.DockStyle.Fill;
        this.webBrowser1.Location = new System.Drawing.Point(0, 0);
        this.webBrowser1.Name = "webBrowser1";
        this.webBrowser1.ScriptErrorsSuppressed = true;
        this.webBrowser1.Size = new System.Drawing.Size(240, 268);
        // 
        // FormLicense
        // 
        this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
        this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
        this.AutoScroll = true;
        this.AutoScrollMargin = new System.Drawing.Size(10, 10);
        this.ClientSize = new System.Drawing.Size(240, 268);
        this.Controls.Add(this.webBrowser1);
        this.Menu = this.mainMenu1;
        this.Name = "FormLicense";
        this.Text = "FormLicense";
        this.ResumeLayout(false);