Web浏览器不显示滚动条,我可以添加触摸吗?

时间:2010-06-23 09:53:32

标签: c# windows-mobile browser

在WM6.5中,a有一个带有webbrowser控件的简单表单。我打开一个本地文件并将此页面数据填充到document.text

1。 在某些手机上你看到的是页面而没有滚动条?

2。 在我的手机和模拟器中,我有一个滚动条。如果您将手指放在屏幕上并垂直移动,则只能突出显示文本。我想要的是通过这种方式向下/向上滚动的页面。

这有诀窍吗?下面是我的初始化和填写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'>CNN</a></div><br><font size='14'>xx</font><a href='http://stackoverflow.com'>stackoverflow</a></body></html>"; 

    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);