SunView tricks needed: background to a panel

Mike Smithwick mike at ames.arc.nasa.gov
Tue May 9 03:56:26 AEST 1989


I am trying to put a background image into a sunview panel, but am coming
across the expected problems. . .

First I tried something like :

     window_set(panel,WIN_SHOW,TRUE,0);

     pw_replrop()                /* draw (?)image, (nothing is drawn) */

     window_main_loop()     

So nothing worked here. Next I tried catching events for the window
so I could pick up "WIN_REPAINT" and explicitly draw the pattern
after the window was painted. But the event handler seems to get
called before the system paints the items (shouldn't it have done that
already with window_set()?). So the pattern gets painted, then cleared
when the items are painted. Setting "PANEL_PAINT,PANEL_NO_CLEAR"
doesn't stop the clearing.

I tried making the background pattern a message item, but it would
always end up consuming events for everything else, so my buttons
would stop working.

<2>
Is there anyway to get rid of the thin boarder around a panel, so we
can write our own boarder imagery?

<3>
Is there anyway to define an alternate image for a button, instead
of relying on sunview's own braindead invert highlighting. I want to
use two separate rastfile images and alternate between the two. Right
now I have to use Messages for the image, and explicitly catch the
MS_LEFT/down and up events and change the image myself.


          *** mike (cerbral GURU, insert M&Ms to restart) smithwick***
"Oh, I'm just a NOP in the instruction set of life, oh, ohhhh, hmmmmm"

[disclaimer : nope, I don't work for NASA, I take full blame for my ideas]



More information about the Comp.sys.sun mailing list