HowTo: Develop with GTKSharp: Difference between revisions
Jump to navigation
Jump to search
m (1 revision) |
(No difference)
|
Latest revision as of 20:55, 30 Mayıs 2009
API reference
- see available widgets: http://www.go-mono.com/docs/index.aspx?tlink=root:/classlib-gnome, go to gnome libraries, gtk
data grid
- in GTK: To create a tree or list in GTK#, you need to use the Gtk.TreeModel interface, in conjunction with the Gtk.TreeView widget.
- see http://lists.ximian.com/pipermail/mono-list/2006-October/033191.html and http://anonsvn.mono-project.com/viewvc/trunk/mcs/tools/sqlsharp/gui/gtk-sharp/DataGrid.cs?revision=37300&view=markup
toolbar
- http://www.opennet.ru/docs/RUS/gtk_perl/toolbar.html and http://www.go-mono.com/docs/monodoc.ashx?tlink=3@ecma%3a1383%23Toolbar%2f*
dialog
- http://library.gnome.org/devel/gtk/stable/GtkDialog.html
- http://www.go-mono.com/docs/monodoc.ashx?link=T%3aGtk.Dialog
- check for Gtk.ResponseType.Ok, because Cancel or None can happen when the dialog is just closed
- in the login dialog case: check for ResponseType.Accect
- default button: somehow DefaultResponse does not work as expected
- use keypressevent; but careful: need GLib.ConnectBefore () to handle all key events [1]
label
- alignment:
label.SetAlignment(0.5,0); // centered label.SetAlignment(0,0); // left align label.SetAlignment(1,0); // right align
table
align labels: see http://ubuntuforums.org/showthread.php?t=545949
table.Attach: can span across columns, and rows; use AttachOptions.Fill for align to work for each label: SetAlignment, see above