Re: how to draw something on GtkDrawingArea when I click a button?

2010-03-18 Thread Claudio Saavedra
El vie, 19-03-2010 a las 13:34 +0800, Tolic Ma escribió: > Hi,everyone! > > I want to draw something on GtkDrawingArea when I click a GtkButton,but I > don't know how to do this... > > this is my code(it doesn't work...): > > *void click_button(void){ > > > gdk_draw_line(drawing_area,drawing_a

Re: how to draw something on GtkDrawingArea when I click a button?

2010-03-18 Thread Amol Kulkarni
gdk_draw_line takes GdkDrawable as first parameter. try using drawing_area->window instead. -- Regards, Amol On Fri, 2010-03-19 at 13:34 +0800, Tolic Ma wrote: > Hi,everyone! > > I want to draw something on GtkDrawingArea when I click a GtkButton,but I > don't know how to do this... > > this is

how to draw something on GtkDrawingArea when I click a button?

2010-03-18 Thread Tolic Ma
Hi,everyone! I want to draw something on GtkDrawingArea when I click a GtkButton,but I don't know how to do this... this is my code(it doesn't work...): *void click_button(void){ gdk_draw_line(drawing_area,drawing_area->style->white_gc,x,y,width+x,height+y); } int main(int argc,char *argv[])

Re: Searching a GtkTreeView

2010-03-18 Thread Micheal Smith
On 03/18/10 06:29 PM, Carlos Pereira wrote: xul...@cheapbsd.net wrote: I'm looking for a way to find a certain column containing a certain string within a GtkTreeView/model. I know I can loop through each row and search through the column manually, but this seems to be rather slow and cumberso

Searching a GtkTreeView

2010-03-18 Thread xulfer
I'm looking for a way to find a certain column containing a certain string within a GtkTreeView/model. I know I can loop through each row and search through the column manually, but this seems to be rather slow and cumbersome. Is there a better way of accomplishing this? _

GtkText scrolling issue

2010-03-18 Thread Gregory Hosler
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi all, I have a GtkTextView and associated GtkTextViewBuffer. It is inside of a GtkScrolledWindow. The GtkScrolledWindow has policy "GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS" The GtkTextView has set_wrap_mode set as GTK_WRAP_WORD, so the horizontal