hsd@raybed2.msd.ray.com (HERBERT DASILVA) (04/03/91)
Hi ho, I've a couple of tricky-type questions to pose to those who might have run up against these types of things before: 1. How does one disable the f.close option in the window menu. I suspect it's with a protocol, but can't figure it out. 2. Has anyone using Motif 1.1.1 found the acceptable values for the !$%^@# RowColumn.menuPost resource? The documentation hints at its existance, but the documentation for RowColumn doesn't list it, and the source code and headers have no #defined values for it. I've tried a dozen resources with -xrm at the command line, but all of them get spit back at me. All I know is that the resource is of type 'String'. 3. Has anyone dissected the workings of the ScrolledWindow widget? I have a very specific need: (bad ASCII art follows) ----------------------------------------------------------------------- |XXX| header area | |---+------------------------------------------------------------------ | r | | | o | | | w | | | | | | n | work space | | u | | | m | | | b | | | e | | | r | | ----------------------------------------------------------------------- I have constructed a work space consisting of rows and columns of information, which is preceeded by a row number and labeled by a column header. The work space can be many rows long, and many columns wide, so I wish to scroll the work space so the user can see the whole thing (like a spread sheet). BUT (here's the catch), I'd like the row numbers to scroll ONLY vertically, and the headers to scroll ONLY horizontally, while the work area can go both ways. The row numbers, header area, and work space are all separate BulletinBoards with the data in each, and I've got the work space tied to a ScrollingWindow. Is there an easy way to use the existing scroll bars and the code existing in ScrolledWindow to accomplish this? I imagine it means creating two more clipping windows, but I haven't got the foggiest idea how, and I'd hate to have to make the scrolling APPLICATION_DEFINED, since I KNOW THE CODE IS IN THERE ALREADY!!! Any and all help will be greatly appreciated. If it matters, I'm running Motif 1.1.1, Ultrix 3.1, VAXstation 3100, X11R4 Thank you kindly, Herb DaSilva
nazgul@alfalfa.com (Information Junkie) (04/03/91)
> 1. How does one disable the f.close option in the window menu. I suspect > it's with a protocol, but can't figure it out. This surely must be in the FAQ by now. The answer is: You can disable the f.close option by setting the shell resource XmNdeleteResponse to XmDO_NOTHING. However, you should never just do this. Instead you should set this, and then set up a protocol handler so that your code is called to handle the close. Otherwise you'll end up with an irate user. To set up a handler... atoms[0] = XmInternAtom(XtDisplay(widget), "WM_DELETE_WINDOW", False); XmAddWMProtocols(widget, atoms, 1); XmAddWMProtocolCallback(widget, atoms[0], (XtCallbackProc)OmXWidgetDelete, (caddr_t)this); Alfalfa Software, Inc. | Poste: The EMail for Unix nazgul@alfalfa.com | Send Anything... Anywhere 617/646-7703 (voice/fax) | info@alfalfa.com I'm not sure which upsets me more: that people are so unwilling to accept responsibility for their own actions, or that they are so eager to regulate everyone else's.