>I have a form with a container (or a commandgroup, doesnt matter) with 6 commandbuttons. Every command buttons have 'default' property value .F.
>When in 'init' event of form, i set the focus to the first commandbutton of the container, property 'default' of this commandbutton change to .T.
>I've tested it with 'set step on' and it's just in this momento when occurs 'thisform.barra.buscar.setfocus()'
>There's no code in class.
>¿Any ideas?
>TIA
It's the built-in behavior of the command buttons. It's designed this way so that when a button has focus, the user can press Enter to simulate a click.
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer