Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!ucsd!sdcsvax!celece.ucsd.edu!markley From: markley@celece.ucsd.edu Newsgroups: comp.windows.x Subject: Problem with widgets Message-ID: <6642@sdcsvax.UCSD.Edu> Date: 14 Jun 89 18:12:09 GMT Sender: nobody@sdcsvax.UCSD.Edu Reply-To: markley@celece.ucsd.edu () Organization: University of California, San Diego Lines: 66 I am learning how to program using Xt and have run into a problem. I am trying to create a dialog widget and can get it to work if I use the following. Widget color_popup; void create_color_popup(parent) Widget parent; { /* start of color_popup creation */ Arg arg[10]; Widget color_box, red_form; color_popup = XtCreatePopupShell ( "color_popup", transientShellWidgetClass, parent,0,0); color_box = XtCreateManagedWidget ( "color_box", boxWidgetClass, color_popup,0,0); XtSetArg ( arg[0], XtNlabel, "Enter red value" ); XtSetArg ( arg[1], XtNvalue, 0 ); red_form = XtCreateManagedWidget ( "red_form", dialogWidgetClass, color_box, arg, 2 ); ... } This creates a nice little popup with a modifyable text field. If I do it the following way all I get is the title with no text field. static Arg arglist_redform[] = { {XtNlabel, (XtArgVal) "Enter red value' }, {XtNvalue, (XtArgVal) 0 } }; change call to... red_form = XtCreateManagedWidget ( "red_form", dialogWidgetClass, color_box, arglist_redform, XtNumber(arglist_redform)); Is this the way that it is supposed to work or am I missing something? I have trouble believing that the static declaration causes that much of a problem. Sorry for the length of the posting but I included only what I felt was important. Mike Markley University of California, San Diego markley@celece.ucsd.edu markley@kubrick.ucsd.edu disclaimer: These opinions are mine. The University could probably care less what I say or do.