[Fxruby-users] ScrollWindow confusion
Status: Inactive
Brought to you by:
lyle
|
From: Daniel S. <da...@pr...> - 2004-03-05 05:58:49
|
I've been playing around with the scrollwindow widget, and it's causing
me much confusion. Whatever I try to put into the scrollwindow seems to
get resized to fit within the scroll window, regardless of what layout
hints I give it.
How do you put something bigger than a scrollwindow into the
scrollwindow without shrinkage?
Below is a demonstration of my problem:
----
require 'fox'
include Fox
class MyWindow < FXMainWindow
=20def initialize (theApp)
=20 super(theApp, "test", nil, nil, DECOR_ALL, 0, 0, 300, 300)
=20 scroll =3D FXScrollWindow.new(self, LAYOUT_FILL_X|LAYOUT_FILL_Y)
=20 canvas =3D FXCanvas.new(scroll, nil, 0, LAYOUT_EXPLICIT, 0, 0, 600, 6=
00)
=20 canvas.connect(SEL_PAINT) {
=20 FXDCWindow.new(canvas) { |dc|
=20 dc.foreground=3D"red"
=20 dc.fillRectangle(0,0,canvas.width, canvas.height)
=20 }
=20 }
=20end
=20def create
=20 super
=20 show(PLACEMENT_SCREEN)
=20end
end
FXApp.new("test", "test") do |theApp|
=20 MyWindow.new(theApp)
=20 theApp.create
=20 theApp.run
end
#########################################################################=
############
This email has been scanned by MailMarshal, an email content filter.
#########################################################################=
############
|