Preserve selections

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

If you really needs selection,
perhaps you can use checklistbox ?

will thought it over, at least its a solution :slight_smile: thx a lot.

Alex F. wrote:

On 18/05/2010 08:07, Maciej S. 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 :stuck_out_tongue:

On 18/05/2010 08:07, Maciej S. 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

Maciej S. wrote:

Alex F. wrote:

On 18/05/2010 08:07, Maciej S. 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 :stuck_out_tongue:

yup, it works, thanks again.
An example if any1 is interested.

      Array.each do |cell|
        @listbox.select(cell)
      end