Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Move past hot key when using pageframe
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00907949
Message ID:
00907954
Views:
7
>When I use a hot key to change pages in a pageframe, I see that the focus stays on the top part of the tabbed page and does nto go to the first textbox. How do I automatically get the hot key to also move the focus to the first textbox on the page?

Loop through the controls on the page (through the Controls collection) and SetFocus to whatever control that has a TabIndex of 1 and is Enabled and Visible.
FOR EACH oCtrl IN this.Controls
  IF PEMSTATUS(oCtrl,"TabIndex",5)
    IF oCtrl.Enabled AND oCtrl.Visible AND oCtrl.TabIndex=1
      oCtrl.SetFocus()
      EXIT
    ENDIF
  ENDIF
ENDFOR
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Previous
Reply
Map
View

Click here to load this message in the networking platform