[Mono-winforms-list] menustrip

Stifu stifu at free.fr
Mon Dec 14 02:51:37 EST 2009


For the record, Ubuntu 8.10 ships with Mono 1.9.1, which is old.
Maybe you could update your Ubuntu to 9.10, to get Mono 2.4? Not sure it'll
fix your problem though, but it should fix other problems you're likely to
run into.


andi ari wrote:
> 
> 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?
> 
>  
>  
> _______________________________________________
> Mono-winforms-list maillist  -  Mono-winforms-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-winforms-list
> 
> 

-- 
View this message in context: http://old.nabble.com/menustrip-tp26773884p26774060.html
Sent from the Mono - WinForms mailing list archive at Nabble.com.



More information about the Mono-winforms-list mailing list