sanjay@mit-amt.MEDIA.MIT.EDU (Sanjay Manandhar) (02/22/90)
According to the documentation, one can place the thumb on arbitrary position along the scrollbar. This is supposed to take a float between 0.0 and 1.0. However, the best I can do is get the thumb at beginning of the bar. I've tried placing the thumb midway (0.5), for instance, in R3 and R4. XtSetArg(arg[7], XtNtop, 0.5); # in R3 XtSetArg(arg[7], XtNtopOfThumb, 0.5); # in R4 The R4 docs provide a portable way to do this, but that does not work either. If someone has run into this problem, and found a fix, I'd appreciate hearing it. thanx, sanjay
kit@EXPO.LCS.MIT.EDU (Chris D. Peterson) (02/23/90)
> However, the best I can do is get the thumb at beginning of the bar. > I've tried placing the thumb midway (0.5), for instance, in R3 and R4. > XtSetArg(arg[7], XtNtop, 0.5); # in R3 > XtSetArg(arg[7], XtNtopOfThumb, 0.5); # in R4 This will never work, since the 0.5 is truncated to 0 by the C compiler. > The R4 docs provide a portable way to do this, but that does not work > either. If someone has run into this problem, and found a fix, I'd > appreciate hearing it. That code works great for me, take a look at examples/Xaw/xscroll.c. This example program puts up a scrollbar with its thumb at .5, and works correctly on all our machines. Chris D. Peterson MIT X Consortium Net: kit@expo.lcs.mit.edu Phone: (617) 253 - 9608 Address: MIT - Room NE43-213