I'm new to FXRuby, and I'm having a problem with displaying images. I'm
simply trying to display an image in a vertical scroll window, with the
end result being a program that shows multiple images with vertical
scrolling. I can get button icons to work just fine. I have tried
using both FXImageView and FXImageFrame. What am I doing wrong? A
sample of my code is:
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
···
On 1/16/07, Raj Sahae <rajsahae@gmail.com> wrote:
I'm new to FXRuby, and I'm having a problem with displaying images. I'm
simply trying to display an image in a vertical scroll window, with the
end result being a program that shows multiple images with vertical
scrolling. I can get button icons to work just fine. I have tried
using both FXImageView and FXImageFrame. What am I doing wrong? A
sample of my code is:
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: