[fxruby-users] Help setting column size of FXText field

Anders Schneiderman SCHNEIDA at seiu.org
Fri Feb 11 09:23:54 EST 2005


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



More information about the fxruby-users mailing list