Hi,

If I understand correctly, you are looking for a widget that actually displays a table. The grid widget, as I understand it, is more of a geometry manager as you have said. I recently wanted to add a spreadsheet type widget and found some discussion, from way back in the archives, about how to implement new widgets in Tk with 'newWidgetClass'. I never got anywhere with it myself and no-one on the users list seemed able to help but I think if you can work out how to do this it will be exactly what you're looking for. Supposedly (in theory anyway and possibly in earlier versions?) you can extend the Tk module (and QTk?) with any widget available to the underlying Tk engine.

I haven't been able to find the thread since then, but this is a copy of the original message:

****************************

In Tcl/Tk version 8.4 a couple of new widgets were added (spinbox,
   > labelframe, panedwindow, perhaps other things as well?). As far as I
   > can see, neither QTk nor the 'ordinary' Tk package supports them
   > yet. I think it would be nice if they could be officially
   > supported. Any plans for this?

   One cool thing about the Tk library is that it is user-extendable.
   For example, here is how to create a new SpinBox class for the new
   spinbox widget in tk8.4, and how to use it:

   declare
   SpinBox = {Tk.newWidgetClass noCommand spinbox}
   W={New Tk.toplevel tkInit(title:'Spin This')}
   S={New SpinBox tkInit(parent:W 'from':5 'to':11)}
   {Tk.send pack(S)}

   QTk also has provisions for extensibility but I don't remember off
   hand how it's done (Donatien?)

   Cheers,

********************************************

I wish I could be more help but you might have more success than I did.

Regards

Mark



Bernd Quade wrote:
Hi,

Thanks you for your fast response
typically it takes longer... it seems that this community are very active :-)

I think that the grid element is like a layout-element and not like a Table-Gui-Widget,
or do i misread it?

I will spend this weekend a little time to play around with the grid element.

Have a nice weekend.
Bernd



Antoine Cailliau schrieb:
> Hi,
>> have somebody a solution or a example for a Table-GUI-Widget (TK/QTK/EBL)?
>>
>> i need to display 2 or 4 columns and 10 - 25 rows
>>
> With the grid widget in Qtk, this should be easy to do.
> http://www.mozart-oz.org/documentation/mozart-stdlib/wp/qtk/html/node13.html#chapter.widgets.grid
>
> Antoine C.
>
>
>
> ------------------------------------------------------------------------
>
> _________________________________________________________________________________ > mozart-users mailing list [email protected]
> http://www.mozart-oz.org/mailman/listinfo/mozart-users

_________________________________________________________________________________ mozart-users mailing list [email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-users



--
Mark Richardson
Final year undergraduate
University of Teesside
_________________________________________________________________________________
mozart-users mailing list                               
[email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-users

Reply via email to