Ibrahim Haddad wrote:

> On the other hand, Can anyone give me a hint on the following problem?
> When darwing object in a Drawing Area, I use XDrawString to draw some
> weight of the object next to the object. But when I click on object, I get
> a (Moo-tiff) window from which I can change the object properties including
> its weight. 

> The problem is that when using XDrawString to re-write the new weight, it
> comes on top of the old weight and it becomes messy. How to remove the old
> weight that I wrote using XDrawString? knowing that I know the coordinates
> of the writtings.

When you change the data upon which redraw is based, you would
normally issue a call along the lines of:

        XClearArea(
                XtDisplay(widget), XtWindow(widget),
                x,y,width,height,
                True
        );

where x,y,width,height delimit the rectangle which needs to be
updated. This will clear the rectangle and then generate an Expose
event. In the case of an XmDrawingArea widget, this will cause the
XmNexposeCallback to be called, which would then redraw the area using
the new data.

You generally shouldn't perform drawing operations other than in
response to an Expose event.

-- 
Glynn Clements <[EMAIL PROTECTED]>

Reply via email to