Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Disabeling list-items from rowsource
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00722550
Message ID:
00722552
Views:
21
Hi!

Assume "this" is a list box.
i = {index of "Simon" item in list}
this.List[i] = '\' + this.List[i]
Run above code after list box values are loaded. For example, after the calling of Requery() method of list box.

HTH.

>Hi,
>
>Suppose I have the following table:
>table1
>------
>id name active
>1 'Erik' .T.
>2 'John' .T.
>3 'Simon' .F.
>4 'Eddie' .T.
>
>Now I have a listbox with the rowsource property set to:
>'IIF( !table1.active, "\", "" ) + table1.name'
>
>and rowsourcetype set to 6 (Fields)
>
>I want Simon to be in the listbox, but not selectable (that is, disabled).
>I know you can disable items by putting a '\' in front of it.
>
>But above code doesn't work. My listbox displays:
>Erik
>John
>\Simon
>Eddie
>
>All items are enabled.
>
>How can I disable Simon, WITHOUT manually adding all the items to the list (in the init or refresh) with addListItem?
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform