[fxruby-users] Creating widgets after initialize of the main window

Krisztián Káldi krisztian.kaldi at triton.hu
Mon Nov 15 03:43:56 EST 2004

Hello there

I have just got into learning FXRuby, and have a problem I can not solve - last night at #ruby-lang could not help either. I'm sure you can easily solve it :)

Unfortunately I don't have the actual source code here, but the point is the following:

def ininialize(app)

   @frame = new FXVerticalFrame.new self, ...
   @btn1 = new FXButton @frame, ...
   @btn2 = new FXButton @frame, ...

   @btn1.connect(SEL_COMMAND) do |a,b,c|
     @btn3 = new FXButton @frame, ...
     puts "i'm here"


My problem: @btn1 and @btn2 buttons are created/shown well, but the @btn3 (which I create in the select event handler of @btn1) is not shown at all, but the execution gets there ("i'm there" is printed).

I tried the following - without success:
- creating FXListBoxs instead of FXbuttons
- calling @btn3.create explicitly
- playing around with update, repaint, forceRefresh, ...

Thank you in advance.

   Krisztian Kaldi

More information about the fxruby-users mailing list