Hi.
This is how we implement this.
We do add userobject as tabpages. Our user object can use resize service (u_tabpg). Usually it's from pfc (but this can also work with Kevin's isolated service). We then set our tab_x.tabpage_x constructor event to register controls it contains as needed.
We don't register controls to the window!
As controls are registered in uo, and resize service knows what to do, they will resize whatever is the reason of user object size change. Even if this happens beacause of splitbar usage.
I attach some sample code to show how we implement it. In my sample there is no splitbar. You can do this check yourself. But it should work. In my pfc based projects it does work.
I included Kevin's resize object in this sample code.
I also have a window (which doesn't inherit from a base window). It has of_set_resize function declared on it (Kevin's version). Normally there should be a base window.
In this window I added a tab control.
I have a user object named uo_custom_tab. I added to it: a) in instance variables: n_resize_service inv_resize, b) resize event with appropriate code, c) of_set_resize to enable the service.
In my tab control I insert a tab page using Insert User Object... I use my uo_custom_tab.
On the window, I put the resize logic for each tabpage to the tab_x.tabpage_x constructor event, as previously mentioned.
The main disadvantage of this logic is that I cannot modify my tabpage appearance directly from the window. But I generally prefer that because my windows are lighter in the IDE, and I can always edit my tabpage from the control.
Of course to use this model the best thing to do is to have:
a) a base window (the one Kevin provided is fine)
b) a base userobject (from this one we can inherit to create our tabpages).
Why I do always prefer working with user objects? That way if I remove a tabpage from a control, the tabpage is still there as a user object! If you want for example to move a tabpage from a tab control to another one, this way you can easy achieve your objective (while copy paste would also work). Another thing is that you can easily do a change that will affect all your tabpages (by modifying an ancestor). Finally you can have userobject functions in tabpages...
Andreas.