Re: Question About GtK Application DevelopMent



On Sat, Mar 24, 2007 at 05:50:39AM -0400, ajeetsingh unistal com wrote:

i Doveloping an application using GTK+- 2.0 . on Red hat . and i have some
problems.
can any  body help me.. i have few Question  Regarding GTK.

If you program with Gtk+2, do *NOT* use GtkCTree, use
GtkTreeView instead.  GtkCTree was deprecated more than 5
years ago.  This is likely the only response you can get
regarding GtkCTree in Gtk+2.

I will answer the questions for GtkTreeView.

1) Can i  I insert a checkBox in GtkCtree. the Contents of the tree will be
filled within a thread function.

A column with GtkCellRendererToggle renderer will do the
trick, there's an example in gtk-demo in the source tarball.
If you want to access the tree model from other threads, you
are responsible for the locking.  See below.

2)  How  i want to Do some task on Right click of Mouse. i  am able to get
the response 
on click , Double Click ,Triple Click. but not able to Detect the Right
Click. how i can catch this Event in the Multi column List (GtkClist).

All buttons send the same events.  The button number is in
event->button.  Right button is normally 3, middle button 2.

3)  I doing the  update value of the lable in a thread . it working
properly with 
    function gtk_label_set_text().but some time  application being crashed 
with the 
    message  pongo_layout_set_text() invalid utf-8 string.

You are responsible for the locking.  The usual way of doing
this is:  Don't.  Access the GUI only from the main thread
and queue actions that should be done there from other
threads with g_idle_add().  This is discussed twice every
week here, search the archives for details.

please  reply me  as  soon as possible.

Either someone can answer or not...

Yeti

--
http://gwyddion.net/



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