Lyle Johnson wrote:

> 
> Right offhand, I'm not sure, but the problem may be that you're
> putting the FXImageView (which itself is a subclass of FXScrollArea)
> inside an FXScrollArea. Try making the FXImageView a child of the main
> window (i.e. eliminate the "firstWindow" scroll area in the middle.
> 
> Also compare against the imageviewer.rb example program that comes
> with FXRuby to see what you might be doing differently.
> 
> Hope this helps,
> 
> Lyle

Thanks for your help.  Just in case anyone searches this in the future, 
I'll post my working code.  The key was loading the image using 
FXFileStream.  Also, removing the scroll area produced the same results:

require 'fox16'
include Fox

theApp = FXApp.new

theMainWindow = FXMainWindow.new(theApp, "Hello", nil, nil, DECOR_ALL, 
400, 400)
imagebox = FXVerticalFrame.new(theMainWindow,
  FRAME_SUNKEN|FRAME_THICK|LAYOUT_FILL_X|LAYOUT_FILL_Y)
imageView = FXImageView.new(imagebox, nil, nil, 0,
  VSCROLLER_ALWAYS|LAYOUT_FILL_X|LAYOUT_FILL_Y)
image = FXJPGImage.new(theApp, nil)
FXFileStream.open("gm.jpg", FXStreamLoad) {|stream| 
image.loadPixels(stream)}
image.create
imageView.image = image

theApp.create
theMainWindow.show
theApp.run

-- 
Posted via http://www.ruby-forum.com/.