Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Execute codes in classes inherited area
Message
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Title:
Execute codes in classes inherited area
Miscellaneous
Thread ID:
00717587
Message ID:
00717587
Views:
42
Hi All,
i have a grid class and "GrdAddnew textbox class KeyPressEvent Code" removing standart textbox and adding own at runtime. But after this for eg. i wantto use this code at the new textbox keypressevent
  if Nkeycode=134  
do form forms\custlist
  endif 
I've tried but there is no action. why ? what should i do ?

TIA

my class codes show below...
* Grid InitEvent Code
FOR EACH oColumn IN this.Columns
   WITH oColumn
      .RemoveObject('Text1')
      .NewObject('text1','GrdAddNew','sdbgrid.vcx') 
     .CurrentControl='Text1'
     .text1.visible=.t. 
     ENDWITH
ENDFOR
* GrdAddnew textbox class KeyPressEvent Code
LOCAL lcAlias
		lcAlias = THIS.PARENT.PARENT.RECORDSOURCE
		DO CASE
			CASE nKeyCode = 24 && '{DNARROW}'
				* 3 Field in an appended record has not been
				* edited or deletion status has not changed for
				* the appended record.
				IF GETFLDSTATE(-1) = REPLICATE("3",FCOUNT(lcAlias)+1)
					NODEFAULT
				ENDIF
			CASE nKeyCode = 5 && '{UPARROW}'
				IF GETFLDSTATE(-1) = REPLICATE("3",FCOUNT(lcAlias)+1)
					TABLEREVERT(.F., lcAlias)
					THIS.PARENT.PARENT.REFRESH
				ENDIF
		ENDCASE
Next
Reply
Map
View

Click here to load this message in the networking platform