TabControl in FF3

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

Previous topic - Next topic

Gary Stout

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

Barry Marks

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

Rolf Brandt

QuoteHave you tried manually deleting the CODEGEN* files and then re-compiling? It worked for me.

Yes I tried that too - no change.

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)

Rolf Brandt

I just read in another thread a post from Josè 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

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

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.

Paul Squires
PlanetSquires Software

Paul Squires

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.
Paul Squires
PlanetSquires Software

Rolf Brandt

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)

Barry Marks

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