[Mono-dev] Problem to run mon Gtk# and sqlite application on Windows platform

Torello Querci tquerci at gmail.com
Sun Feb 11 17:41:32 EST 2007


Hi to all ... I realize an application using mono, C#, Gtk# and
sqlite. I have several problem to run the application on Windows
environment.

The first problem is related to MessageDialog modal window. Infact
when I try to build a MessageDialog this appared on the screen, but if
I try to click on the parent window, the message dialog go down the
main window but the main window seems to be unable to receive the
mouse event (infact the dialog is modal). In Linux environment the
code work fine.

Is this the right place to post? I must go to bugzilla?

I insert a test code to reproduce this behaviour.

Thank's

P.S. Sorry for my awful english
----------------------------------------------
using System;
using Gtk;

namespace testGtk
{
  class MainClass
  {
     private Window myWindow;
     public MainClass() {
          Application.Init ();
          myWindow = new Window ("This is a window");
          myWindow.DeleteEvent += OnDelete;
          myWindow.SetDefaultSize (200, 200);

          //Put a button in the Window
          Button button = new Button ("Click");
          button.Clicked += new EventHandler(OnButton1Clicked);
          myWindow.Add (button);
          myWindow.ShowAll ();
          Application.Run ();
     }

     static void Main ()
     {
	 new MainClass();
     }

     void OnDelete (object o, DeleteEventArgs e)
     {
          Application.Quit ();
     }

	void OnButton1Clicked(object sender, System.EventArgs e)
	{
		MessageDialog md = new MessageDialog (myWindow,
                                      DialogFlags.Modal,
                     	              MessageType.Error,
                                      ButtonsType.Close, "Modal Message");
     		md.Modal=true;
		md.TransientFor=myWindow;
		md.Run ();
		md.Destroy();
    }

  }
}



More information about the Mono-devel-list mailing list