[Fxruby-users] Attaching a Canvas to a ScrollArea
Status: Inactive
Brought to you by:
lyle
From: Claus S. <Doc...@gm...> - 2004-05-05 16:22:25
|
I have just recently started using FXRuby (~1 month), and up until this last week I was working mostly with FXTable... However, because FXTable doesn't let me individually set the color of FXTableItems, I tried to rewrite my programs using an FXCanvas and drawing the items myself. I started with the 'bounce.rbw' example that comes with the Ruby installer (using 1.8.0-10). I got the drawing part sorted out. However, I want to put the canvas in a FXScrollArea because eventually it will be larger than the screen... and that's what I'm having trouble with. I assume that I'm probably missing out on something... the program that I started with uses an FXImage to draw the actual image, then puts it on the canvas (or so I understand... please correct me if I'm wrong). I thought that if I put the ScrollArea in the MainWindow and then use it as the parent for the canvas I could scroll the canvas, but something seems to have gon ehorribly wrong along the way. I am unsure as to how the backbuffer (FXImage) part operates. I'd appreciate if someone could enlighten me on this. Attached is the tarball with my program. The part that I'm having problems with starts on line 185. Thank you in advance for any assistance... -CWS |