preetham@ra.src.umd.edu (Preetham Gopalaswamy) (01/05/90)
I have just started using widgets after spending months and months and months with Xlib. My reference bible is Doug Young's "Programming and Applications with Xt". I am using the Hp widget set and am having a problem with the scrolled window widget. My application has a scrolled window widget (XwswindowWidgetClass) which in turn has a workspace widget (XwworkSpaceWidgetClass) as its child. Based upon the size of the workspace widget, I draw a plot in it so that a certain portion of the plot is visible through the scrolled window, the rest obviously viewable by using the scroll bar. What I would like to see happen is that when the scrolled window widget is resized, the workspace widget also be resized and the plot be redrawn so that the same portion/amount of the plot is visible through the scrolled window i.e. magnify or reduce the whole plot when the scrolling window is resized and not just increase/decrease the visible region of the workspace widget. I have tried several ways to implement this but have failed. I am having problems preventing the appearance of the vertical scrollbar when the scrolling window is made smaller (assuming of course that I start with no vertical scrollbar). Is this possible to accomplish and if so what would be a possible method ?? The scrolled window does not have a XtNresize callback which is a problem for starters. If anybody on the net has spent long (agonizing ???) hours with the scrolled window, maybe you can help me. I have spent quite some time editing this posting so that my problem is understandable and I hope I have succeeded. THANK YOU in advance for any help that I may get. Desperately awaiting an answer Preetham Gopalaswamy