Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problems with Focus
Message
From
10/08/2000 06:06:51
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Problems with Focus
Miscellaneous
Thread ID:
00403302
Message ID:
00403302
Views:
40
I have a small application that runs 1 form. The form contains a single pageframe that contains 5 pages.

The 1st page, Browse, contains a grid which displays data from a view. Also on the page is a command group to allow the user to add, edit, quit, etc. There is also a text box that the user can enter a value & the application will then search the data for that value & move the record pointer to the appropriate record.

The 2nd page, Details, shows the selected record from the 1st page in more detail. The user can change data & so on, but to save the data the Save button must be pressed. If the user presses another page tab, any changes are lost (using TableRevert).

The other pages use different tables, bases on the selected record from the 1st page.


1st Problem:

Now, the problem I have is one of Focus. When the user selects the text box on the 1st page, giving it focus & does not enter a value & instead clicks on the 2nd page to view the current record, the application shows the page, but it's impossible to tab through the controls shown on the form. None of them seem to gain focus.

When returning to the 1st page, it would appear that the text box still retains the focus. The code to search the data is contained in the text box's LostFocus event. If the data is found, the focus is set to the grid.

It's as though the text box isn't releasing the focus to the other parts of the application that the User is trying to move to.


2nd Problem.

To move from the 1st page, Browse, to the 2nd page, Details, the User has 2 options:

1
Press the Details page tab.

2
Press the Details command button, which simply sets the ActivePage to 2.


The problem is when returning to the 1st page, Details. When on the 2nd page, the User can simply press the Browse page tab, or use the Save command button. When using the Browse tab, the 1st page is shown, but the Browse page tab seems to have focus, ie the Browse text is contained in a box. If the User then presses the Details tab again, 2 clicks are required.

This only occurs when using the command button to move from the 1st page, Browse, to the 2nd page, Details. It does not occur when using the Details tab.

Any thoughts on how to control the focus? Also, hope this wasn't too long!

Andy Crawshaw
Next
Reply
Map
View

Click here to load this message in the networking platform