require "phi-all"
require "phi"
form = Phi.load_from_dfm("C:/Program Files/Borland/Delphi6/Projects/Unit1.dfm")

db_grid1 = form.db_grid1                   # Delphiで作ったモノ
# db_grid1 = Phi::DBGrid.new(form, :grid)  # 自前で作るモノ

table = Phi::Table.new( Phi::Database.new('DBDEMOS') , 'biolife.db' ).open
data_source = Phi::DataSource.new table
db_grid1.align = Phi::AL_CLIENT
db_grid1.data_source = data_source
form.show
load "control_tree.rb"
db_grid1.instance_eval "p @events"
Phi.mainloop
