Re: Scrolled Window, Table , TextView and Label



В Срд, 24/01/2007 в 03:24 +0100, Tomasz Cich - OP пишет:
> Hi!
> I got one problem with putting Table with TextView and Label to
> ScrolledWindow.
> Everything is fine when i put treeview inside ScolledWindow, but if i
> put it to Table together with Label, then is a problem with scrolling.
>  
> It is something like:
> ---------------------------------------- 
> |L  |                               |S|
> |A |     TextView             |C|
> |B |                               |R|
> |E |                               |O|
> |L |                               |L|
> |   |                               |L|
> ---------------------------------------
>            SCROLL
> --------------------------------------
>  
> Label represents line counting.
>  
> I dont know which signal, or something like that, should i use to make
> TextView autoscroll.
> When i move my cursor in TextView, scroll doesn't move.
>  
> CODE:
>  
> m_label.set_style(m_textView.get_style());
> m_label.set_alignment(Gtk::ALIGN_LEFT,Gtk::ALIGN_TOP);
> m_label.set_justify(Gtk::JUSTIFY_CENTER);
> m_scroll.set_policy(Gtk::POLICY_AUTOMATIC,Gtk::POLICY_AUTOMATIC);
> m_scroll.add(m_table);
> m_scroll.show_all_children();
> m_table.set_col_spacings(10);
> m_table.attach(m_labelLines,0,1,0,1,Gtk::SHRINK);
> m_table.attach(m_textView,1,2,0,1);
> m_table.show_all_children();
>  
> Please help.
> I have to have any answer before this thursday because i have to show
> my project and it is last thing which doesn't work correctly.
> I wait for answers.
> Thanks
>  
not sure what are you trying to do with this...
but that won't work.

you should add TextView to ScrolledWindow then attach ScrolledWindow to
Table. then you will be able to scroll text area inside table cell.

if your table is going to be a "BIG" widget you would to add it to
another scrolled as well.

regards,
-andrew





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]