require 'phi'

include Phi

tform = Form.new

ps1_resize = proc do |sender|
  p "page_scroller1"
end

ps2_resize = proc do |sender|
  p "page_scroller2"
end

pnl_resize = proc do |sender|
  p "panel"
end

tbr_resize = proc do |sender|
  p "toolbar"
end

=begin
page_scroller1 = PageScroller.new tform
page_scroller1.align = Phi::AL_TOP
page_scroller1.color = CL_WHITE
page_scroller1.on_resize = ps1_resize

panel = Panel.new page_scroller1
panel.align = Phi::AL_CLIENT
panel.on_resize = pnl_resize
panel.caption = '123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTU'
=end

page_scroller2 = PageScroller.new tform
page_scroller2.align = Phi::AL_TOP
page_scroller2.color = CL_WHITE
page_scroller2.on_resize = ps2_resize
page_scroller2.auto_scroll = false

toolbar = ToolBar.new page_scroller2
toolbar.align = Phi::AL_CLIENT
toolbar.on_resize = tbr_resize
toolbar.show_captions = true
toolbar.color = CL_BLACK
p toolbar.parent
=begin
0.upto(8) {|i|
  toolbutton = ToolButton.new toolbar
  toolbutton.caption = "ToolButton" + i.to_s
  toolbutton.style = Phi::TBS_CHECK
p toolbutton.parent
}
p toolbar.buttons(0).caption
=end
tform.show

Phi.mainloop
