Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Execute codes in classes inherited area
Message
From
01/11/2002 12:28:22
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00717587
Message ID:
00717902
Views:
15
>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
>
>
Are you sure :
There is no 'ON key label f12 ...' in effect ?
You wrote the code for your subclassed textbox ?
You're using the subclassed textbox in grid ?

I suspect you write the code in text1.keypress at designtime and later it's replaced with other class textbox.
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
Next
Reply
Map
View

Click here to load this message in the networking platform