Hi, 

From: "Mark Volkmann" <volkmann2 / charter.net>
Subject: TkOptionMenu
Date: Sun, 14 Nov 2004 14:44:48 +0900
Message-ID: <020601c4ca0d$0da613f0$0200a8c0@MarkDesktop>
> I'm trying to learn how to use TkOptionButtonmenu and haven't found 

Probably, you said about TkOptionMenubutton. :-)
                                 ^^^^^^^^^^
> Is there a method I can invoke after the constructor to add more than one? 

Unfortunately, the answer is "No". 
However, is it important? You can define such a method very easily. 
For example, please add the followings to your script.
-----------------------------------------------
class TkOptionMenubutton
  alias _add add
  def add(*values)
    values.each{|value| _add(value)}
    self
  end

  alias _insert insert
  def insert(index, *values)
    values.reverse_each{|value| _insert(index, value)}
    #      ^^^^^^^^^^^^ must be reverse order
    self
  end
end
-----------------------------------------------
Then, you can add or insert multiple values at one method call.
e.g. 
-----------------------------------------------
require 'tk'

class TkOptionMenubutton
  alias _add add
  def add(*values)
    values.each{|value| _add(value)}
    self
  end

  alias _insert insert
  def insert(index, *values)
    values.reverse_each{|value| _insert(index, value)}
    self
  end
end

b = TkOptionMenubutton.new(:values=>%w(one two three)).pack
b.add(:seven, :eight, :nine)
b.insert(3, :four, :five, :six)

Tk.mainloop
-----------------------------------------------
-- 
                                  Hidetoshi NAGAI (nagai / ai.kyutech.ac.jp)