Re: XForms: colormaps and canvases

Stephen Langer (langer@cam.nist.gov)
Wed, 22 Oct 1997 18:33:40 -0400

To subscribers of the xforms list from "Stephen Langer" <langer@cam.nist.gov> :

> To subscribers of the xforms list from jorgen@vision.auc.dk (Jorgen
Bjornstrup) :
>
> Hi,
>
> >>>>> "Stephen" == Stephen Langer <langer@cam.nist.gov> writes:
>
> > To subscribers of the xforms list from "Stephen Langer"
> > <langer@cam.nist.gov> : I asked:
> >>> Is it possible to install a colormap in more than one canvas?
>
> > spl replied:
> >> It's probably better to either use the Default map or to just copy
> >> one colormap to the other than trying to use two.
>
> > I can't use the default map since I need to know that I can fill the
> > colormap with lots of colors. (I don't mind if there's a bit of
> > flashing when the window focus changes.) The colormap that I use isn't
> > static -- I have to be able to change entries in it -- so it would be
> > nice to have only ONE map so that I don't have to make the changes
> > twice. But when I install one map in two canvases, the program crashes
> > when the form is freed.
>
> I am no an XForms expert and probably not even an X11 expert, so this
> might not be the correct/best/easiest way to do it, but ...
>
> First a question. Since you want to have identical colormaps in two
> canvases in the same window, then why do you not just use the same
> colormap for both canvases, i.e., by setting the colormap for the window
> containing the canvases?
>

I want to do just what you suggest, but it doesn't work. That's what
prompted my original post. When I use the same colormap for both canvases,
I get an X error when the form is freed, apparently because XForms tries
to free the colormap twice. Having two identical colormaps would be a
work-around, but not a pleasant one.

-- Steve

-- 
-- EMail: stephen.langer@nist.gov                    Phone: (301) 975-5423 --
-- WWW:  http://math.nist.gov/mcsd/Staff/SLanger/    Fax:   (301) 990-4127 --
-- Mail: Building 820 Room 365; NIST; Gaithersburg, Md          20899-0001 --
_________________________________________________
To unsubscribe, send the message "unsubscribe" to
xforms-request@bob.usuf2.usuhs.mil or see
http://bob.usuf2.usuhs.mil/mailserv/xforms.html
Xforms Home Page: http://bragg.phys.uwm.edu/xforms
List Archive: http://bob.usuf2.usuhs.mil/mailserv/list-archives/