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 Dec 20, 2014 12:54 am

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: [Solved] gtkNotebook automatic scrolling on content editing
PostPosted: Fri Sep 23, 2011 5:49 am 
Offline
Familiar Face

Joined: Fri Jul 01, 2011 6:40 pm
Posts: 48
Location: Croatia
Hello,
In my GUI for first time I use notebook with 4 tabs.
In every tab I have scrolledwindow, aspectframe and then table with controls.
When I press enter or down key focus moves to down, lower control.
But view stays as is and then focus goes to area which is not visible.
In some toolkits we have "ensure visible" property which ensures that control with focus is always in visible area.
Did gtk have something like this in described situation?


Last edited by nime on Wed Sep 28, 2011 7:56 am, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: gtkNotebook automatic scrolling on content editing
PostPosted: Sat Sep 24, 2011 8:11 am 
Offline
Familiar Face

Joined: Fri Jul 01, 2011 6:40 pm
Posts: 48
Location: Croatia
I find handy solution.
I added adjustment to scrolled window (which contains table) and under event set-focus-child of table I added this code:

Code:
G_MODULE_EXPORT void
SETFOCUSCHILD_table1(GtkObject *object, gpointer user_data)
{
      gtk_container_set_focus_vadjustment (table1, adjustment1);
}


Now everything work as expected.
Focused control is always in visible area.


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 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:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group