Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
_CUROBJ to ActiveControl
Message
From
06/01/1998 14:56:12
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
06/01/1998 14:43:34
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00069672
Message ID:
00069863
Views:
44
>>>I use the up & downarrow keys to toggle through records. With FPW I could use the
>>>_CUROBJ=OBJNUM(FieldName) to return the cursor to the current field. I know with
>>>VFP5 I should use the ActiveControl property but I'm not sure how it's used. I'm
>>>inserting the code in the keypress method.
>>>
>>>TIA
>>>
>>>Chris
>>
>>If you gonna do something with other objects and then return to curobj set a form property to hold the reference - say oCurObject :
>>
>>*
>>* Keypress event
>>thisform.oCurObject = this && Save the reference
>>...
>>thisform.oCurObject.setfocus()
>
>I have 3 text boxes on the form (Text1, Text2, Text3)
>
>I tried this in the keypress event for Text2
>
>IF nKeyCode=24
> SKIP 1
> IF EOF()
> GO BOTTOM
> ENDIF
> This.Text2.SetFocus
>ENDIF
>
>It jumps to the next field (Text3 - tabindex 3) but
>if I use this in keypress event
>
>IF nKeyCode=24
> SKIP 1
> IF EOF()
> GO BOTTOM
> ENDIF
> This.Text1.SetFocus
>ENDIF
>
>It returns the cursor to Text2. Is there a way I could say return cursor
>to TabIndex-1 or am I just missing something?
nKeyCode= 24 DnArrow ? Well doesn't matter.
Just add a "nodefault" after if ..
Ç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