Tab Control Not Displaying Correctly

Started by eptownie1988, September 28, 2009, 07:42:23 PM

Previous topic - Next topic

eptownie1988

I have a Form that contains a tab control.  The first (3) three tab backgrounds are the correct size.  The (5) five other tab backgrounds do not display the correct size.  I have attached a zip file that contains a Word 2003 document that has (2) two screen shots showing what I have just explained.  Please note the smaller one has a control partially showing.  This does show properly when I open the dialog box in AutoCAD.  I am just unable to see the controls completely.  Is there a way to correct this issue.  Thank you.

Fred Tomke

Hello, normally it should be solved by saving and closing the OpenDCL project file and reopen it. If it couldn't be solved this way please upload your odcl-project file to give us the chance to have a look.

Fred
Fred Tomke
Dipl.-Ing. (FH) Landespflege

[ landscaper - landscape developer - digital landscape and urban design]

eptownie1988

Fred:

I tried that thinking it would update but it only updated one more but not the others.  I have attached a copy of the file for review.  Any help would be appreciated.  Thank you.

Fred Tomke

Hello,

I've got it:

  • Open your project file
  • Do NOT doubleclick Form1
  • doubleclick every tab (SLC, IDC, ...) one after each other
  • Now doubleclick Form1
  • Resize it to the right, so that all of the tabcontrol is visible
  • doubleclick NAC again
  • it should look like this now
Fred Tomke
Dipl.-Ing. (FH) Landespflege

[ landscaper - landscape developer - digital landscape and urban design]

eptownie1988

Fred:

That worked perfectly.  Thanks for getting this resolved for me.

BazzaCAD

a.k.a.
Barry Ralphs
barryDOTralphsATgmailDOTcom

Fred Tomke

Hi,
I didn't suggest to report it as a bug because resizing the form and its client controls normally works perfect. Only in this case I got unexpected results. But maybe it is actually a bug, indeed.

Fred
Fred Tomke
Dipl.-Ing. (FH) Landespflege

[ landscaper - landscape developer - digital landscape and urban design]

owenwengerd

There is a bug involved here. Any time the tab strip control is resized, Studio should update the sizes of all its tab pages. The bug is that it is only resizing tab pages that are currently open in the editor. I've fixed this now so it updates tab page sizes regardless whether they are open or not.

There is an issue with tab pages, however, that the bug fix does not address. The tab page size is saved when the project is saved. If the saved size is wrong (due to this bug -- or, if its an old project, due to a lot of old bugs in the original code), it does not get automatically corrected until the tab strip control is resized.

Ideally, I would just add code to correct the tab page size when the project is loaded. Unfortunately, that doesn't work. The reason is because the tab page size is calculated by querying the tab strip control for it's "useable" area (i.e. the tab strip control window minus the area taken up by its tabs) -- but that can only be done if there is an instance of the tab strip control to query.

So, if you have projects with incorrectly sized tab pages, the correct approach to fix them is to open the parent form and resize the tab strip control. Unfortunately this bug caused that solution to fail as well, unless all the tab pages happened to already be open. It will work again in Alpha 7.
Owen Wengerd (Outside The Box) / ManuSoft

eptownie1988

Wow, talk about stumbling on a bug.  I gotta say it feels good to find something even if it was by mistake.  LOL  Everyone keep up the great work.