> Building a menu with plain STk works fine. Building the same menu with STklos,
> it seems that the menu entries don't get activated and can never be
> selected. Please can somebody explain me what I'm missing here? Thank you!
>.....
> (define bar (make <Frame> :relief "raised" :borderwidth 1))
> (define bar-colors (make <Menu-button> :text "Colors (STklos)"))
> (define bar-colors-m (make <Menu>))
> (set! (menu-of bar-colors) bar-colors-m)
This is due to a hierarchy problem. In fact the Tk toolkits imposes that a
menu
MUST be a decendant of its menu button (otherwise mouse events are not
propagated to it). Consequently, youll have to modify the menu creation with
(make <Menu> :parent bar-colors).
The following line you provide permit to associate the menu to its menu
button. This is no more necessary in 2.1.3 since this is done automatically
when you specify a parent to a menu (and thta this parent is a menu button).
This problem doesn't arose in the STk code since you define your menu
with the name ".bar.colors.m" which is a son of the menu button ".bar.colors"
-- Erick
Received on Tue Oct 11 1994 - 16:19:00 CET
This archive was generated by hypermail 2.3.0
: Mon Jul 21 2014 - 19:38:59 CEST