#!ruby -Ks

# 634_vcl OK
# 635a    NG

require "phi" ; include Phi
require "rgui"

class FormX < Form
  def on_resize
    @panel.layout if @panel
  end
  def initialize ( *args )
    super(*args)
    @panel = RGUI::Panel.new self
    @panel.add(
      RGUI::Hbox.new.add(*[
        @btn_ok     = Button.new( @panel, :btn_ok , "ok" ),
      ])
    )
    Phi.new_menu( self, :menu, [
      Phi.new_item('&Color' , '' , :mi_color),
    ])
  end

end

##form_x = FormX.new  # OK
##form_x.show
FORM_X = FormX.new    # NG
FORM_X.show
mainloop

