Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Execute codes in classes inherited area
Message
From
01/11/2002 09:09:34
 
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00717587
Message ID:
00717760
Views:
11
I just tested your code and it works fine opening another form when the user presses F12. Do you by any chance have any key assignments for F12 in your code using ON KEY LABEL or perhaps an F12 Shortcut on your menu that may be overriding it? I also tested it with a F12 hotkey assignment in my menu and the menu's key assignment ran instead of the code in the keypress event of the textbox in the grid.

Tracy

>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
>
>
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform