Anders Schneiderman
2005-Feb-11 09:19 UTC
[fxruby-users] Help setting column size of FXText field
How do I go about setting the size of an FXText field? I''m trying to create a screen that will look something like: Output Area Log Area ------- Command Line ----------- My code to create the output and log areas is: ================================# Main output window and Log Window topFrame = FXHorizontalFrame.new(mainFrame, LAYOUT_SIDE_TOP|FRAME_NONE|LAYOUT_FILL_X|LAYOUT_FILL_Y) # Create main window w/ titled border mainBox = FXGroupBox.new(topFrame, "Main Window", GROUPBOX_TITLE_LEFT|FRAME_RIDGE|LAYOUT_FILL_X|LAYOUT_FILL_Y) @main = FXText.new(mainBox, nil, 0, TEXT_WORDWRAP|LAYOUT_FILL_X|LAYOUT_FILL_Y) logBox = FXGroupBox.new(topFrame, "Log/Help", GROUPBOX_TITLE_LEFT|FRAME_RIDGE|LAYOUT_FILL_X|LAYOUT_FILL_Y) @log = FXText.new(logBox, nil, 0, TEXT_WORDWRAP|LAYOUT_FILL_X|LAYOUT_FILL_Y) ================================ How do I set the size of main and log? Right now they evenly split the screen, whereas I want main to be about 75% of the screen. The closest I could find was a method called visCols - e.g., visCols = 60 - but when I tried it I got the following error: c:/ruby/lib/ruby/gems/1.8/gems/fxruby-1.2.2-mswin32/lib/fox12/aliases.rb:4369:in `visCols='': undefined method `setVisCols'' for :Fox::FXText (NoMethodError) Thanks, Anders Schneiderman