[Gtk-sharp-list] writing custom widgets with Gtk#

Mike Kestner mkestner@speakeasy.net
11 Dec 2002 00:11:17 -0600

On Tue, 2002-12-10 at 04:36, Lee Mallabone wrote:

> I'm using Gtk# to write an application that will be run with mouse input
> coming from a touchscreen, so I really need to make a ScrolledWindow
> widget that has nice big buttons for large fingers.

Hmmm, it might be worth seeing if the scrollbar button size is
themeable.  That would be a lot easier than writing a custom widget.

> My first thoughts were just to override some protected method in the
> ScrolledWindow class to change the size/layout of the scrollbar buttons.
> However, after examining the generated Gtk.ScrolledWindow source, it
> doesn't look like this is/will be possible.

This would require overriding a GtkWidget class method, and that is not
possible yet.  I don't think anyone's come up with a good idea of how to
do it yet, but it's definitely something we want to do

> If not, will I need to go and read up on writing Gtk widgets in C, in
> order to make a custom widgest for my Gtk# app?

This is, of course an option.  A custom widget could be wrapped using
the Gtk# code generator/parser.  However, in the long run, the goal is
to be able to do Widget Subclassing directly with Gtk#.

Mike Kestner <mkestner@speakeasy.net>