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".
...
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,
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.
...
TabControlChildAutoSize still does not work for me.
Rolf
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.
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.
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
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.
If I size the main form the tab will be resized but not the child forms.
Rolf
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
Yes, Gary, I am using 3.03.
I'm running it on XP SP3.
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
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.
Exactly - it resizes in FF3, but not in the exe,
Rolf
Have you tried manually deleting the CODEGEN* files and then re-compiling? It worked for me.
I just checked this again, because originally, I was testing in the designer and not the EXE itself. Same results....it is working fine for me.
XP SP2 running in Virtual Box under Ubuntu host
hmmmm... now if I could just get PB and FF for Linux ???
Gary
I'm having a little different problem with the tab control. I thought I'd use it as a starter for a project I have in mind where I'll have vertical tabs on the right side. I've never done this but I assume that it should work. But what's happening is that the tab text isn't visible. It's only the very tips of the tabs that stand out. It looks as though the various tab dialogs aren't quite lined up.
Something similar happens with vertical tabs on the left side except that the tabs are visible in this case. But the control doesn't seem to be a single rectangle.
Also if I set the tab text option to anything other than justify (I don't have it in front of me at the moment so I don't remember the exact wording of the option) the text on some tabs overlaps the text on other tabs. This is only with vertical tabs.
I didn't bother to post a picture of this since you can duplicate it just by setting the tab control to vertical and trying either right or left.
I'm using Vista. I did try deleting the Codegen files but that didn't seem to make any difference.
Barry
QuoteHave you tried manually deleting the CODEGEN* files and then re-compiling? It worked for me.
Yes I tried that too - no change.
Rolf
I just read in another thread a post from Josè http://www.planetsquires.com/protect/forum/index.php?topic=2080.msg16749;topicseen#msg16749 (http://www.planetsquires.com/protect/forum/index.php?topic=2080.msg16749;topicseen#msg16749) that some things behave strange in XP SP3 that run perfectly normal in Vista and SP2.
QuoteBut also SP3 or SP2? I ask this because many SP3 users have had problems not experienced by SP2 or Vista users.
I am running on my DevMachine XPPRO SP3. Maybe SP3 is the problem. I'll try it out on Vista and Win7.
The solution then would be to resize the Tab children manually. I added this code to the main form:
Function FRMMAINFORM_WM_SIZE ( _
hWndForm As Dword, _ ' handle of Form
fwSizeType As Long, _ ' type of resizing request
nWidth As Long, _ ' new width of client area
nHeight As Long _ ' new height of client area
) As Long
Dim rc As Rect
Dim trc As Rect
GetClientRect hWndForm, rc
MoveWindow HWND_FRMMAINFORM_TABCONTROL1, 0, 0, rc.nRight - rc.nLeft, _
rc.nBottom - rc.nTop - 50, %TRUE
GetClientRect HWND_FRMMAINFORM_TABCONTROL1, rc
MoveWindow HWND_FRMGENERAL, 0, 22, rc.nRight - rc.nLeft, _
rc.nBottom - rc.nTop - 28, %TRUE
MoveWindow HWND_FRMOPTIONS, 0, 22, rc.nRight - rc.nLeft, _
rc.nBottom - rc.nTop - 28, %TRUE
MoveWindow HWND_FRMENVIRONMENT, 0, 22, rc.nRight - rc.nLeft, _
rc.nBottom - rc.nTop - 28, %TRUE
End Function
That works as desired.
Rolf
QuoteSomething similar happens with vertical tabs on the left side except that the tabs are visible in this case. But the control doesn't seem to be a single rectangle.
Looks like I need to fix the autosize when vertical tabs are specified. Sorry about that one. My mistake. The code I have entered is not dealing with this situation correctly.
Okay Guys, I have a handle on this now. The reason for the problems that Rolf reported is that once the child forms resized, I was not setting the "dirty" flag for the form(s) that were resized. This meant that new code would not necessarily be generated for all of the child forms that were autosized.
I have also fixed up the autosize for situations were the tabs are vertical on the left, vertical on the right, or across the bottom (that was just a silly mistake in my code).
Fixes will be in v3.04.
Great!
Quote from: TechSupport on November 19, 2009, 12:08:18 PM
Fixes will be in v3.04.
Thank you! Even though in my programming I never made a mistake, I tend to be tolerant of others. :)
Barry