GTK+ Forums

Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
It is currently Sat Nov 22, 2014 11:56 pm

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: GTK TextView prevent key press from modifying textbuffer
PostPosted: Mon Oct 24, 2011 2:35 pm 
Offline

Joined: Mon Oct 17, 2011 11:39 pm
Posts: 4
Is it possible to prevent the text being added after a key is pressed?

I'm not sure how that would work (I'm working with PyGTK, but any other language should be fine.), if possible.

Thanks.


Top
 Profile  
 
 Post subject: Re: GTK TextView prevent key press from modifying textbuffer
PostPosted: Mon Oct 24, 2011 5:58 pm 
Offline
Never Seen the Sunlight

Joined: Mon Apr 28, 2008 5:52 am
Posts: 777
Location: UK
Hi,

Not really sure what you are after, but are you trying to prevent the text being edited. If so then this function may be what you need.
Code:
void                gtk_text_view_set_editable          (GtkTextView *text_view,
                                                         gboolean setting);

And in Python:-
http://developer.gnome.org/pygtk/stable/class-gtktextview.html#method-gtktextview--set-editable

E.

_________________
E.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 3 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