Tab Control - Add tab

Started by Richard Kelly, April 05, 2010, 09:58:16 AM

Previous topic - Next topic

Richard Kelly

After adding a tab using FF_TabCtrl_AddTab how do I associate a form with the newly created tab?

Rolf Brandt

1. Create a new form (or use any existant) and set it's TabControlChild property to True
2. Click on the TabControl, open the Custom dialog in the FireFly Workspace.
3. Now set the Caption for the Tab and select the Child Page Dialog. (Those are the forms you set as TabControlChild = True).
4. Done
Rolf Brandt
http://www.rbsoft.eu
http://www.taxifreeware.com
I cook with wine, sometimes I even add it to the food.
(W. C. Fields)

David Kenny

Rolf,  He is asking about FF_TabCtrl_AddTab function.

Richard,

As far as I can tell, you can't create a tab control at run time.  At design time, you create a tab control right on a form (that's your association).

If you are adding a tab to an existing tab control, its parent form is still the one you placed it on at design time. Do you have some code you can show?

Rolf Brandt

#3
Sorry, I had overlooked that. I'll check it out, I assume the SetParen Api might help.
Rolf Brandt
http://www.rbsoft.eu
http://www.taxifreeware.com
I cook with wine, sometimes I even add it to the food.
(W. C. Fields)

Cho Sing Kum

Look at the MDI Simulated sample. May get some idea there. I think you have to create the child forms first and then assign at runtime.

Richard Kelly

I think that simulated MDI example might give me the clues on how to proceed. What I have is a form with tab control and two tabs. First tab is a person/organization search and the second tab shows the results. On the results tab I have options on what you want to do with the selection with the search results. At that point, I want to add a tab and associate the appropriate child form. Sorry I wasn't clearer about the original post.