[Mono-list] First GTK application

Ben Motmans Ben Motmans <ben.motmans@gmail.com>
Sat, 6 Nov 2004 10:57:44 +0100


1) 
Gdk.Pixbuf pixbuf = new Gdk.Pixbuf("location_to_image.png");
Image image = new Image(pixbuf);
toolbar.AppendItem("Text", "Tooltip", "Private Tooltip", image, new
SignalFunc(OnClick));

you can use all image formats supported by Gdk.Pixbuf (jpg, png, gif,
bmp, ...) and svg if you use Rsvg.Pixbuf

2)
toolbar.AppendItem(...)
toolbar.Prependtem(...)
toolbar.InsertItem(...)

3) no idea

4) 
Statusbar is a subclass of HBox, so you can use
statusbar.PackStart(...) and .PackEnd(...) to add widgets

5) have a look at the new System.Windows.Forms, all the controls are
painted using Cairo
but what's wrong with the Gtk Notebook?

PS) have a look at 
http://www.tremor.be/GtkDemoApp-20041001.zip

it is a (unfinished) Gtk# demo application, but there are allready a
lot of working demo's

screenshots:
http://www.tremor.be/GtkDemoApp_1.png
http://www.tremor.be/GtkDemoApp_2.png

On Fri, 5 Nov 2004 23:17:56 -0700, Kevin White <jedirunner@gmail.com> wrote:
> Hi all,
> 
> I'm trying to write my first GTK# application, and I want to really
> understand Gtk# as I do java.  I like to write all the GUI code by
> hand rather than using the interface designer to build it for me.
> 
> So, I have a window, menu bar, and am starting to get used to the
> other widgets.  I'm using monodoc to help me along here, but it has,
> well, very little info in some areas.  I'll submit monodoc text for
> what I find out if someone can show me simple sample code that can
> guide me in the code starting with the following:
> 
> 1- Can someone show me some sample code of adding custom (non-stock)
> toolbar buttons with an icon?  What format is the icon?  Where does it
> need to exist?
> 2- I notice in monodoc that there is only an "insert" method to deal
> with stock toolbar buttons, and not an append or prepend.  Why is
> this?
> 3- What is "private tooltip" use for in toolbar widgets?  How is it
> different from the tooltip parameter?
> 4- I notice that the statusbar widget only allows simple text.  Is
> there an equivalent of complex status bars with multiple panels?  Or
> do I need to create a custom widget for that?
> 5- I need to make some "pretty" tab controls.  Is there documentation
> somewhere on making user controls from the ground up?  i.e.: the
> equivalent of a usercontrol in winforms where the usercontrol does its
> own custom painting?
> 
> If you've been noticing (or bothered by ;-)  ) my trivial questions in
> getting mono setup and running, you'll notice that I'm on to actually
> using it now.  And I intend to take this program that was being
> designed and written for winforms and make in mono/gtk# instead of
> winforms.  It will just take some time as I convert my thinking to the
> mono and gtk# way of doing things, so I thank you for your patience.
> 
> Thanks,
> 
> Kevin
> --
> Kevin White
> jedirunner@gmail.com
> _______________________________________________
> Mono-list maillist  -  Mono-list@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
>