Re: [Xbae-discuss] vertScroll Warning
Brought to you by:
dannybackx
From: Terry L. T. <te...@es...> - 2002-10-18 21:02:30
|
James: My particular implementation of the widget doesn't provide a mechanism for the deletion of a single row. I will try your code on my release of the widget to see if I get the same error. I'll let you know. Williams, James P wrote: > > Greg Shebert identified the cause of this problem. I was setting > XmNrows > > to zero upon creation of the matrix widget. After setting it to a value > > of one, the error disappeared. Thanks Greg... > > > > Terry Lee Tucker wrote: > > > I downloaded Xbae-4.9.13 and compiled for use with my current > project. > > > I am getting the following warning when I use the arrow key to scroll > > > down the list and the scrolling operation tries to go past the last > > > item in the list: > > > Warning: > > > Name: vertScroll > > > Class: XmScrollBar > > > The specified scrollbar value is greater than the maximum > > > scrollbar value minus the scrollbar slider size. > > I'm getting the same warning from the program below. It occurs when I > hit the Delete button, which just deletes the top row from the > matrix. Setting XmNrows to 1 doesn't get rid of the warning. I'm > using Xbae 4.9.11 on an SGI running IRIX 6.5. > > Are there any workarounds or fixes? Thanks for any help you can > provide, and thanks for such a useful widget. > > Jim Williams > > > #include <X11/Intrinsic.h> > #include <Xm/Xm.h> > #include <Xm/Form.h> > #include <Xm/PushB.h> > #include "Xbae/Matrix.h" > > > void deleteCB(Widget w,XtPointer clientData,XtPointer cbs) > { > Widget m=(Widget)clientData; > if (XbaeMatrixNumRows(m)) XbaeMatrixDeleteRows(m,0,1); > } > > > void main(int argc,char *argv[]) > { > String a[]={"red","green","blue"}; > Widget t,f,b,m; > XtAppContext context; > > > t=XtVaAppInitialize(&context,"mtest",NULL,0,&argc,argv,NULL > XmNtitle,"Motif Test", > NULL); > > f=XtVaCreateManagedWidget("form", > xmFormWidgetClass,t, > NULL); > > b=XtVaCreateManagedWidget("Delete", > xmPushButtonWidgetClass,f, > NULL); > > m=XtVaCreateManagedWidget("matrix", > xbaeMatrixWidgetClass,f, > XmNcolumns,1, > XmNvisibleRows,5, > XmNhorizontalScrollBarDisplayPolicy,XmDISPLAY_STATIC, > XmNverticalScrollBarDisplayPolicy,XmDISPLAY_STATIC, > XmNtopAttachment,XmATTACH_WIDGET, > XmNtopWidget,b, > NULL); > XbaeMatrixAddRows(m,0,a,0,0,sizeof(a)/sizeof(*a)); > XtAddCallback(b,XmNactivateCallback,deleteCB,m); > > XtRealizeWidget(t); > XtAppMainLoop(context); > } > -- Sparta, NC 28675 USA 336.372.6812 http://www.esc1.com The fool has said in his heart, "There is no God." Psalm 14:1 |