Opened 10 years ago

Closed 19 months ago

#1792 closed defect (fixed)

Notebook client area not recalculated correctly when the tabs are switched to vertical orientation

Reported by: msdobrescu Owned by:
Priority: low Milestone:
Component: wxMSW Version:
Keywords: Cc: msdobrescu, matsourceforge, redhook, abxabx
Blocked By: Blocking:
Patch: no

Description

Hi!

I've built the libs on windows and the samples.
The Notebook right/left positioned tabs are dispalyed
incorrectly (see the pic attached).

bye!

Attachments (1)

notebook.jpg download (68.3 KB) - added by msdobrescu 10 years ago.
screenshot

Download all attachments as: .zip

Change History (7)

Changed 10 years ago by msdobrescu

screenshot

comment:1 Changed 9 years ago by matsourceforge

Hello,
i have the same problem.
wxWidgets version is 2.6.1 on Windows.

There is a gap between the content and the left/right tabs.
The gap seems to be depending on the size of the tab itself
or somehow of the content (gap is bigger if the content is a
wxGrid).

My wxNotebook is embedded into splitter windows. If these
splitter are resized in any direction, the content of the
notebook becomes the correct and expected size.
Unfortunately i found no way to force this resizing without
changing the splitter with the mouse.

comment:2 Changed 9 years ago by redhook

Hi there,
I have the same problem.
wxWidgets cvs branch WX_2_6_BRANCH on WinXP SP2 - VS2005

It seems a sizer problems. On the widgets samples, on the
method void NotebookWidgetsPage::CreateNotebook() in
notebook.cpp
I tried to detach the old notebook (old_note) from the sizer
(m_sizerNotebook) and add the new notebook (m_notebook) to
the sizer and call layout BEFORE the pages are added to the
notebook.

That way it fix that "resize" problem, but it has a few
other bugs. For example if you add 4 or more pages, they get
displayed in 2 rows. Well one of the row get overdrawed by
the item in that notebook page.

Thats my 2 cent for this problem. I hope it helps

comment:3 Changed 23 months ago by oneeyeman

This bug is still stands.
Running widgets sample (WinXP VC6) and selecting "Books->Notebook", then adding 4 pages and selecting either "left" or "right" demonstrates the problem clearly.
However it might be the problem in the sample itself...

comment:4 follow-up: Changed 22 months ago by vadz

  • Priority changed from normal to low
  • Status changed from new to confirmed
  • Summary changed from Notebook right/left positioned tabs dispalyed incorrectly to Notebook client area not recalculated correctly when the tabs are switched to vertical orientation

Yes, I can see it too. There is a workaround: just calling PostSizeEvent() to the notebook after changing the tabs orientation seems to be enough to fix it. But it would be better if you didn't have to do it, of course...

comment:5 in reply to: ↑ 4 Changed 19 months ago by oneeyeman

Vadim,
Replying to vadz:

Yes, I can see it too. There is a workaround: just calling PostSizeEvent() to the notebook after changing the tabs orientation seems to be enough to fix it. But it would be better if you didn't have to do it, of course...

I think it's a problem with the sample.
I just tried a notebook sample from SVN TRUNK and there everything works as expected.

Can we just use PostSizeEvent() there and close this bug?

comment:6 Changed 19 months ago by VZ

  • Resolution set to fixed
  • Status changed from confirmed to closed

(In [73755]) Explicitly trigger wxNotebook layout in wxMSW to ensure it is correct.

Due to an apparent bug in the native control implementation, space could be
reserved for the second row of tabs even when the notebook was big enough to
need it. Sending it an extra WM_SIZE seems to be enough to fix this.

Closes #1792.

Note: See TracTickets for help on using tickets.