[comp.windows.x] Refreshing asciiDiskWidget

wjhagins@VUSE.VANDERBILT.EDU (William J. Hagins) (11/16/89)

	I have an asciiDiskWidget defined.  I want to change the file, and
then redisplay the widget with the new file info.  I want the window to
remain open, and just the data in it to be refreshed.  I have been able to 
do this with string widgets, but have had no success with the disk widget.

Any help will be appreciated.

	Thanks,
		-Jody.       GO GAMECOCKS, BEAT CLEMSON!!!!!

kit@EXPO.LCS.MIT.EDU (Chris D. Peterson) (11/17/89)

> 	I have an asciiDiskWidget defined.  I want to change the file, and
> then redisplay the widget with the new file info.  I want the window to
> remain open, and just the data in it to be refreshed.  I have been able to 
> do this with string widgets, but have had no success with the disk widget.

In R3 you will have to destroy the old Disk source, and create a new Disk
source.  You can then make a call to XtSetValues() to set the XtNsource resource
on your Text wiget.  In R4 you should just be able to make a setvalues call, and
things will work correctly.

> 	How do I automatically resize the window.  The file is too long, and 
> I have a scrollbar on the diskwidget, but the lines of text are too great.
> I have tried setting XtNtextOpitons to resizeHeight, but this does
> not work.

If you set XtNtextOptions to scrollVertical then you will get a scrollbar
along the left edge of your window that can be used to move the window around.

setting XtNtextOptions to resizeHeight will only resize your window when the
user types something at it that makes it grow.  If you modify the text from the
program the Text widget will not resize.  I consider this a bug, and will get
around to fixing it at some point.

>  Actually, none of the parameters for this option work.

Really?  What version of X are you using?  In R3 we have had no complaints about
the textOptions, except scrollHorizontal is a no-op.


						Chris D. Peterson     
						MIT X Consortium 

Net:	 kit@expo.lcs.mit.edu
Phone:   (617) 253 - 9608	
Address: MIT - Room NE43-213