Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!decwrl!sgi!daisy!klee From: klee@daisy.UUCP (Ken Lee) Newsgroups: comp.windows.x Subject: Re: grid widget in X? Message-ID: <2996@daisy.UUCP> Date: 21 Apr 89 18:42:55 GMT References: <1199@ttds.UUCP> Reply-To: klee@daisy.UUCP (Ken Lee) Organization: Daisy Systems Corp., Mountain View, Ca. Lines: 20 In article <1199@ttds.UUCP> jonasn@ttds.UUCP (Jonas Nygren) writes: >I am looking for a widget that implements a spread-sheet, like a grid >of text-widgets. Text-widgets should have justification attributes >and the grid-widget should scroll if it's larger than the window. I don't know of a single widget that does this, but it is fairly easy to do using existing widgets. Create an array of text widgets (with whatever justification attributes you want) and put them in a form widget, using the form layout attributes to line them up. Put the form in a viewport widget, which handles scrolling. I did this for an application with a small grid (about 20 rows by 10 columns) and it worked fine. If you have a very large grid, however, you may not want to realize all the widgets at once (that could cause performance and/or memory problems). You could try modifying the form widget to only realize the visibile text widgets. -- Ken Lee Daisy Systems Corp., Interactive Graphics Tools Dept. Internet and Smail: klee@daisy.uucp uucp: uunet!daisy!klee