cjross@bbn.com (chris ross) (03/03/90)
I recently started using Motif and UIL, and am seeing some weird behavior in ScrollBar widgets. I have a small application that sets up a MenuBar, two ScrollBars, and a DrawingArea as children of a Form, in an arrangement similar to that of a MainWindow widget. ----------------------------------------- | menu bar | ----------------------------------------- | |^| | | | | |Y| | drawing area |b| | |a| | |r| | | | | |v| ----------------------------------------- |< Xbar >| | ----------------------------------------- The idea is to use the scroll bars to pan around a world coordinate system of arbitrary bounds. To prevent loss of panning accuracy, I have the XmNmaximum resources for the scroll bars set to some ridiculous value like 100000 (the XmNminimum resources are 0.) The 0-100000 ranges are mapped to world coordinates as needed. The XmNprocessingDirection is XmMAX_ON_TOP for Ybar, since the world system has 0,0 at the lower left. With such large values for XmNmaximum, Motif seems to be unable to handle the boundary conditions at the ends of the scrollbars. Moving the Xbar or Ybar slider *all* the way to the left or bottom sometimes produces a slider value of 0, but more often that not it comes out as 33, 400, 1090, or some other random value. Likewise, moving them all the way to the right or top can produce a value which is not equal to XmNmaximum - XmNsliderSize. To make matters worse, growing the window sometimes causes the Ybar slider to snap to the top end of the range. I also occasionally get the following error from the toolkit, usually when the "snap" behavior occurs. Nowhere do I set the XmNvalue resource for either scrollbar; I assume this is Motif's doing. X Toolkit Warning: Name: tmw_yScrollBar Class: XmScrollBar The specified scrollbar value is greater than the maximum scrollbar value minus the scrollbar slider size. Has anyone else seen this problem? Is there a workaround (other than decreasing the XmNmaxima?) My system configuration is: Masscomp 5600 running RTU 4.0A, X11R3, Motif 1.0 thanx for your time. _______________________________ chris ross <0> cjross@bbn.com
ben@hpcvlx.cv.hp.com (Benjamin Ellsworth) (03/06/90)
Hmmm... I don't have access to a Masscomp, but I can say two things about the scrollbar widget on the HP and DEC gear that I've worked with: - The Scale widget does almost exactly what you are doing as a matter of course (min=0, max=100000000). - I've never seen that kind of behavior. ----------------------------------------------------------------------- Benjamin Ellsworth | ben@cv.hp.com | INTERNET Hewlett-Packard Company | {backbone}!hplabs!hp-pcd!ben | UUCP 1000 N.E. Circle | (USA) (503) 750-4980 | FAX Corvallis, OR 97330 | (USA) (503) 757-2000 | VOICE ----------------------------------------------------------------------- All relevant disclaimers apply. -----------------------------------------------------------------------
marbru@auto-trol.UUCP (Martin Brunecky) (03/06/90)
In article <52945@bbn.COM> cjross@BBN.COM (chris ross) writes: >I recently started using Motif and UIL, and am seeing some weird >behavior in ScrollBar widgets. ....... > > X Toolkit Warning: Name: tmw_yScrollBar Class: XmScrollBar > The specified scrollbar value is greater than the maximum > scrollbar value minus the scrollbar slider size. > > >Has anyone else seen this problem? Is there a workaround (other than >decreasing the XmNmaxima?) Yes, have the same problem, using 10000 as a maximum. In addition, after moving the thumb back and forth, my right arrow (for horizontal scrollbar) (or down arrow for vertical) goes away. It's still sensitive though.... Looks like the widget clears the area including the arrow. I am still trying to find out if it's my application (my own text widget in XmScrolledWindow) or if it is the Motif widget. Has anyone seen this one ? -- =*= Opinions presented here are solely of my own and not those of Auto-trol =*= Martin Brunecky marbru@auto-trol.COM (303) 252-2499 {...}ncar!ico!auto-trol!marbru Auto-trol Technology Corp. 12500 North Washington St., Denver, CO 80241-2404