Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Listbox Displayed Columns
Message
From
27/06/2001 13:13:43
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
27/06/2001 13:07:03
Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00524206
Message ID:
00524297
Views:
23
This message has been marked as the solution to the initial question of the thread.
>>>>>I searched the threads, but to no avail... A Listbox based on SQL has 5 columns and displays all columns correctly when clicked and the list is displayed, but only shows the first column after selecting an item. I'm sure I'm just missing something simple here. Thanks!
>>>>>
>>>>>Regards, Renoir
>>>>
>>>>Renoir,
>>>>If you mean combo then no you don't. It's default behaviour. Combine few fields to 1 column to show.
>>>>Cetin
>>>
>>>I meant Listbox. Ok, I tried to concantenate fields and show using the DisplayValue, but it doesn't work. Where do I put the combined fields?
>>
>>Renoir,
>>No I meant for combo. Then it's something else - Columncount ?
>>What are the nondefault properties ?
>>Cetin
>
>Cetin,
>
>Properties:
>
>ColumnCount: 5
>ColumnLines: .T.
>ColumnWidths: 100,100,100,200,20
>Enabled: .T.
>FirstElement: 1
>RowSource: SELECT code, type, desc, mfsystem FROM prgfiles\codes INTO CURSOR vCodesList
>RowSourceType: 3 - SQL Statement
>SelectOnEntry: .T.
>Style: 2 - Dropdown List
>
>I want to display all fields after item is selected.
>
>Renoir

Style - 2 ?
Renoir listboxes do not have style property this is combo and it's default behaviour. Back to the combining :

ColumnCount: 1 && Show only combined
RowSource: SELECT code+type+desc+mfsystem, code,type,desc,mfsystem FROM prgfiles\codes INTO CURSOR vCodesList
RowSourceType: 3 - SQL Statement
Style: 2 - Dropdown List

You can get any value back directly using :
vCodesList.code

You don't need to check Listindex etc.
However if this has controlsource than adjust boundcolumn to correct one.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform