Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Odd tabbing behavior with custom ComboBox
Message
From
05/01/2009 11:20:09
 
 
To
05/01/2009 11:07:05
Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
01370986
Message ID:
01371048
Views:
19
>>>The custom combo is too complicated to explain here, but it basically is a container with a textbox and some buttons. What is happening is that when it is tabbed into it takes two tabs to get to the next object on the form. Other than the textbox, the TabStop is .F. for the other objects inside the combo. Is it possible that the container itseff is accepting one of the tabs and then the textbox is getting the 2nd one? How can I make sure that the textbox gets the focus when the container/combo is tabbed into, and then leaves the combo/container when the next tab is pressed?
>>>
>>
>>Set TabStop = .F. on skipped container's objects is sufficient.
>
>Actually, it's not. Those are already set to false. The first tab goes into the textbox, then the 2nd tab highlights the same textbox. I have code that is working now, but still having some issues checking for which parent.parent control to set focus to. Couple other threads regarding that.

You have some code that corrupt the VFP standard behaviour.

Build this structure, without code:
Form
Form.Text1 ( tabIndex = 1 )
Form.container1 ( tabIndex = 2 )
Form.container1.Command1 ( tabIndex = 1 , TabStop = .F.)
Form.container1.Text1 ( tabIndex = 2)
Form.container1.Command2 ( tabIndex = 3 , TabStop = .F.)
Form.Text2 ( tabIndex = 3 )
Tabbing cycle through: Form.Text1 => Form.container1.Text1 => Form.Text2 => Form.Text1

>
>>>UPDATE: I put an EntryTextBox.SetFocus in the ComboContainer.GotFocus and it shows the cursor in the textbox when tabbed into the container, but then it highlights the textbox on the 2nd tab press. Anyone know what could be causing that?
>>
>>Put a NODEF into ComboContainer.GotFocus.
>
>Doesn't help either.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform