Re: locking widgit sizes



On Mon, Apr 6, 2009 at 12:23 AM, mick <mickhowe bigpond net au> wrote:
I'm using glade 2.12 to build an interface for a GTK based chat client and
having trouble locking the size of buttons, text entry, etc. widgits.

I've tried setting the height of the container, the height of the text entry &
the height & width of the buttons but when I test the generated code the size
of the widgets changes with the size of the 'parent window'.

I read the tutorials and the references until my mind glazes over but I can't
recognise the solution if its there.

can anyone point me to a reference (manual section, web page, forum post) that
could get me on track

Hi,
    Please consider dropping generated code, one of the main reasons
we dropped generating code was because people would reuse the
generated code and it became example code, the other main reason
is because our code becomes more managable this way - we dont
have to recompile and deal with version conflicts on source files
when interfaces change for instance.

This code, along with your actual signal callback glue; is pretty much
all you will ever need to load your GUI:
================================
static void
load_ui (const gchar *filename, const gchar *window_name)
{
  GtkBuilder *builder;
  GError *error = NULL;
  GtkWidget *window;

  builder = gtk_builder_new ();

  if (!gtk_builder_add_from_file (builder, filename, &error))
    {
      g_error ("%s", error->message);
      g_error_free (error);
      return;
    }

  window = (GtkWidget *)gtk_builder_get_object (builder, window_name);
  gtk_window_present (GTK_WINDOW (window));

  gtk_main ();

  g_object_unref (builder);
}
================================

Now check out 3.6 and enjoy Actions and Treeviews and more :)

Cheers,
              -Tristan



thanks in advance,
mick
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]