3

I may need to build a GTK GUI using C# and Mono. If I understand correctly, that means I have 3 choices:

  • Write the C# code to call the GTK# wrapper classes. GUI is "in the code".

  • Use MonoDevelop GUI designer. This builds an interface using the stetic markup. I appears to just be XML.

  • Use Glade and libglade to create the GUI and load it at runtime.

I have a little experience with MonoDevelop's GUI editor. It's nice, but has a few rough edges. I can imagine needing to hand edit the stetic markup at some point.

I've also used Glade in the past with Python...

Both of these projects were experimental in nature only, so I'd really like to hear from someone that has fought this battle before. What are the advantages and disadvantages of each?

Finally, it would be nice if development for this project could take place on Windows, Linux, and Mac OS X.

Nate
  • 5,237
  • 7
  • 42
  • 52

1 Answers1

1

During the old days, the MonoDevelop GTK designer was awful. Today, it is a very solid (not completely but very solid) solution for building rich GUIs. It is the best option for all platforms. Constructing a GUI through code can become quite painful. Using Glade on the other hand is a joy but you have some drawbacks. These drawbacks concern some limited options on your controls at runtime like setting Opacity on windows etc, because you need to load the XML Glade files with the Glade namespace. Of course, there is always the option of importing the Glade files in your project but it never worked for me.

Dimitris Tavlikos
  • 8,170
  • 1
  • 27
  • 31
  • I'm going to be giving MonoDevelop another go. I've got it on my Mac, Windows, and Linux installs. On Mac OS X I've noticed it has quite a few issues. I'm hoping that isn't indicative of GTK+ on OS X in general... – Nate Jan 22 '11 at 04:05
  • Just make sure you have the latest version. – Dimitris Tavlikos Jan 22 '11 at 10:09
  • You don't have to load the Glade files with libglade (i.e. Glade namespace) anymore. The functionality is built into GTK (as `Gtk.Builder`). – ptomato Jan 22 '11 at 14:29
  • @ptomato. Thanks for the Gtk.Builder tip. I wasn't aware of that. – Nate Jan 24 '11 at 17:42