tmerklin@fwhnm02.fwrdc.rtsg.mot.com (Teresa Merklin) (05/31/91)
I am having a problem with getting a scrollbar to appear in an XmScrolled window: n = 0; XtSetArg(args[n],XmNx,0); n++; XtSetArg(args[n],XmNy,91); n++; XtSetArg(args[n],XmNwidth,500); n++; XtSetArg(args[n],XmNheight,309); n++; XtSetArg(args[n], XmNscrollingPolicy, XmAUTOMATIC); n++; main_window = (Widget) XmCreateScrolledWindow(top_form, "main_window", args, n); n = 0; XtSetArg(args[n],XmNx,0); n++; XtSetArg(args[n],XmNy,0); n++; XtSetArg(args[n],XmNheight,1600); n++; XtSetArg(args[n],XmNwidth,500); n++; XtSetArg(args[n],XmNresizePolicy, XmRESIZE_ANY); n++; main_board= (Widget) XmCreateBulletinBoard(main_window, "main_board", args, n); I've created a scrolled window, which has a child bulletin board. The bulletin board contains a variable number of pushbuttons. The problem is, when the number of pushbuttons grows past what can be viewed through the scrolled window, no scrollbar ever appears, and the buttons scroll off the viewable area. I suspect that this has something to do with the way I'm creating the widgets, but I don't know what. Furthermore, I have another application where I've done almost exactly the same thing (buttons in a bulletin board in a scrolled window) and it works perfectly. The only difference between these -> in my application that works, everything is created then managed, while my application that doesn't work, the scrolled window and bulletin board are managed, and the buttons are created/destroyed dynamically. Any assistance on this would be greatly appreciated, since frankly I'm stuck. Thanks, Teresa -- ///////////////////////////////////////////////////////////////////////////// // Teresa Barley Merklin / Internet: tmerklin@mot.com // // Network Operations and Management / Internal: TX14/1D // // Fort Worth Research & Development Center / Voice: (817) 232-6565 // // Motorola, Inc. / Fax: (817) 232-6081 // /////////////////////////////////////////////////////////////////////////////