Re: Cannot multiselect programmatically?
- From: "Rich" <richhennessy@xxxxxxxxxxxxxx>
- Date: Mon, 19 Sep 2005 14:49:17 -0400
I am just using the semicolon to separate the items in the list (and to end
the list), I could have used a comma but that character actually appears in
a few of the list items. I was using rowsourcetype = 6 and the
thisform.l_cListing was used to hold the subset of the whole list that I
wanted to have preselected automatically.
Rich
"Anders" <anders@anders> wrote in message
news:uIg1xIUvFHA.3860@xxxxxxxxxxxxxxxxxxxxxxx
> Why would your list items end with semicolon (;)? RowSourceType=1 is a
> comma-delimitd list but the comma is not part of the list value.
>
> -Anders
>
> "Rich" <richhennessy@xxxxxxxxxxxxxx> skrev i meddelandet
> news:u5SVIATvFHA.908@xxxxxxxxxxxxxxxxxxxxxxx
>> Hi,
>>
>> I have a list box control on a form that is bound to records in a single
>> column table. I have multiselect turned on and I want to have some of
>> the
>> items in the listbox already selected by default when the form is loaded.
>> I have tried to set the selected() property of the listbox but this does
>> not
>> work for some reason. But the users can select multiple items and it
>> does
>> work. How do I programmatically select multiple items in the list?
>>
>> Here is my code below. This code is in the init of the form and it has
>> no
>> effect on the list except that it results in the list being at the eof().
>>
>> The This.l_clisting property holds a list of the items to be preselected.
>>
>> With This.lstOptions
>> For i = 1 To .ListCount
>> If Alltrim(.List(i)) + ";" $ This.l_cListing
>> .Selected(i) = True
>> Endif
>> Next i
>> Endwith
>>
>>
>> Any help would be greatly appreciated. My code does not work in 6, 7 or
>> 8
>> of VFP.
>>
>> Thanks,
>>
>> Rich
>>
>>
>>
>
>
.
- References:
- Re: Cannot multiselect programmatically?
- From: Rich
- Re: Cannot multiselect programmatically?
- From: Anders
- Re: Cannot multiselect programmatically?
- Prev by Date: Re: Foxpro application stop working under Win XP sp2
- Next by Date: RE: users running the .exe
- Previous by thread: Re: Cannot multiselect programmatically?
- Next by thread: Re: Cannot multiselect programmatically?
- Index(es):
Relevant Pages
|