Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!apple!julius.cs.uiuc.edu!usc!sdd.hp.com!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!src.honeywell.com!msi.umn.edu!sctc.com!pasturel From: pasturel@sctc.com (Pierre Pasturel) Newsgroups: comp.windows.x.motif Subject: LabelGadget problems Summary: problem with LabelGadget Keywords: LabelGadget Message-ID: <1990Nov9.174932.7131@sctc.com> Date: 9 Nov 90 17:49:32 GMT Distribution: comp.windows.x.motif Organization: Secure Computing Technology Corporation Lines: 44 I have a call back that looks like this: Callback() n = 0; label_string = XmStringCreateLtoR (".. processing", charset); XtSetArg (args[n], XmNlabelString, label_string); n++; XtSetValues( prompt_display, args, n); XFlush(display_ptr); ... processing stuff (takes a few seconds to execute) n = 0; label_string = XmStringCreateLtoR (" finished processing", charset); XtSetArg (args[n], XmNlabelString, label_string); n++; XtSetValues( prompt_display, args, n); XFlush(display_ptr); end of callback. where prompt_display is a LabelGadget widget. The problem that I'm having is that the label becomes blank after the first XtSetValues, and it doesn't get updated until after the callback finishes executing, by which time it comes up with "finished processing" from the second setting of the labelString. I tried using XSync(display_ptr, false) instead of XFlush(), but that didn't work either. I also tried creating prompt_display as a Label widget and that didn't work either. I finally used Text widgets instead of LabelGadgets and they work fine (ie they update their XmNvalue ok), but I really want to use labels instead. Anyone else have this problem or have any suggestions? I'm using motif 1.0. Pierre pasturel@sctc.com