[fxruby-users] Is it possible to create a pane dynamically

Soumyanath soumyanath.c at gmail.com
Fri Aug 28 07:55:15 EDT 2009


I am new to FXRuby so excuse me for this stupid question. I need to
enter many different data and trying to create a vertical pane
dynamically using response from a SQL query.

I want these input form to appear in my main window. Created a class
based on FXMainWindow.

--------------- Code snippet ------------
class DbFace < FXMainWindow
    attr_writer \

  def addNew
    vPane = FXVerticalFrame.new(@hWnd)
    dTitle = FXLabel.new(vPane, at title,nil,LAYOUT_FILL_ROW)

  def initialize(app, pane)
    @hWnd = pane
    @hApp  = app
----------- End -----------------

I use this class from inside my program. As:

 	book = DbFace.new(app, @frame)
	book.title = "Add new record"

The new dialog fields do not show up with this. Please tell me if I am
doing something wrong. Any example will be great.

More information about the fxruby-users mailing list