Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Browse windows
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Miscellaneous
Thread ID:
00216852
Message ID:
00216891
Views:
25
>>I'm writing what's supposed to be a simple app for my use only. I need a picklist, and figured I'd keep it simple and use a browse window like SBT does.
>>
>>My problem is that when I close the browse window, it sets the pointer back to the first record instead of staying where I pointed it.
>>
>>How do I get it to leave the pointer alone?
>>
>>Also, is it possible to make a browse window close when you double click on your selection?
>>
>>Thanks,
>>
>>Michelle
>
>I think a grid would be just as easy, and you have all control.
>
>
>Wayne


Here is how you do an enter key... Jeykey v5.0 works fine with VFP 6.0
I am amazed how backward compatable VFP is to all of the old commands.

-------

IF getrecord()
DoSomething()
ENDIF


FUNCTION getrecord
PRIVATE ;
cKeyId

LOCAL ;
cRetVal

cKeyId = SPACE(1)

ON KEY LABEL ENTER DO breakbrw

BROWSE....

IF LASTKEY() == K_ESC
lRetVal = .F.

ELSE
*--------------------------------------------------
*-- I do not have the problem of the record pointer
*-- being moved at this point. But if you do force
*-- the pointer at this point.
*--------------------------------------------------

IndexSeek([Use cKeyId])
lRetVal = .T.
ELSE

*---------------------------
*-- Clear on key label here.
*---------------------------

RETURN lRetVal
*eof getrecord


FUNCTION breakbrw

WAIT WINDOW NOWAIT 'Selected ' + ;
ALLTRIM(table.field)

cKeyId = table.field

KEYBOARD '{CTRL-W}'

*eof breakbrw
What ben makes tracks for what wil be. Words in the air pirnt foot steps on the groun for us to put our feet in to.

Riddley Walker
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform