Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Code that makes a column visible
Message
From
24/11/2006 06:13:07
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01172161
Message ID:
01172230
Views:
11
>>>Hi. I have code in a method that reads someething like:
>>>ThisForm.pgItems.conItems.grdQuoteList.Column9.visible = .t.
>>>
>>>When I run the code, I get the message that Column9 is not found.
>>>
>>>Does anyone have any ideas how I can make column9 visible (with no error).
>>>
>>>Thanks, Randy
>>
>>Randy,
>>In VFP7 making a column.visible = .f. is nonsense
>
>Well not really. It leaves the column as-is but disappears the data in the column.
>Randy, you sure you haven't renamed the column like ".colQuoteVal"?)
>
>You can always access the nth column via the .columns() array.
>
>i.e. ThisForm.pgItems.conItems.grdQuoteList.Columns( 9).visible = .t.
>
>However it won't disappear the col. I'd suggest Fabio's .Width soln.
>
>>>
>
>
>so I think you don't have that column at all. If you mean you have less than 9 columns then you can do:
>>.ColumnCount = 9
>>
>>Cetin

That's what I meant! "It leaves the column as-is but disappears the data in the column." so isn't it nonsense to use visible = .f.? IOW it is not invisible now. It's still there visible.

I thought the grid had less than 9 columns now (it was a workaround for column.visible=.f. in VFP7) hence no column9 nor Columns(9).

PS: Width = 0 was not a solution. Just try with a grid that has many columns and try setting all but first and last to inivisible using width method. The only reliable solution was ordering visible columns to leftmost positions and setting columncount to visible count.
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
Reply
Map
View

Click here to load this message in the networking platform