[Fxruby-users] Usage FXList : makeItemVisible
Status: Inactive
Brought to you by:
lyle
|
From: SIMOKAWA h. <h-s...@aa...> - 2003-10-21 06:58:40
|
Hello all,
I am trying to do something with FxRuby, but it is not working for me.
I want to scroll to bring a item into view, but I cannot it.
Below is my code.
Thanks for the help in advance
SIMOKAWA, hajime (male,japan)
require 'fox'
include Fox
class ListTestWindow < FXMainWindow
def initialize(app)
super(app, "fxtest", nil, nil, DECOR_ALL, 0, 0, 100, 100)
@lst = FXList.new(self,4,nil,0,LIST_NORMAL |LAYOUT_FILL_X)
@lst.appendItem '0'
@lst.appendItem '1'
@lst.appendItem '2'
@lst.appendItem '3'
@lst.appendItem '4'
@lst.appendItem '5'
@lst.appendItem '6'
@lst.appendItem '7'
@lst.appendItem '8'
@lst.appendItem '9'
@lst.makeItemVisible 7
end
def create
super
show(PLACEMENT_SCREEN)
end
end
if __FILE__ == $0
app = FXApp.new("FoxTest", "FoxTest")
ListTestWindow.new(app)
app.create
app.run
end
|