Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Code that makes a column visible
Message
From
24/11/2006 11:31:38
 
 
To
23/11/2006 17:41:00
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:
01172280
Views:
17
>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


You might find this handy. A popup menu if you rightclick on a header.
DEFINE CLASS BaseHeader AS HEADER
	PROCEDURE RIGHTCLICK
	LOCAL laMenu[4], loShortCutMenu AS menulib OF Utility

	laMenu[1]	= "\<Hide Column"
	laMenu[2]	= "\<Show All Columns"
	laMenu[3]	= "\-"
	laMenu[4]	= "E\<xit Menu"

	* from the FoxPro Utility.vcx
	* better as a property of the grid.
	loShortCutMenu = CREATEOBJECT("menulib")
	loShortCutMenu.ShowMenu(@laMenu)

	DO CASE
		CASE BAR() = 1
			* go back to the column and hide it
			THIS.PARENT.VISIBLE = .F.
		CASE BAR() = 2
			* If you want to see those columns you already made invisible
			FOR EACH oColumn AS COLUMN IN THIS.PARENT.PARENT.COLUMNS
				oColumn.VISIBLE	= .T.
			ENDFOR
	ENDCASE
	ENDPROC
ENDDEFINE
Gordon de Rouyan
DC&G Consulting
Edmonton, Alberta
Email: derouyag@shaw.ca
Previous
Reply
Map
View

Click here to load this message in the networking platform