Re: [gtk-list] editable text in a clist.



At 02:43 PM 7/16/98 -0500, you wrote:
>I have what is probably not a unique problem. I am writing an
>application that will be used to edit tables in a database. A CList
>would seem the logical choice to present the data in it's tabular
>form. However, there doesn't seem to be a way to give a particular
>cell in a CList focus, much less be able to edit it.
>
>I had thought maybe to create entry widgets on the fly and insert them 
>into the cell the user had selected, then replacing the widget with
>the text the user had entered. However, after looking through the code 
>for the CList object, I see the routine to free memory held by the
>cell contents isn't implemented for widgets (which I guess would be
>the reason there aren't gtk_clist_set_widget() and
>gtk_clist_get_widget() functions).
>
>Are there plans to enhance the CList to include editable text cells?
>This would be a great addition. At the moment though I need a faster
>solution and don't have the time it would need to try implementing it
>myself.
>
>Perhaps there is a better method for editing tabular data and I
>haven't run across it yet. Any suggestions?

There is a widget out there called gtksheet, which is based on the
CList widget, but sounds exactly like what you want.

I'm not sure where you can download it, and if you can't find it
e-mail me at kth@srv.net and I'll send on a copy.
can download it 

Seems to be ok for the short time I've played with, but if anyone
is maintaing it...

A few quick items I spotted in playing around with this
(changed a clist in my program to sheet to play with it)

1. What is the difference between these two functions

        gtk_sheet_set_column_title
        gtk_sheet_column_button_add_label


   The first one is named like what clist uses, but it doesn't
   seem to do anything. Is there a need for two functions?

2. You can't create a cheet with 0 rows. Many errors insue at
   run-time. (Database applications will notice this most I think)

3. If you push the tab after entering something in the right-most
   column, it blanks out your entry and stays where it was.
   It should at least keep the data you entered. Also should
   probibly wrap around to the next column.

4. There is no reverse-tab key that I could find.

5. Is there some way to set justification for one column without
   doing it cell by cell? When the sheet is lengthened, I'd want new
   cells to automatically set the justification.

6. Need to wrap the header files in an '#include "C" {}' wrapper
   for C++. Could this be added to the header files so we don't
   have to remember to? (Yes, the #ifdef...#include "C"...#endif looks
   nasty, but it is nice for us C++ players)

I'll probibly lengthen my wish list more as I play with it.
-------------------------------------------------------------
Kevin Handy  kth@srv.net         Accounting Software for
Software Solutions. Inc.         VAX/VMS Computer Systems
Idaho Falls, Idaho



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