Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Setfocus on first textbox control on page
Message
 
 
À
20/05/2005 13:25:04
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00944565
Message ID:
01016314
Vues:
21
>>Fabio,
>>
>>I take my "thank you" back. It cost us (me and my colleague) almost three hours to find, why our combos on the first page do not show values correctly. When we commented out this code (after looking in desperation on these combox and debugging this stuff) it worked. So, this trick is wrong. Somehow tab changes ListIndex of the comboboxes...
>>
>>We need to switch to the other solution - looping through controls hierarchy.
>>
>>Anyway, now we learnt something...
>>
>>Thanks :)
>>
>
>Hi Nadya,
>
>every UTs suggestion is a beginning point in order to find the solution,
>and normally refers to PURE and CANDID baseclasses.
>
>With baseclass, i don't look any issue with TAB and
>combobox/listbox classes;
>on grid the Tab can change the column.
>
> With the events, every piece of code can have secondary effects
>(and honestly , 90% of what I see to pass in UT does not work in some situations)
>On this case, if the page ( the form )
>not consumed the character put in typehaed with the KEYBOARD,
> this will come consumed at the first opportunity.
>
>When you uses a KEYBOARD ... PLAIN
>it must consume the characters who remain pendants.
>
>You can use A SetFocus search loop.
>
>FOR ...
>  IF PEM ....
>    ...SetFocus
>...
>
Hi Fabio,

I'm not sure, why your code didn't work in our situation. E.g. it did what it was intended to do, but it cause undesired problem with the combobox class, which we had long time to debug.

Anyway, this is how we resolved the problem with putting focus on the first control of the page: we put this.parent.activepage = 1 in the first page Activate method (only for the first time this page is activated) and it solved the focus problem. Don't ask me why...

We tried to do thisform.pgfPatient.page1.cntName1.txtLastName.SetFocus() and it didn't work regardless on where did we try (page.activate/form's Init, etc.)
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform