[Mono-winforms-list] menustrip

andi ari twentyfirstaray at gmail.com
Mon Dec 14 02:24:17 EST 2009


Hi All,
My name is Andi. Im a newbie
it tried to run some lines of c# code using monodevelp on Ubuntu 8.10. Here
are the codes

using System;
using System.Drawing;
using System.Windows.Forms;

class MForm : Form {

    public MForm() {
        Text = "Submenu";

        MenuStrip ms = new MenuStrip();
        ms.Parent = this;

        ToolStripMenuItem file = new ToolStripMenuItem("&File");
        ToolStripMenuItem exit = new ToolStripMenuItem("&Exit", null,
            new EventHandler(OnExit));

        ToolStripMenuItem import = new ToolStripMenuItem();
        import.Text = "Import";

        file.DropDownItems.Add(import);

        ToolStripMenuItem temp = new ToolStripMenuItem();
        temp.Text = "Import newsfeed list...";
        import.DropDownItems.Add(temp);

        temp = new ToolStripMenuItem();
        temp.Text = "Import bookmarks...";
        import.DropDownItems.Add(temp);

        temp = new ToolStripMenuItem();
        temp.Text = "Import mail...";
        import.DropDownItems.Add(temp);

        file.DropDownItems.Add(exit);

        ms.Items.Add(file);
        MainMenuStrip = ms;
        Size = new Size(380, 200);

        CenterToScreen();
    }

    void OnExit(object sender, EventArgs e) {
       Close();
    }
}

class MApplication {
    public static void Main() {
        Application.Run(new MForm());
    }
}


The result should appear like this:
[image:
?ui=2&view=att&th=1258c0e8656b53f6&attid=0.1&disp=attd&realattid=ii_1258c0e8656b53f6&zw]
but in my machine the result didn't appear as it should be. here is the
result of the code in my machine :
[image:
?ui=2&view=att&th=1258c10c352b0e0c&attid=0.1&disp=attd&realattid=ii_1258c10c352b0e0c&zw]
it seems that there is trouble with the font. how do I solve this problem?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-winforms-list/attachments/20091214/3dd03037/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/png
Size: 4143 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-winforms-list/attachments/20091214/3dd03037/attachment-0002.png 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/png
Size: 7448 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-winforms-list/attachments/20091214/3dd03037/attachment-0003.png 


More information about the Mono-winforms-list mailing list