hi, could any1 help me to figure out how to preserve selections in extended listbox please? f.e. i have a button to move up/down selected item(s), but after i click it and selection goes up or down i loose selections. i''d like to create an array which would hold those selections via get_selections(), but i dont see any method to select an item in a listbox. Best regards M.Szatanik -- Posted via http://www.ruby-forum.com/.
If you really needs selection, perhaps you can use checklistbox ? On Tue, May 18, 2010 at 2:07 PM, Maciej Szatanik <lists at ruby-forum.com>wrote:> hi, > > could any1 help me to figure out how to preserve selections in extended > listbox please? > > f.e. i have a button to move up/down selected item(s), but after i click > it and selection goes up or down i loose selections. > > i''d like to create an array which would hold those selections via > get_selections(), but i dont see any method to select an item in a > listbox. > > Best regards > M.Szatanik > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > wxruby-users mailing list > wxruby-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/wxruby-users >-- Suka linux? Kunjungi blog saya http://penguinroad.blogspot.com -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/wxruby-users/attachments/20100518/b2631923/attachment-0001.html>
will thought it over, at least its a solution :) thx a lot. -- Posted via http://www.ruby-forum.com/.
On 18/05/2010 08:07, Maciej Szatanik wrote:> could any1 help me to figure out how to preserve selections in extended > listbox please? > > f.e. i have a button to move up/down selected item(s), but after i click > it and selection goes up or down i loose selections. > > i''d like to create an array which would hold those selections via > get_selections(), but i dont see any method to select an item in a > listbox. >The method you want is select() - ListBox inherits it from Wx::ControlWithItems. alex
Alex Fenton wrote:> On 18/05/2010 08:07, Maciej Szatanik wrote: >> could any1 help me to figure out how to preserve selections in extended >> listbox please? >> >> f.e. i have a button to move up/down selected item(s), but after i click >> it and selection goes up or down i loose selections. >> >> i''d like to create an array which would hold those selections via >> get_selections(), but i dont see any method to select an item in a >> listbox. >> > The method you want is select() - ListBox inherits it from > Wx::ControlWithItems. > > alexthx a lot :* will check it out right away. from now on i will always check those damn parents :P -- Posted via http://www.ruby-forum.com/.
Maciej Szatanik wrote:> Alex Fenton wrote: >> On 18/05/2010 08:07, Maciej Szatanik wrote: >>> could any1 help me to figure out how to preserve selections in extended >>> listbox please? >>> >>> f.e. i have a button to move up/down selected item(s), but after i click >>> it and selection goes up or down i loose selections. >>> >>> i''d like to create an array which would hold those selections via >>> get_selections(), but i dont see any method to select an item in a >>> listbox. >>> >> The method you want is select() - ListBox inherits it from >> Wx::ControlWithItems. >> >> alex > > thx a lot :* will check it out right away. > from now on i will always check those damn parents :Pyup, it works, thanks again. An example if any1 is interested. Array.each do |cell| @listbox.select(cell) end -- Posted via http://www.ruby-forum.com/.