Path: utzoo!attcan!uunet!decwrl!sdd.hp.com!uakari.primate.wisc.edu!aplcen!haven!adm!smoke!smoke.brl.mil From: gdurf@smoke.brl.mil (Glenn Durfee (SWS|durf) ) Newsgroups: comp.windows.x.motif Subject: XmScale Widget...help Message-ID: <13403@smoke.BRL.MIL> Date: 25 Jul 90 14:26:12 GMT Sender: gdurf@smoke.BRL.MIL Organization: U.S. Army Ballistic Research Laboratory, APG, MD. Lines: 62 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