Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!ucsd!sdd.hp.com!wuarchive!uunet!lll-winken!xanth!xanth.cs.odu.edu!jason From: jason@cs.odu.edu (Jason "dedos" Austin) Newsgroups: comp.windows.x.motif Subject: Re: XmListDeleteItemsPos bug?? Message-ID: Date: 8 May 91 18:00:01 GMT References: <54456@inkwell.UUCP> <2899@istop.ist.CO.UK> Sender: usenet@cs.odu.edu (Usenet News Poster) Organization: Old Dominion University, Norfolk, VA Lines: 46 In-Reply-To: jh@ist.CO.UK's message of 7 May 91 09:50:13 GMT Nntp-Posting-Host: sarasvathi.cs.odu.edu In article <2899@istop.ist.CO.UK> jh@ist.CO.UK (Jeremy Huxtable) writes: -> From article <54456@inkwell.UUCP>, by jhc@ivan.uucp: -> > I am experiencing occasional crashes in XmListDeleteItemsPos. Is there -> > a known bug in this function? -> -> One bug, though possibly the one you are looking for is that when the bottom -> element of the list is visible and you call XmListDeleteXXX, the List -> widget gets its display one line out of whack with where it thinks it is. -> To get round this, we had to resort to horrible manipulations using -> XmListSetBottomPos and so on. I think the same problem applies to -> XmListAddItemXXX. These calls gave me trouble for quite a while, so I finally decided to stop using them. Instead, just use XtSetValues to set items to a pointer to an array of compound strings and itemCount to the number of items in the array. -> -> ...and another thing... why isn't there an XmList routine to just make the -> current selection visible? You can make the selection the top or bottom -> item, but not just make sure that it is visible.... What's visible and what's not it determined by the scrollBar widget and not the list widget. It wouldn't be too hard to write a routine to get the scrollbar position, an item's position, and figure out if that item is visible. Don't limit yourself to the motif convenience functions or there will be a lot of things you won't be able to do. -> ...and another thing... why can't I have a list of things other than strings, -> such as icons, mixtures of text and pictures etc? -> -> ...and another thing, why can't I have a multi-column list? Having programmed -> the Macintosh, I am amazed how difficult it is to do things under Motif which -> are trivial in the Mac environment. Were the widgets designed by committee? -> -> ...shall I mention XmRowColumn? I think not. The nice thing about X is that it's expandable. You can easily create new widgets by adding to existing ones. No one could possibly come up with a widget set for all situations, so it's left open to the programmers to expand as they see fit. -- Jason C. Austin jason@cs.odu.edu