Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

ruby FX problem

0 views
Skip to first unread message

Cool Wong

unread,
Sep 3, 2007, 9:59:47 PM9/3/07
to
How can i build scroll bar in my GUI project??? How to use the
FXScrollWindow???
--
Posted via http://www.ruby-forum.com/.

Joel VanderWerf

unread,
Sep 3, 2007, 10:17:34 PM9/3/07
to
Cool Wong wrote:
> How can i build scroll bar in my GUI project??? How to use the
> FXScrollWindow???

There is an example that comes with FXRuby that might help you:
examples/mdi.rb.

If that doesn't answer your question, come on back and ask it here;
there's plenty of folks around who can help.

There's also the fxruby users list. See http://www.fxruby.org to find
out how to subscribe.

--
vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407

Cool Wong

unread,
Sep 3, 2007, 10:46:31 PM9/3/07
to
Joel VanderWerf wrote:
> Cool Wong wrote:
>> How can i build scroll bar in my GUI project??? How to use the
>> FXScrollWindow???
>
> There is an example that comes with FXRuby that might help you:
> examples/mdi.rb.
>
> If that doesn't answer your question, come on back and ask it here;
> there's plenty of folks around who can help.
>
> There's also the fxruby users list. See http://www.fxruby.org to find
> out how to subscribe.

Ya, i can find the example, thanks for example. But there more
complex... Any simple example for me???

Joel VanderWerf

unread,
Sep 3, 2007, 11:12:01 PM9/3/07
to

Sure, this one is about as simple as I can make it:

require 'fox16'

include Fox

class ScrollWindow < FXMainWindow
def initialize(*args)
super

scroll_window = FXScrollWindow.new(self, LAYOUT_FILL_X|LAYOUT_FILL_Y)
matrix = FXMatrix.new(scroll_window, 2, MATRIX_BY_COLUMNS)
100.times do |i|
FXLabel.new(matrix, "foo")
FXLabel.new(matrix, "bar")
end
end

def create
super
show
end
end

class ScrollApp < FXApp
def initialize
super("Scroll", "TEST")
ScrollWindow.new(self, "Scroll")
end
end

app = ScrollApp.new
app.create
app.run

Cool Wong

unread,
Sep 4, 2007, 12:15:52 AM9/4/07
to
Joel VanderWerf wrote:
> Cool Wong wrote:
>>> There's also the fxruby users list. See http://www.fxruby.org to find
>>> out how to subscribe.
>>
>> Ya, i can find the example, thanks for example. But there more
>> complex... Any simple example for me???
>
> Sure, this one is about as simple as I can make it:
>


Ya. I can run and work ur coding. This more easier for me, hehe... Thank
you very much...

0 new messages