[comp.windows.news] Icon ButtonItems in liteitem ?

krempel@cmx.npac.syr.edu (Henry BJ Krempel) (03/28/88)

I'm writing a little NeWS program using liteitem and I'd like to have
a dialog box that turns into a single button when closed by the user.
I wrote the little dialog box,  and I did manage to create a button on
the iconcanvas. 

The problem is:  the button on the iconcanvas is not visible.  I
guessed it's position,  and when I clicked on it,  it changed color
momentarily and did what I wanted it to.

Henry B. J. Krempel	<krempel@pacrat.npac.syr.edu>
Northeast Parallel Architectures Center (NPAC)
Syracuse University
250 Machinery Hall
Syracuse,  N.Y. 13244
-- 
Henry B. J. Krempel	<krempel@pacrat.npac.syr.edu>
Northeast Parallel Architectures Center (NPAC)
250 Machinery Hall
Syracuse,  N.Y. 13244

don@BRILLIG.UMD.EDU (Don Hopkins) (04/01/88)

   Date: Thu, 31 Mar 88 14:12:13 EST
   From: cmx!krempel@nisc.nyser.net  (Henry BJ Krempel)



   I'm writing a little NeWS program using liteitem and I'd like to have
   a dialog box that turns into a single button when closed by the user.
   I wrote the little dialog box,  and I did manage to create a button on
   the iconcanvas. 

   The problem is:  the button on the iconcanvas is not visible.  I
   guessed it's position,  and when I clicked on it,  it changed color
   momentarily and did what I wanted it to.

   Henry B. J. Krempel	<krempel@pacrat.npac.syr.edu>
   Northeast Parallel Architectures Center (NPAC)
   Syracuse University
   250 Machinery Hall
   Syracuse,  N.Y. 13244
   -- 
   Henry B. J. Krempel	<krempel@pacrat.npac.syr.edu>
   Northeast Parallel Architectures Center (NPAC)
   250 Machinery Hall
   Syracuse,  N.Y. 13244

It might be that the Item's canvas is transparent. Try something like:

/MyButton
  (Label) {NotifyProc} ParentCanvas
  /new ButtonItem send
def
{ItemCanvas /Transparent false put} MyButton send

(Or you could make a subclass of ButtonItem that did this for you in
the /new method.)

	-Don