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
on 2010-05-18 09:07
on 2010-05-18 14:19
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
on 2010-05-18 14:22
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 :P
on 2010-05-18 15:25
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 :P yup, it works, thanks again. An example if any1 is interested. Array.each do |cell| @listbox.select(cell) end
Please log in before posting. Registration is free and takes only a minute.
Existing account
(Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
Log in with Google account | Log in with Yahoo account
No account? Register here.