View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0018955 | Lazarus | Widgetset | public | 2011-03-20 03:30 | 2012-03-12 15:56 |
Reporter | cobines | Assigned To | Paul Ishenin | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Platform | Win32 | OS | Windows XP | ||
Product Version | 0.9.31 (SVN) | ||||
Fixed in Version | 0.9.31 (SVN) | ||||
Summary | 0018955: Pages size not adjusted in TCustomNotebook with Multiline=True when changing caption of tabs | ||||
Description | When caption of a tab is changed and such change results in changing how many lines of tabs are visible then the pages sizes on each tab are not recalculated. For example changing a caption from a short one to a very long one and vice-versa. | ||||
Steps To Reproduce | 1. Run attached application. There is one line of tabs. 2. Click "Rename tab 3" button. There is two lines of tabs but the second line is not visible. (screenshot_2.png) 3. Maximize and Restore the window. Pages have now been resized. 4. Click "Rename tab 3" button. There is one line of tabs but there is additional space between the tabs and pages contents. (screenshot_4.png) | ||||
Tags | No tags attached. | ||||
Fixed in Revision | 35199 | ||||
LazTarget | 0.99.0 | ||||
Widgetset | Win32/Win64 | ||||
Attached Files |
|
2011-03-20 03:30
|
|
2011-03-20 03:31
|
|
2011-03-20 03:31
|
|
2011-10-27 23:43
|
multiline_tabs_on_change_caption.diff (1,125 bytes)
Index: lcl/interfaces/win32/win32pagecontrol.inc =================================================================== --- lcl/interfaces/win32/win32pagecontrol.inc (revision 33121) +++ lcl/interfaces/win32/win32pagecontrol.inc (working copy) @@ -175,11 +175,13 @@ var TCI: TC_ITEM; PageIndex, RealIndex: integer; + Notebook: TCustomTabControl; NotebookHandle: HWND; begin + Notebook := TCustomTabControl(AWinControl.Parent); PageIndex := TCustomPage(AWinControl).PageIndex; - RealIndex := TCustomTabControl(AWinControl.Parent).PageToTabIndex(PageIndex); - NotebookHandle := AWinControl.Parent.Handle; + RealIndex := Notebook.PageToTabIndex(PageIndex); + NotebookHandle := Notebook.Handle; // We can't set label of a page not yet added, // Check for valid page index if (RealIndex >= 0) and (RealIndex < Windows.SendMessage(NotebookHandle, TCM_GETITEMCOUNT, 0, 0)) then @@ -205,6 +207,7 @@ TCI.pszText := PChar(AText); Windows.SendMessage(NotebookHandle, TCM_SETITEM, RealIndex, LPARAM(@TCI)); {$endif} + LCLControlSizeNeedsUpdate(Notebook, True); end; end; end; |
|
Uploaded a patch. I added only: LCLControlSizeNeedsUpdate(ATabControl, True); and not if LCLControlSizeNeedsUpdate(ATabControl, True) then AdjustSizeNotebookPages(ATabControl); like it is in other places in that file because from my tests (Windows XP SP3) it was enough. |
|
Thanks, applied |
Date Modified | Username | Field | Change |
---|---|---|---|
2011-03-20 03:30 | cobines | New Issue | |
2011-03-20 03:30 | cobines | File Added: multine_tabs_on_change_caption.zip | |
2011-03-20 03:30 | cobines | Widgetset | => Win32/Win64 |
2011-03-20 03:31 | cobines | File Added: screenshot_2.png | |
2011-03-20 03:31 | cobines | File Added: screenshot_4.png | |
2011-03-30 23:00 | Vincent Snijders | LazTarget | => 1.0 |
2011-03-30 23:00 | Vincent Snijders | Status | new => acknowledged |
2011-03-30 23:00 | Vincent Snijders | Target Version | => 1.0.0 |
2011-04-04 05:36 | Paul Ishenin | LazTarget | 1.0 => 0.99.0 |
2011-04-04 05:37 | Paul Ishenin | Target Version | 1.0.0 => 0.99.0 |
2011-09-28 16:01 | Felipe Monteiro de Carvalho | LazTarget | 0.99.0 => 1.0 |
2011-10-27 23:43 | cobines | File Added: multiline_tabs_on_change_caption.diff | |
2011-10-27 23:46 | cobines | Note Added: 0053520 | |
2011-10-27 23:51 | Vincent Snijders | Status | acknowledged => assigned |
2011-10-27 23:51 | Vincent Snijders | Assigned To | => Paul Ishenin |
2011-10-27 23:51 | Vincent Snijders | LazTarget | 1.0 => 0.99.0 |
2012-02-07 06:12 | Paul Ishenin | Fixed in Revision | => 35199 |
2012-02-07 06:12 | Paul Ishenin | Status | assigned => resolved |
2012-02-07 06:12 | Paul Ishenin | Fixed in Version | => 0.9.31 (SVN) |
2012-02-07 06:12 | Paul Ishenin | Resolution | open => fixed |
2012-02-07 06:12 | Paul Ishenin | Note Added: 0056607 | |
2012-03-12 15:56 | cobines | Status | resolved => closed |