Hello All,

>Are you actually creating the menu and menu item? Are you adding the
>callback for the correct widget? (`quit' seems like an odd name for
>a `refresh' option).

I am creating a menu and 2 menu items "refresh" and "quit".
The 'quit' that Mr. Glynn Clements refered to was a cut/paste
error. Fixed now.

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

>BTW, you can use `XClearArea(dpy, win, 0, 0, 0, 0, True)' to clear the
>entire window.

I did use both  `XClearArea(display1, win, 0, 0, 0, 0, True)'
and 'ClearArea(display1, win, 0, 0, 600, 600, TRUE)'
but nothing!

>The above will clear the widget's window. Have you tried setting a
>breakpoint on that function (or adding a printf()) to see if it
>actually gets called?

I have inserted a printf. It printed out the message I put but no
refresh is actually being done. The amazing about it, is when I 
minimize the window and then maximize it back, it has the same
effect as refresh! But for the demo of the project, i can not 
keep on minimizing and maximizing windows! :-)

Any comment/hint is mostly welcomed. I am ready to send out
the code. Total # of files is about 29 file. Needs Mootiff 2.x,
the X libraries and the GNU C to compile. The compressed tar file
is about 500K. 

Thanks a lot and sorry for the long message.

Best regards,

-ibrahim


Reply via email to