Re: Beginner questions...
- From: John Cupitt ng-london org uk
- To: rtriay avantel net
- Cc: gtk-list gnome org
- Subject: Re: Beginner questions...
- Date: Fri, 1 Mar 2002 13:01:05 -0000
Ramon Alberto Triay Espinosa wrote:
> 1.How can I stablish the tabulation order (tabindex property in Visual
> Basic) of my widgets? Do I need to assign the focus manually?
Hi Ramon,
gtk+-1.2.x does this for you automatically. If you don't like the order
it gives you, you can sort-of futz it by catching keyboard signals and
warping the focus yourself. But it's not pretty and it's rather unreliable.
There are good reasons why you should not set the traversal order
yourself. What if the user is running your application in a
right-to-left locale? They will want a different traversal order. It's
almost always better to leave it to gtk to sort out for you.
gtk+-2.x has a much fancier system that I don't understand :-)
> 2.What's this win_main object that sometimes i see in some example apps?
This is for builds on win32.
> 3.How can I stablish the z-order of the widgets contained in the same
> window?
gtk does not support overlapping widgets, so there's no proper support
for z-ordering.
You can fudge it for some widgets. My app has stackable objects ... I do
this by wrapping my objects in an event box, and putting the event boxes
into a gtk_layout. You can then pop-to-front by reffing the event box,
removing it from the layout, adding it again, and unreffing it.
I expect this to break horribly if I ever build on win32 :-(
> 4.Is there any way to implement MDI?
I think gnome has an MDI widget you can use, but I've not tried it.
Most useability people dislike MDI and urge multiple top-level windows
instead. I think even MS is moving this way now.
> 5.How can I implement the ALT+<key> accelerator keys (and underscore the
> character i want to use)
Use gtk_accel_*() to bind keys to actions. Item factory will do a lot of
this for you, and testgtk.c has lots of sample code. I think gtk+-2.0
has an easier system, but I've not tried it.
John
==========================================================
Aelbert Cuyp 13 February - 12 May 2002
For information and tickets:
http://www.nationalgallery.org.uk/exhibitions/cuyp/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]