GTK+ Forums

Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
It is currently Wed Aug 24, 2016 4:12 pm

All times are UTC

Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Label control looses Transparency inside scrolled/viewport.
PostPosted: Fri Nov 04, 2011 1:34 am 
Familiar Face

Joined: Wed Aug 10, 2011 3:55 pm
Posts: 6

I have simple dialog which gets the Question and Answer from the user.
The dialog has a background bitmap, that covers the entire dialog.
Since the number of questions can vary, I needed a scroll bar.
Since the each question and answer is a text entry(edit box)
I had to create a scrolledwindow control, put a viewport control under it and
dumped all of my Q/A controls in there. Here is how the dialog looks.
I am NOT using cairo library. I am using GTK+2.4 and stock GTK objects.

|------- Dialog ------------------------------------------
||--------- scrolledwindow------------------
|||--------- viewport---------------------
||| Label : Text entry
||| Question: Whats your name?
||| Answer :
||| Question: Whats you age?
||| Answer :
|||--------- viewport --------------------
||----------- scolledwindow----------------
|------- Dialog ------------------------------------------

If the Labels and the Text Entrys are OUTSIDE the scrolled window( but within dialog)
their background IS transparent. It takes the dialog bg color (bitmap color here). good.

If the Labels and the Text Entrys are INSIDE the scrolled window as shown above
their backgrounds are NOT transparent. It takes the system window color and its looks ugly.
Its like RED color filled rectangle around the Label and Text Entry.

how it looks: "Question" text below has a RED(or some other color) filled box around it.
| Question

My bitmap is ash color; The Label/Entry background is not ash. Its not transparent.

How do I make the Text Entry/Edit Box transparent in this case?

Is there a way to set the scrolledwindow and viewport
to be transparent? These control(s) are the ones taking away the transparency of the
controls that are inside them. I tried some simple methods for transparency. It didn't work.
(gdk_window_set_opacity(gtk_widget_get_window(pWdgScrolled_window), 0))

Any help is greatly appreciated!

Thank you

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC

Who is online

Users browsing this forum: Google [Bot] and 4 guests

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group