From: Dalibor S. <da...@in...> - 2003-10-21 08:12:56
|
Hi. The method makeItemVisible takes a tree item as the argument - not the item index. Try replacing your code with: item7 = @lst.appendItem '7' @lst.appendItem '8' @lst.appendItem '9' @lst.makeItemVisible item7 Regards, Dalibor -- Dalibor Sramek http://www.insula.cz/dali | In the eyes of cats, dal...@in... | all things belong to cats. Quoting SIMOKAWA hajime <h-s...@aa...>: > 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 > > > > ------------------------------------------------------- > This SF.net email is sponsored by OSDN developer relations > Here's your chance to show off your extensive product knowledge > We want to know what you know. Tell us and you have a chance to win $100 > http://www.zoomerang.com/survey.zgi?HRPT1X3RYQNC5V4MLNSV3E54 > _______________________________________________ > Fxruby-users mailing list > Fxr...@li... > https://lists.sourceforge.net/lists/listinfo/fxruby-users > |