thanks, I reiterated though my controls and it worked out well.
Nick
>Nick,
>
>You can store a reference to the control that you want to receive focus for each page. Does the treeview control know what number each page is? If so, you could just add an array property to your form, and put a reference to each control in that array.
>
>
>* in form init() is one place to handle this
>dimension thisform.firstControls[10]
>thisform.firstControls[1] = thisform.pageFrame1.page1.textBox1
>... and so on ...
>
>
>
>
>* later on...
>* let's say 5th page is being activated
>nPage = 5
>thisform.firstControls[nPage].setfocus
>thisform.pageframe1.activePage = nPage
>
>
>
>>I have a pageframe that contains several pages. Each page has a container holding textboxes. I have set the tab order on these textboxes. I also have a dbi-tech treeview control that flips pages on pageframe. How do I setfocus on first textbox control in a container on pages? Do I have to iterate through all controls starting with pageframe or is there a simple way of doing this?
>>
>>thanks
>>Nick