Re: Scrolling graphic area?

Steve Lamont (
Tue, 18 Mar 97 16:56:20 PST

To subscribers of the xforms list from (Steve Lamont) :

> I was wondering how I would implement a scrolling graphic
> area, either with it's own scroll bars (like a browser) or with a
> seperate area using a positioner (which is what I like better
> because I can display a reduced image of the map and the crosshairs
> show wharea you are looking at nicely (assuming I can put an image
> behind the crosshairs, of course)). ...

I've discussed this topic at some length in earlier postings. You may
want to check the list archives (see the bottom of this message for
the URL).

Basically, just create a Canvas object and then create a child Window
to the Canvas (a Canvas is just a Window). Draw or tile your Pixmaps
into that window. You may end up creating child windows for each
Pixmap and using XSetWindowBackgroundPixmap() to display your

The only problem I see using a Positioner object is that you can't
easily set a background image since a Positioner with NO_BOX
attributes is illegal (if you do it, you'll see that the Positioner
crosshairs leave trails as they're moved). It might be easier to
create another Canvas and use either the X or the XForms drawing
routines to draw and undraw the crosshairs or other overlay.

To unsubscribe, send the message "unsubscribe" to or see
Xforms Home Page:
List Archive: