You might be able to fiddle around with the newlines at the end of the buffer
to get something to work with the textview.
Eric
//gcc -Wall text_space1.c -o text_space1 `pkg-config --cflags --libs gtk+-3.0`
#include
static void value_changed(GtkAdjustment *v_adjust, GtkWidget **widgets)
{
t; > gtk_text_view_scroll_to_iter(..., 0.0, TRUE, 1.0, 0.5)
> >> > >
> >> > > so I have that to use.
> >> > >
> >> > >
> >> > > On Tue, Sep 25, 2018 at 2:34 PM wrote:
> >> > >
> >> > > >
> >>
; > > > there is a better solution for this.
> > > >
> > > > static void value_changed(GtkAdjustment *v_adjust, gpointer textview)
> > > > {
> > > > static gint s_line=0;
> > > > GtkTextIter iter;
> > > >
=0;
> > > GtkTextIter iter;
> > > GtkTextBuffer
> > > *buffer=gtk_text_view_get_buffer(GTK_TEXT_VIEW(textview));
> > > GtkTextMark *mark=gtk_text_buffer_get_mark(buffer, "insert");
> > > gtk_text_buffer_get_iter_at_mark(buffer, &iter,
k_text_buffer_get_mark(buffer, "insert");
> > gtk_text_buffer_get_iter_at_mark(buffer, &iter, mark);
> > gint line=gtk_text_iter_get_line(&iter);
> > if(s_line!=line)
> > {
> > g_print("Scroll Line\n&quo
et_line(&iter);
> if(s_line!=line)
> {
> g_print("Scroll Line\n");
> s_line=line;
> }
> }
>
> Eric
>
>
> -----Original Message-----
> From: Doug McCasland
> To: cecashon
> Sent: Tue, Sep 25, 2018
Hi Doug,
Try getting the vertical adjustment of the scrolled window and connect to
"value-changed". See if that will work. Something like
...
static void value_changed(GtkAdjustment *v_adjust, gpointer user_data)
{
}
...
GtkWidget *scroll=gtk_scrolled_window_new(NULL, NULL);
GtkAdjustment
GTK app devel list
is there a signal for typing at bottom of window?
Hi,
I have a TextView app -- it has:
o main window from gtk_window_new()
o add a box to that
o create a scrolled window
o add scrolled window to box
o create a textview object
o add textview to scrolled window
oo
When I type