Re: TreeView: editable cell data



On Thu, 2003-01-30 at 13:27, Karel Zak wrote:
>  Hi,
> 
>  I use TreeView with cell text renderer. The data for this renderer I
>  prepare by own funtion defined by gtk_tree_view_column_set_cell_data_func().
>  The data are prepared by strfmon() (from libc) and are presented with 
>  currency symbol. It works, but in "edit" mode when renderer show
>  GtkEntry I want to use in this editable entry other data -- 
>  data without currency symbol.
> 
>  Is some way how detect that TreeView wants data for editable GtkEntry
>  or is there some catchable signal before this entry draw? I know only
>  "edited" signal, but it's a little late :-) 
>  
>  The best solution for me is someway that returns pointer to GtkEntry
>  used in editable renderer, but the GTK source code doesn't expect it.
>  A simular problem is how can I filtrate keys in this GtkEntry (for
>  example for digits only)?

You need to handle CellRenderer signals. See the editable_cells part of
gtk-demo. <ad>It's simpler and better documented in gtkmm</ad>.

-- 
Murray Cumming
murray usa net
www.murrayc.com




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