B
Bart Masschelein
Hello there,
I started experimenting with Tk, out of the box, with the basic
examples, and I loved the way to implement menus:
menu_spec_1 =
[ [ ['main 1', 0],
['1 sub', 0]
],
[ ['main 2', 0],
['2 sub', 0]
]
]
and then calling
TkMenubar.new(root, menu_spec_2, 'tearoff'=>false).pack('fill'=>'x',
'side'=>'top')
However, I wanted to have a submenu under a menu item, so I tried
menu_spec_2 =
[ [ ['main 1', 0],
['1 sub', 0]
],
[ ['main 2', 0],
[ ['2 sub', 0],
['2 sub sub', 0]
]
]
]
This doesn't work, Ruby gives me an error. So apparently this is not
supported. Has sbdy already extended the menuspec.rb file to support
this behaviour, or would this straightforward to do, or even feasible
(I'm just starting with Ruby)?
I want to avoid the 'hassle' of creating each menu item itself, and then
structuring them. Been there, done that, in other languages.
happy Rubying,
Bart
I started experimenting with Tk, out of the box, with the basic
examples, and I loved the way to implement menus:
menu_spec_1 =
[ [ ['main 1', 0],
['1 sub', 0]
],
[ ['main 2', 0],
['2 sub', 0]
]
]
and then calling
TkMenubar.new(root, menu_spec_2, 'tearoff'=>false).pack('fill'=>'x',
'side'=>'top')
However, I wanted to have a submenu under a menu item, so I tried
menu_spec_2 =
[ [ ['main 1', 0],
['1 sub', 0]
],
[ ['main 2', 0],
[ ['2 sub', 0],
['2 sub sub', 0]
]
]
]
This doesn't work, Ruby gives me an error. So apparently this is not
supported. Has sbdy already extended the menuspec.rb file to support
this behaviour, or would this straightforward to do, or even feasible
(I'm just starting with Ruby)?
I want to avoid the 'hassle' of creating each menu item itself, and then
structuring them. Been there, done that, in other languages.
happy Rubying,
Bart