Forum: wxRuby Preserve selections

509e3a9f710f3715fe165718efb7702c?d=identicon&s=25 Maciej Szatanik (mszatanik)
on 2010-05-18 09:07
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
2aa32559134aa3d596fb749f8ffccde7?d=identicon&s=25 hendra kusuma (Guest)
on 2010-05-18 10:22
(Received via mailing list)
If you really needs selection,
perhaps you can use checklistbox ?
509e3a9f710f3715fe165718efb7702c?d=identicon&s=25 Maciej Szatanik (mszatanik)
on 2010-05-18 11:12
will thought it over, at least its a solution :) thx a lot.
06f6780c99d4a8dd71f2b474082ea9ce?d=identicon&s=25 Alex Fenton (Guest)
on 2010-05-18 14:19
(Received via mailing list)
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
509e3a9f710f3715fe165718efb7702c?d=identicon&s=25 Maciej Szatanik (mszatanik)
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
509e3a9f710f3715fe165718efb7702c?d=identicon&s=25 Maciej Szatanik (mszatanik)
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
This topic is locked and can not be replied to.