That works but the user will still be able to select the row using the keyboard.

Check out TreeSelection.SelectFunction. You can write a handler that returns 
true if the row is allowed to be selected, false otherwise.

--anthony
________________________________________
From: [email protected] 
[[email protected]] On Behalf Of Christian Hergert 
[[email protected]]
Sent: Friday, January 16, 2009 11:45 AM
To: Wolfgang Mauer
Cc: [email protected]
Subject: Re: [Gtk-sharp-list] Disable TreeView Row

You could try catching the button-press event. Translate the events
X/Y to get the path to the selected row
(gtk_tree_view_get_path_at_pos). Then look up the data in the row to
see if you wish to disable it. If so, make sure the events RetVal is
true to stop further signal emission (thus stopping the treeview's
internal handler from receiving the event).

-- Christian

On Fri, Jan 16, 2009 at 10:03 AM, Wolfgang Mauer <[email protected]> wrote:
> Hi all,
> is it possible to disable a single row(can't be selected) in a treeview?
>
> Thanks for Help
> Wolfgang
>
>
> --
> Top-Soft
> Softwareentwicklung
> Inhaber: Wolfgang Mauer
> Reitersweg 9, 96103 Hallstadt
> Tel.: +49 (0)951 / 2221520
> Fax: +49 (0)951 / 2221521
> _______________________________________________
> Gtk-sharp-list maillist  -  [email protected]
> http://lists.ximian.com/mailman/listinfo/gtk-sharp-list
>
_______________________________________________
Gtk-sharp-list maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/gtk-sharp-list

The information contained in this email may be confidential and/or may be 
covered under the Privacy Act, 5 USC 552(a), and/or the Health Insurance 
Portability and Accountability Act (PL 104-191) and its various implementing 
regulations and must be protected in accordance with those provisions.. It has 
been sent for the sole use of the intended recipient(s). If the reader of this 
message is not an intended recipient, you are hereby notified that any 
unauthorized review, use, disclosure, dissemination, distribution, or copying 
of this communication, or any of its contents, is strictly prohibited. If you 
have received this communication in error, please contact the sender by reply 
email and destroy all copies of the original message. To contact our email 
administrator directly, send to an email message to [email protected]. 
Thank you.
_______________________________________________
Gtk-sharp-list maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/gtk-sharp-list

Reply via email to