From: Lyle J. <ly...@kn...> - 2004-03-06 14:22:52
|
On Mar 4, 2004, at 5:07 AM, Hal Fulton wrote: > I'm having trouble dynamically displaying child windows in a parent > window. Hal, I haven't tried to run the code but I think I see the problem. Remember that whenever you construct new windows (or icons, whatever) after the main event loop has started that you also need to call create() on those objects to realize them (i.e. bind the Ruby objects to actual onscreen windows). I think you probably want to modify your show_notes method to look something like this: def show_notes(notes,window) off = 30 # Magic number! bad coding style notes.each_with_index do |note,i| box = FXMDIChild.new(window,note,nil,nil,MDI_NORMAL,0,off*i,0,0) FXText.new(box) box.create # Lyle added this! box.show box.position(10,off*i+6,100,40) end window.recalc end Hope this helps, Lyle |