LOCAL lo, lnThis, lnNext, lnIndex, laIndex(1) lnThis = THIS.TABINDEX lnIndex = 0 FOR EACH lo IN THIS.PARENT.OBJECTS IF lo # THIS ; AND TYPE( 'lo.TABINDEX' ) = 'N' ; AND lo.ENABLED ; AND lo.VISIBLE lnIndex = lnIndex + 1 DIMENSION laIndex( lnIndex, 2 ) laIndex( lnIndex, 1 ) = lo laIndex( lnIndex, 2 ) = lo.TABINDEX ENDIF ENDFOR = ASORT( laIndex, 2 ) FOR lnIndex = 1 TO ALEN( laIndex, 1 ) IF laIndex( lnIndex, 2 ) > lnThis laIndex( lnIndex, 1 ).SETFOCUS() EXIT ENDIF ENDFOR IF lnIndex > ALEN( laIndex, 1 ) laIndex( 1, 1 ).SETFOCUS() ENDIF>Hi Bill,
>FOR EACH loControl in This.Parent.Controls > IF loControl.TabIndex = This.TabIndex + 1 > loControl.SetFocus() > ENDIF >ENDFOR >>pamela
>>container.cmdButton.click() >> ..... >> this.parent.Remove_Focus() >>endproc >> >>container.Remove_Focus() >> ???? && move focus to a control not in the container >> && preferably the one next in tabindex order >>endproc >> >>container.GotFocus() >> if <some condition> >> this.cmdButton.enabled = .f. >> this.other_control.enabled = .t. >> else >> this.cmdButton.enabled = .t. >> this.other_control.enabled = .f. >> endif >>endproc >>>>TIA