TabControl in FF3

Started by Patrice Terrier, November 18, 2009, 04:06:55 AM

Previous topic - Next topic

Patrice Terrier

The TabControl demo provided with FF3 doesn't look good on 7 (see attached screen shot).

I am not comfortable with the way this control has been implemented in FF3, especialy the tedious part to create the page container. I think this should be done automaticaly, each time a new tab is added instead of having to do it "manualy".

...

Paul Squires

When creating the child pages for the tab control, set the TabControlChild = TRUE and also set the TabControlChildAutoSize = TRUE. That way the child tab pages will fill the total client area of the tab control. All you need to do then is change the BackColor property of the child page to match the color of the tab control.
Paul Squires
PlanetSquires Software

Patrice Terrier

Paul,

QuoteAll you need to do then is change the BackColor property of the child page to match the color of the tab control.
The screen shot is from the example provided with FF3, i suggest to fix it in the next release.

...

Rolf Brandt

TabControlChildAutoSize still does not work for me.

Rolf
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)

Paul Squires

Quote from: Patrice Terrier on November 18, 2009, 10:34:41 AM
Paul,

QuoteAll you need to do then is change the BackColor property of the child page to match the color of the tab control.
The screen shot is from the example provided with FF3, i suggest to fix it in the next release.

...

Right you are... The second and third child forms needed their autosize proerties set to True. I have changed that and it will be in the next update.
Paul Squires
PlanetSquires Software

Paul Squires

Quote from: Rolf Brandt on November 18, 2009, 10:44:21 AM
TabControlChildAutoSize still does not work for me.

You'll have to be more specific because it seems to be working perfectly for me. The fix in the v3.03 update should have addressed any issues related to the autosizing of tab control child forms.
Paul Squires
PlanetSquires Software

Rolf Brandt

Hi Paul,

I experience the same as you can see an Patrice's picture. The child page does not resize but remains the same size as in the designer. I set the backcolor of the child to a different color to make it visible.

Rolf
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)

Paul Squires

Quote from: Rolf Brandt on November 18, 2009, 11:38:17 AM
I experience the same as you can see an Patrice's picture. The child page does not resize but remains the same size as in the designer. I set the backcolor of the child to a different color to make it visible.

I see, however, when you set the TabControlChildAutoSize = TRUE for each child form, do you see the form automatically resize to the correct size to fit the tabcontrol client area?

The TabControl sample program only had the first form's TabControlChildAutoSize = TRUE. The other two forms had it set to FALSE. All three should be set to TRUE.

Paul Squires
PlanetSquires Software

Rolf Brandt

If I size the main form the tab will be resized but not the child forms.

Rolf
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)

Gary Stout

Works fine here in 3.03. I was one to bring the problem to Paul's attention in 3.02 where only the first child would resize, but 3.03 took care of the issue. After reading this post, I just tried resizing the tabcontrol and checked the size of each child and they resized as expected.

Rolf, are you sure you have 3.03??

Thanks,
Gary

Rolf Brandt

Yes, Gary, I am using 3.03.

I'm running it on XP SP3.
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)

Andrew Lindsay

I use Win7 32 bit and do not have any errors/problems to report for the tab auto-sizing.  It works perfectly..

The only functionality that I would suggest is that when a tab is added to a form, that a little wizard box pops up to let you say how many tabs you want and then automatically create them...

Regards

Andrew

Paul Squires

This is weird. I tested the TabControl sample project today on WinXP and it worked as expected. Tonight I ran it on Windows 7 and the resulting exe did not show the child tab pages autosized.... although they were autosized in FF3 itself!!! I guess this is the situation that Rolf has experienced.

I manually deleted the CODEGEN*.* files and exe and then did a full compile and run. The exe now acts the way that it should. Weird. Very weird.
Paul Squires
PlanetSquires Software

Rolf Brandt

Exactly - it resizes in FF3, but not in the exe,

Rolf
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)

Paul Squires

Have you tried manually deleting the CODEGEN* files and then re-compiling? It worked for me.
Paul Squires
PlanetSquires Software