Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!ukc!tcdcs!bofin!cjmchale From: cjmchale@cs.tcd.ie (Ciaran McHale) Newsgroups: comp.windows.x.motif Subject: Re: Infinitely-scrollable list widget? Message-ID: <1991Feb20.184938.28788@cs.tcd.ie> Date: 20 Feb 91 18:49:38 GMT References: <1991Feb20.022721.8463@intek01.uucp> Organization: DSG, Dept. of Comp. Sci., Trinity College, Dublin. Lines: 44 In <1991Feb20.022721.8463@intek01.uucp> mark@intek01.uucp (Mark McWiggins) writes: >I'm building a Motif interface to our in-house database system. Part of >the interface is a browser for the database tables. I'm currently using >a List widget with a ScrolledWindow parent. > >This works OK if I'm willing to set the list up completely in advance, but >it presents problems for scrolling over, say, a database table of 1 million >rows. The maximum size of a X window is 2**16 -1 pixels high/wide. So it is impossible to have a container widget/window which holds ~1 million other windows/widgets. Windows just can't be that large. You can, of course, code around this but beware that many container widgets won't be able to cope. Also, if you plan on having a separate window/widgets for each row then that's 1 million windows/widgets! The X server may well run out of memory (if your client doesn't first). >Ideally I need something that would let me keep a small list, with >a callback procedure to keep refreshing the list "in the background" as >the user uses the mouse to scroll. The ScrollBar widgets contain appropriate >callbacks, but the user can also scroll by dragging down the list itself. >The List widget only contains callbacks that occur after the selection is >made, and that's not soon enough. > >Can anybody point me toward a widget that's designed for this sort of thing, >or some obvious way of doing it with the standard widget set? I have >Motif 1.0 (with X11R3, of course) on an Apollo. I don't know of any widget that does exactly what you want. (But then I don't use Motif; maybe it has a suitable one.) If you can't find a suitable widget then you could always write your own. (There are several books available, including Doug Young's one, which discuss widget writing.) Ciaran. -- Ciaran McHale "Verbosity says it all" ____ Department of Computer Science, Trinity College, Dublin 2, Ireland. \ / Telephone: +353-1-772941 ext 1538 FAX: +353-1-772204 \/ Telex: 93782 TCD EI email: cjmchale@cs.tcd.ie