Re: Needing a sample code based on following API's (regarding pixmaps)
- From: Warrior <ymg azstarnet com>
- To: gtk-app-devel-list gnome org
- Subject: Re: Needing a sample code based on following API's (regarding pixmaps)
- Date: Sun, 17 Jun 2001 21:02:18 -0700
On Sunday 17 June 2001 08:12 pm Ivica Bukvic shared with us the following
piece of wisdom:
I need to create a pixmap-drawn stop watch, so that each pixmap reflects
one digit (i.e. 00:00). Thus I need to create a pixmap widget that will be
changeable after the program has started running.
I am trying to use the following code:
in main()
GtkWidget *pixmap1; //let's say this sample program has only one digit to
worry about
GtkWidget *window1; //main window
GdkPixmap *pixmapdata; //data to be converted to pixmap widget
...
Here add:
gtk_widget_realize(window1);
pixmapdata = gdk_pixmap_create_from_xpm (???, NULL, NULL, "test/zero.xpm");
The above line should be:
pixmapdata = gdk_pixmap_create_from_xpm (window1->window, NULL, NULL,
"test/zero.xpm");
pixmap1 = gtk_pixmap_new (pixmapdata, NULL);
gtk_widget_show(pixmap1);
...
Hope this helps.
--
Bye, Warrior.
ICQ #24496762
-------------
Tagline for Sunday, June 17, 2001, 20:05
--- Lottery: A tax on people who are bad at math.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]