ruby FX problem

C

Cool Wong

How can i build scroll bar in my GUI project??? How to use the
FXScrollWindow???
 
J

Joel VanderWerf

Cool said:
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.
 
C

Cool Wong

Joel said:
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???
 
J

Joel VanderWerf

Cool said:
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:

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
 
C

Cool Wong

Joel said:
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...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,189
Latest member
CryptoTaxSoftware

Latest Threads

Top