Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Browse windows
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Divers
Thread ID:
00216852
Message ID:
00216896
Vues:
26
>>>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


Thanks, but that's more complicated than just making a grid. :)

Which is what I ended up doing.

Thanks, though,

Michelle
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform