Re: Do we have scrolled canvases yet?

Steve Lamont (spl@szechuan.ucsd.edu)
Mon, 13 Jan 97 06:55:20 PST

To subscribers of the xforms list from spl@szechuan.ucsd.edu (Steve Lamont) :

> However, doing any drawing routines (i.e.
> XFillRectangle(fl_get_display(), childCanvas, childGC, 10, 10, 100, 100))
> yields no results! I can't get any of the drawing routines to draw to
> childCanvas. (Do I need to call XMapWindow() to refresh the window after
> every drawing/write operation, like you do in console mode using NCurses?
> Anyway, I tried that also, but that was also a dead end.)

Are you sure that the region where you're drawing is visible? Have
you set a foreground color when you draw? You may be drawing and just
not seeing the result because it's the same color as the background.
See the Xlib manual for the function XSetForeground() to set this.

Use XFlush() to send your drawing requests to the server. As far as I
know XMapWindow() is a no-op once the window is mapped.

> Since I'm probably going to ask the following question eventually, I
> better ask it now: how do I get childCanvas to pass on Expose events to
> the parent canvas so that it's Expose handler can get called?

See the function fl_add_canvas_handler() in the XForms manual.

spl