GtkLabel and win32
- From: <misterdebrrr sympatico ca>
- To: <gtk-app-devel-list gnome org>
- Subject: GtkLabel and win32
- Date: Thu, 13 Oct 2005 16:19:35 -0400
Below is a some code that produces a GTK Window, adds a GTK Label to it
and shows both. The problem I'm having is that IF I move a window on part of the Label, often, the text won't
get redrawn when I move the window off it. This means I often get a Label that shows 'B' and nothing else.
For some odd reason, the B always gets drawn no matter what. Can anyone help me ?
(code is below)
#include <gtk/gtk.h>
static void before_main_destroy(GtkWidget *widget, gpointer data);
int main(int argc, char *argv[])
{
GtkWidget *window;
GtkWidget *label;
gtk_init (&argc, &argv);
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_window_set_title (GTK_WINDOW (window), "This is a window !");
gtk_window_set_resizable (GTK_WINDOW (window), FALSE);
g_signal_connect (G_OBJECT (window), "destroy", G_CALLBACK
(before_main_destroy), NULL);
label = gtk_label_new ("Brrr");
gtk_container_add (GTK_CONTAINER (window), label);
gtk_widget_show (label);
gtk_widget_show(window);
gdk_window_set_decorations (GDK_WINDOW(window->window), GDK_DECOR_TITLE
| GDK_DECOR_MENU);
gtk_main ();
return 0;
}
static void before_main_destroy(GtkWidget *widget, gpointer data)
{
gtk_main_quit ();
}
#include <gtk/gtk.h>
static void before_main_destroy(GtkWidget *widget, gpointer data);
int main(int argc, char *argv[])
{
GtkWidget *window;
GtkWidget *label;
gtk_init (&argc, &argv);
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_window_set_title (GTK_WINDOW (window), "This is a window !");
gtk_window_set_resizable (GTK_WINDOW (window), FALSE);
g_signal_connect (G_OBJECT (window), "destroy", G_CALLBACK
(before_main_destroy), NULL);
label = gtk_label_new ("Brrr");
gtk_container_add (GTK_CONTAINER (window), label);
gtk_widget_show (label);
gtk_widget_show(window);
gdk_window_set_decorations (GDK_WINDOW(window->window), GDK_DECOR_TITLE
| GDK_DECOR_MENU);
gtk_main ();
return 0;
}
static void before_main_destroy(GtkWidget *widget, gpointer data)
{
gtk_main_quit ();
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]