[comp.windows.open-look] OpenLookButtonStack

vidarh@stud.cs.uit.no (Vidar Hanssen) (01/14/91)

Hello!

I've tried very hard to make some OpenLook buttons with pop-up menus (OLButtonStack) in a window. The button appear where it's suppose to, but is not active. That is, when I click the right mouse button in it, the canvas-menu appear instead. I have used basically the same method as the the demo in the class OLButtonStack. (and yes, I HAVE used /activate!)

Has anyone got a (working) demo of a window with a buttons? I would be very thankful if someone could send me an example to help me understand how things work!

Thanks a lot
Vidar

vidarh@stud.cs.uit.no

ks@tut.fi (Syst{ Kari) (01/15/91)

In article <1991Jan14.123757.22925@hod.uit.no> vidarh@stud.cs.uit.no (Vidar Hanssen) writes:

>   Has anyone got a (working) demo of a window with a buttons? I would be
>  very thankful if someone could send me an example to help me understand
> how things work!

This is a very simple example:

/menu {
    (Example)
    [
	(first) null { (1. taken) = }
	(second) null { (1. taken) = }
    ]
	{ (default taken) = }
}  def
/win [AbsoluteBag] [] framebuffer /new OpenLookBaseFrame send def
100 400 400 400 /reshape win send
/m [100 100 menu OpenLookButtonStack ] /addclient /client win send send
/activate win send
/map win send



--
% This article represents my personal views.
% NeWS flash: "X is the Fortran of windowing systems."
% Kari Systa, Tampere Univ. Technology, Box 527, 33101 Tampere, Finland
% work: +358 31 162585      fax: +358 31 162913      home: +358 31 177412