Places to look for help (Re: packing/unpacking of boxes AND colors -> segment violation)



The documentation is unfortunately much more 'under construction' then the
toolkit.

There are probably three or four places that should help you the most.

(1) Look at the GTK Reference Manual, at
http://www.gtk.org/rdp/gtk/book1.html for help with GTK stuff. A good way to
tell if a particular widget set has had its documentation finished in the
manual is to see if there is a comment after the entry on the above page.
The ones with no comment tend to just have the prototypes for the functions,
without telling you what each piece is for. But there are only a few people
working on the manual so I guess we should be grateful for whatever we do
have. =). There are also links to glib and gdk manuals. They are all set up
the same way.

(2) Try running the testgtk program and find the part in the running program
that applies to you (clist, fileselection, etc.) and then go look for it in
the testgtk.c file. Doing a find on the widget (EX. "GtkCList") is the best
way to locate the section of the code. Most of the time the code will show
you how the widget is used and what you can do with it.

(3) This mailing list is a great place to get help. Quite often it isn't
necessary to post your own message, because often it's been posted by
someone else. I believe the list is also archived somewhere on the gtk
homepage (http://www.gtk.org/).

(4) Try looking in the tutorial and / or books. But I've noticed that a lot
of the time these resources address general or simple problems/issues, not
always the exact problem that YOU need to deal with. =(

I hope this helps.

Miranda

/------------------------------------------------------------------------\
| Miranda Hawarden-Ogata             Email: hawarden@irtf.ifa.hawaii.edu |
| NASA IRTF, Institute of Astronomy  Phone: (808) 974-4206               |
| 1175 Manono St., Bldg 393            Fax: (808) 974-4207               |
| Hilo, HI 96720                                                         |
\------------------------------------------------------------------------/

-----Original Message-----
From: Robert G. Brown <rgb@phy.duke.edu>
To: gtk-list@redhat.com <gtk-list@redhat.com>
Date: Thursday, September 30, 1999 5:54 PM
Subject: [gtk-list] Re: packing/unpacking of boxes AND colors -> segment
violation


>On Thu, 30 Sep 1999, Federico Mena Quintero wrote:
>
>> >  HOWEVER, the vbox that contained the widget doesn't seem to resize
back
>> >  to its size before the widget was added.  It "remembers" the 100x100
and
>> >  displays an ugly, empty, widgetless, 100x100 box.  In Tk I would have
>> >  called the packForget() method to unpack/hide the widget quite
>> >  independent of whether or not I wanted to actually destroy it (in
>> >  general I probably don't) but gtk_widget_hide doesn't seem to do
>> >  anything at all.
>>
>> Use gtk_window_set_policy() and use TRUE for the auto_shrink argument.
>>
>>   Federico
>
>That did it, thanks!  Amazingly, in spite of having not one but two New
>Riders books on GTK programming, plus the GTK v1.2 tutorial from the
>website, plus the assorted documents in the distribution, I couldn't
>find a single place that the gtk_window_set_policy() function was
>documented!  I was wondering what it was for, as they used it in several
>examples.  With your hint I had a clue where to look in info to figure
>out which one the auto_shrink argument WAS:-).
>
>I'll also take the second comment about how to show an object so it's
>hideable to heart and see if I can it work out as well.
>
>Just for the record, are there any other/newer/better resources for
>learning GTK than what I've found so far?  I'm not too happy with the
>books and other documentation as this is just one of many things that
>are left unexplained.  gtk info looks complete enough, but as usual
>resources like this are useful only when you already have a pretty good
>idea where to look...
>
>   rgb
>
>Robert G. Brown                        http://www.phy.duke.edu/~rgb/
>Duke University Dept. of Physics, Box 90305
>Durham, N.C. 27708-0305
>Phone: 1-919-660-2567  Fax: 919-660-2525     email:rgb@phy.duke.edu
>
>
>
>--
>To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com < /dev/null
>
>



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