GTK+ Forums Forum Index GTK+ Forums
Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

having problems with scrolbars

 
Post new topic   Reply to topic    GTK+ Forums Forum Index -> General GTK+ Discussion
Author Message
gaurav12345



Joined: 28 Jul 2008
Posts: 3

PostPosted: Mon Jul 28, 2008 12:57 pm    Post subject: having problems with scrolbars Reply with quote

hi,
i am new to this GTK programming . i am getting error

error: invalid type argument of ‘->’

in response to this line in my code

vscrollbar = gtk_vscrollbar_new (GTK_TEXT (text)->vadj);

can anybody help me in this. Thanx in advance.
bye
Back to top
dreblen
Never Seen the Sunlight


Joined: 14 Jun 2007
Posts: 526
Location: Falun, WI USA

PostPosted: Mon Jul 28, 2008 3:27 pm    Post subject: Reply with quote

first off, using GtkText is discouraged (see here http://library.gnome.org/devel/gtk/stable/GtkText.html#GtkText.description ).
now to the problem: as the link above says, you need to #define GTK_ENABLE_BROKEN before #including the gtk headers for GtkText to work
Code: (C)
1
2
3
#define GTK_ENABLE_BROKEN
#include <gtk/gtk.h>
/* continue with the program */

however, using GtkTextView isn't much harder than using GtkText, so I'd recommend looking into that instead,
there's a GtkTextView tutorial here:
http://www.bravegnu.org/gtktext/
Back to top
gaurav12345



Joined: 28 Jul 2008
Posts: 3

PostPosted: Tue Jul 29, 2008 3:32 am    Post subject: Thanx Reply with quote

hi,
thanx buddy, problem is solved using #define GTK_ENABLE_BROKEN
now i am able to run smoothly
thanx
Back to top
Display posts from previous:   
Post new topic   Reply to topic    GTK+ Forums Forum Index -> General GTK+ Discussion All times are GMT
Page 1 of 1

 


Powered by phpBB © 2001, 2005 phpBB Group
CodeBB 1.0 Beta 2
Protected by Anti-Spam ACP