Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!mephisto!tut.cis.ohio-state.edu!pacific.mps.ohio-state.edu!zaphod.mps.ohio-state.edu!sdd.hp.com!apollo!asuvax!cs.utexas.edu!sdd.hp.com!uakari.primate.wisc.edu!aplcen!haven!adm!smoke!smoke.brl.mil From: gdurf@smoke.brl.mil (SWS|durf) Newsgroups: comp.windows.x.motif Subject: XmScale Widget...help Message-ID: <4bceeeb0.20b6d@apollo.HP.COM> Date: 25 Jul 90 14:26:00 GMT Sender: root@apollo.HP.COM Organization: U.S. Army Ballistic Research Laboratory, APG, MD. Lines: 60 Resent-From: nazgul@alphalpha.com (Kee Hinckley) e-Id: <9007251913.AA05741@alphalpha.com> To: comp-windows-x-motif@ncar.ucar.edu Resent-To: motif-tmp@alphalpha.com Resent-Date: Wed, 25 Jul 90 15:13:03 EDT Hello NetLand, How can you adjust a scale's length using OSF/Motif? I have tried setting several args before sending them to the the XCreateWidget function (it is necessary to set the length of the scale from within the program, not in a resource file.) I have tried setting the XmNwidth (I am using a horizontally-oriented scale) and the XmNscaleWidth, but neither seem to work. XmNscaleHeight adjusts the thickness of the slider in the scale. The following piece of code displays a rather tall slider with about 100 pixels horizontally in which to move (the default?). It should, I think, show a roughly square scale, 300 x 300. It seems to me that XmNscaleWidth should give the slider more room. BTW, what do XmNwidth and XmNheight do for scale Widgets? (As opposed to XmNscaleWidth and XmNscaleHeight) #include #include #include #include #include #include int main(argc, argv) int argc; char **argv; { Widget top, foo; Arg args[20]; int n; top = XtInitialize(argv[0], "Scale", NULL, 0, &argc, argv); n = 0; XtSetArg(args[n], XmNorientation, XmHORIZONTAL); n++; XtSetArg(args[n], XmNprocessingDirection, XmMAX_ON_RIGHT); n++; XtSetArg(args[n], XmNminimum, 0); n++; XtSetArg(args[n], XmNmaximum, 500); n++; XtSetArg(args[n], XmNscaleHeight, 300); n++; XtSetArg(args[n], XmNscaleWidth, 300); n++; XtSetArg(args[n], XtNheight, 400); n++; XtSetArg(args[n], XtNwidth, 400); n++; XtSetArg(args[n], XmNshowValue, 1); n++; foo = XtCreateManagedWidget("sliding_slider_scale", xmScaleWidgetClass, top, args, n); XtRealizeWidget(top); XtMainLoop(); return (0); } Am I missing something painfully obvious, or is something broken? Please email. Glenn Durfee | gdurf@smoke.brl.mil | gdurf@192.5.23.2