LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 11-24-2008, 09:09 PM   #1
aarontwc
Member
 
Registered: Oct 2008
Posts: 66

Rep: Reputation: 15
Showing a widget above a widget in GTK


I am currently modifying the gtkVNC Widget and I am trying to overlay a button above the gtkVNC Widget when my mouse is on top i.e. y < 10.

I am having trouble overlaying a gtkButton above a gtkVNC widget. In fact, I have problems overlaying a widget above a widget.

Any idea if this can be done? How do i put a widget above a widget? I am trying to but a button widget above a gtkVNC container widget.

Thanks
aaron
 
Old 11-24-2008, 10:04 PM   #2
maradnus
Member
 
Registered: Oct 2008
Location: Yellagiri Hills
Distribution: Fedora
Posts: 87

Rep: Reputation: 15
Just a tip:

Try to give parent-child relationship to the widgets.


Thanks
 
Old 11-24-2008, 10:22 PM   #3
aarontwc
Member
 
Registered: Oct 2008
Posts: 66

Original Poster
Rep: Reputation: 15
Hi there,

First off, thank so much for replying!

I tried setting a parent child raltionship. I understand it is very simply:
gtk_container_add(MYCONTAINER, MYBUTTON);

But that didn't solve it. The button is still on top of the container and not overlayed on the container.

In HTML, div has something like this call Z-INDEX, but is there something like this in GTK?

This is how it looks like currently:
----------------------------
| button here |
----------------------------
| |
| |
| |
----------------------------

But I need it like this:

----------------------------
| |
| button here |
| |
| |
| |
----------------------------

Any ideas? Thank you!
 
Old 11-24-2008, 11:20 PM   #4
swift2008
Member
 
Registered: Jul 2008
Posts: 78

Rep: Reputation: 15
Quote:
Originally Posted by aarontwc View Post
Hi there,

First off, thank so much for replying!

I tried setting a parent child raltionship. I understand it is very simply:
gtk_container_add(MYCONTAINER, MYBUTTON);

But that didn't solve it. The button is still on top of the container and not overlayed on the container.

In HTML, div has something like this call Z-INDEX, but is there something like this in GTK?

This is how it looks like currently:
----------------------------
| button here |
----------------------------
| |
| |
| |
----------------------------

But I need it like this:

----------------------------
| |
| button here |
| |
| |
| |
----------------------------

Any ideas? Thank you!
you may get the solution from here.
http://www.gtkforums.com/
http://www.gtk.org/tutorial1.2/gtk_tut-2.html#ss2.1
 
Old 11-26-2008, 11:40 AM   #5
dmease
LQ Newbie
 
Registered: Nov 2008
Posts: 1

Rep: Reputation: 0
I have been able to do similar things by packing two widgets into the same cell of a table widget. Experiment in glade until you get it how you want it.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
GTK widget which to use? cranium2004 Programming 1 02-20-2006 01:29 PM
Gtk widget problem iali Linux - General 0 01-21-2006 12:56 AM
Getting a widget GTK programming goelvish Programming 5 08-31-2004 05:30 AM
Which GTK Widget to use? jpbarto Programming 0 11-20-2003 07:34 PM
what is a gtk-widget ? gladeiator Programming 3 10-30-2003 05:34 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 04:27 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration