Path: utzoo!attcan!uunet!cs.utexas.edu!tut.cis.ohio-state.edu!bloom-beacon!DINORAH.WUSTL.EDU!y2 From: y2@DINORAH.WUSTL.EDU Newsgroups: comp.windows.x Subject: resizeWidth & resizeHeight of an AsciiStringWidget Message-ID: <8904192223.AA02450@dinorah.wustl.edu> Date: 19 Apr 89 22:23:23 GMT Sender: daemon@bloom-beacon.MIT.EDU Organization: The Internet Lines: 53 I have an application which requires user to select a filename out of a directory. The program is written with Athena widgets. The question is made of by a dialog widget, I am trying to provide the help (list of existing files in the directory) through a popup widget when a specific key is struck. The case I was testing has three files in the directory. The file index function we used mallocs a buffer, sets up filenames (each terminated by \n) in the buffer and returns the string pointer. Therefore, I created an overrideShellWidget with one child (formWidget). And inside this child, I placed one label widget and one AsciiStringWidget. The AsciiStringWidget was used to hold the file index. My problem is no matter how much I tried, I could not get AsciiStringWidget to resize to cover the text size. It insists to be one font high and 100 pixels long (at least it appear to be so). If anybody could give me some direction, I will be most grateful. TIA. Yeong Yeong Liu {uunet...}!wucs1!dinorah!y2 or wucs1.wustl.edu!dinorah!y2 or y2@dinorah.wustl.edu or 314-362-2950 Here is part of my code. . . n = 0; XtSetArg(args[n],XtNx,x); n++; XtSetArg(args[n],XtNy,y); n++; popupshell = XtCreatePopupShell("msg",overrideShellWidgetClass,w,args,n); . . n = 0; form = XtCreateManagedWidget("msg",formWidgetClass,popupshell,args,n); . . /* message */ n = 0; XtSetArg(args[n],XtNlabel,msg); n++; msgw = XtCreateManagedWidget("",labelWidgetClass,form,args,n); . . n = 0; XtSetArg(args[n],XtNfromVert,msgw); n++; XtSetArg(args[n],XtNstring,string_ptr); n++; XtSetArg(args[n],XtNresizable,TRUE); n++; XtSetArg(args[n],XtNtextOptions,resizeHeight|resizeWidth); n++; XtCreateManagedWidget("msg",asciiStringWidgetClass,form,args,n); /* display */ XtPopup(popupshell,XtGrabNone);