Laas_tut
 

1.Introduction


Quotes A typical tutorial about Gtk[#] and its widgets should start like this:

"GTK (GIMP Toolkit) is a library for creating graphical user interfaces. It is licensed using the LGPL license..."

and so on.
But this is not such kind of tutorial.

This would be a repository of explained "how to's" that can help new Gtk# developers (and also experienced developers with less than 1Mb of memory in their brains) to accomplish their works.
The tutorial is structured with a lesson for each widget (in a few case two simple widget share the same lesson). The lesson's name is the widget's name and inside each lesson I will report every useful property, method and event (and in many case also the constructor) to use it in your application.

The lessons will be periodically upadted in order to cover all the features of each widget.
The readers of this tutorial should know the meaning of:

  1. Mono
  2. MonoDevelop
  3. Glade
  4. C#
  5. Gtk
In many cases the fastest way to demonstrate the use of a widget is to create a sample application that use it; with basic widget such as labels and entries the use of MonoDevelop and Glade will be not necessary, in other situation MonoDevelop will be useful to speed up the development process.

Come on, let's use MonoDevelop

With MonoDevelop is really simple to create a Gtk# or Glade# application. All you need is to make a "New Solution" choosing from the available templates:

Useg_img1

To use the code of this tutorial you can simply create Gtk# Project; in this way it's possible to compile and run an application inside the MonoDevelop environment, making debugging and code analysis simpler than from the command line.
MonoDevelop will do all the things necessary to bind the correct library at compile time, so you can focus on code and not on compiler's options.

IMPORTANT: In the sample code that you will find in the next lessons I have omitted the "obvious" code such as application initialization, main function, main window creation, and so on. The source code will be focused on widget.
To create a base gtk# application make reference to the lesson number seven of my previous tutorial "TreeView for kids" (just delete all the TreeView code to make a "clean" window) or simply donwload the following base file.

That's good !!!