Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Label in a column
Message
From
24/10/2005 03:05:50
 
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Environment versions
Visual FoxPro:
VFP 8
Miscellaneous
Thread ID:
01061469
Message ID:
01061538
Views:
18
>>Why do you want to? You can always get a textbox to look and behave like a label.
>I have to use because i have a font that i must use that and it's not a true type font.I have an ocx to read with the font but VFP text boxes show nothin with that font.
>I tried to put this ocx instead of VFP text box in grid but the problem is that it shows it's value when you click on it.I try Microsoft form text box too and it's like that.
>now if it's possible please tell me how?

1. you can try with OCX and set Column.Sparse = .F.

For label issue,
this is a example ( but left/right with keyboard doesn't work )
CLEAR

PUBLIC oform1

oform1=NEWOBJECT("form1")
oform1.Show
RETURN

DEFINE CLASS form1 AS form

	allowoutput = .F.
	Height = 417
	Width = 605
	Autocenter = .T.
	
	ADD OBJECT GR AS myGrid WITH ;
		Height = 368, ;
		Left = 4, ;
		Top = 4, ;
		Width = 554
		
	PROCEDURE Load
		CREATE CURSOR bugfocus (f1 C(30), f2 C(40))
		FOR K=1 TO 100
			INSERT INTO bugfocus VALUES (TTOC(DATETIME())+STR(SECONDS()%1,4,4),TTOC(DATETIME())+STR(SECONDS()%1,4,4))
		NEXT
		LOCATE
	ENDPROC

	PROCEDURE GotFocus
		? PROGRAM()
	ENDPROC

ENDDEFINE

DEFINE CLASS myGrid AS Grid

	ADD OBJECT C1 AS COLUMNLABEL WITH Width = 150;
	,DynamicFontShadow = "this.C1.LL.Refresh()"

	ADD OBJECT C2 AS COLUMNLABEL WITH Width = 150;
	,DynamicFontShadow = "this.C2.LL.Refresh()"
	
ENDDEFINE

DEFINE CLASS COLUMNLABEL AS Column
	Bound  = .F.
	Sparse = .F.
	
	ADD OBJECT HEADTEXT	AS HEADER
	
	ADD OBJECT ll AS Label
	
	PROCEDURE ll.Refresh
		this.Caption = EVALUATE(this.Parent.ControlSource)
		
ENDDEFINE
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform