Hello,

I am trying to refresh a drawing area after modifying its
drawinf contents. I have this menu item "Refresh", which upon
clicking on it calls the refreshGraph function.

refresh = XtVaCreateManagedWidget ("Refresh",
xmCascadeButtonWidgetClass,
menu_bar,
XmNmnemonic, 'R',
NULL);
XtAddCallback (quit, XmNactivateCallback, refreshGraph, NULL);

The refreshGraph function is the following:

void refreshGraph( Widget w,
XtPointer clientData,
XtPointer callData)
{
Window win=XtWindow(w);
XClearArea(display1, win, 0, 0, 600, 600, TRUE);
}

The display is a global declaration:

Display display1;

Problem:
Nothing is actually being refreshed. Could it be because
I am not using the same "win" used when first creating the
objects??

Any help is most welcomed.

Thank you.

-ibrahim

Reply via email to