Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to force Active Control
Message
From
11/09/1998 11:07:33
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00135484
Message ID:
00135487
Views:
10
>Hi all,
>
>This *seemed* simple enough but I'm stumped. I have a form with 2 comboboxes (and a label for each) at the top, and a pageframe beneath it. When the user hits a AddNew button, this same form goes into data entry mode. So after the AddNew button sets up the form for data entry, I need to add the following functionality without changing existing AddNew functionality:
>
>-I need to disable the 2 comboboxes above (and outside of) the PageFrame, Make Page1 the Active Page, And make the first control on Page1 the Active control.
>
>Disable comboboxes - no problem
>Make Page1 active page - no problem
>Make the first Control on Page1 active - weirdness
>
>It seems (no matter what I do) that the first disabled combo is under the impression of being the active control because when I run the form I see no cursor outline indicating an active control, and if I hit the TAB key the first disabled combo suddenly shows a value and the cursor moves to the caption of Page1. I've tried changing TabStops, TabIndex, and Zorder to no avail. Even tried KEYBOARD '(TAB)' to simulate hitting the tab key twice to get to the 1st control on Page1 and nothing seems to work. Any ideas how I can code something in my AddNew method that basically says to the form "go here and make this control active" ?
Hi Roxanne,
Try Addnew.click code modification :
dodefault()
thsiform.mypageframe1.activepage = 1
thisform.mydesiredcontrol.setfocus()
Cetin
Ç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
Reply
Map
View

Click here to load this message in the networking platform