Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Page Frame don't get focus
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00567800
Message ID:
00567926
Views:
13
>Hi Bret,
>
>No I never used activepage.
>
>Where do you place this commande. In the activate event?
>
>Thanks,
>Diane Robitaille

I dont know your code well enough to tell you, but my forms have pageframes on them and when the user presses a button or chooses an option I have code that does things like:
* Requery the list we will use
THIS.PARENT.PARENT.PAGE2.C40lstPssRecords.REQUERY()
*
* Set the active page
THISFORM.C40pgEngineerMaint.ACTIVEPAGE = 2
Sometimes I put code in the beforerefresh event that checks for certain conditions and depending on the conditions I send them to the page they need. Like:
  IF THISFORM.lPromptUser = .F. AND THISFORM.lusermadeinitialchoice = .T.
    * The user made the initial choice after they have been prompted
    * So lets set the active page correctly
    * Once the Active Page is set to 2 we cannot setfocus anymore because
    IF THISFORM.C40pgItems.ACTIVEPAGE = 1
      * They Just came from beeing prompted so we will active the correct page
      * and set focus
      THISFORM.C40pgItems.ACTIVEPAGE = 2
      THISFORM.C40pgItems.Page2.C40grdItc.SETFOCUS()
    ENDIF
  ENDIF
It is just whatever will work for the reason you want to change pages. Sound like you change pages based on KeyPress Event. You may have to have one central place that looks for keystrokes and from there send them to the correct page.
Bret Hobbs

"We'd have been called juvenile delinquents only our neighborhood couldn't afford a sociologist." Bob Hope
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform