diff options
author | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:12:17 +0200 |
---|---|---|
committer | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:12:17 +0200 |
commit | b654dbfa5f3e4a4d02f72023f7c5895635aa6396 (patch) | |
tree | 8c1dfe7f638c0fc7afc1d08bc2fc0fd0f8646e5e /library/custom_grid.cpp | |
parent | 3.17 (diff) | |
download | FreeFileSync-b654dbfa5f3e4a4d02f72023f7c5895635aa6396.tar.gz FreeFileSync-b654dbfa5f3e4a4d02f72023f7c5895635aa6396.tar.bz2 FreeFileSync-b654dbfa5f3e4a4d02f72023f7c5895635aa6396.zip |
3.18
Diffstat (limited to 'library/custom_grid.cpp')
-rw-r--r-- | library/custom_grid.cpp | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/library/custom_grid.cpp b/library/custom_grid.cpp index 172ad2e1..c2b87b5d 100644 --- a/library/custom_grid.cpp +++ b/library/custom_grid.cpp @@ -169,7 +169,7 @@ public: { return result; } - else //grid attribute might be referenced by other nodes, so clone it! + else //grid attribute might be referenced by other elements, so clone it! { wxGridCellAttr* attr = result->Clone(); //attr has ref-count 1 result->DecRef(); @@ -1066,6 +1066,28 @@ void CustomGrid::updateGridSizes() } +void CustomGridRim::updateGridSizes() +{ + CustomGrid::updateGridSizes(); + + //set row label size + + //SetRowLabelSize(wxGRID_AUTOSIZE); -> we can do better + wxClientDC dc(GetGridRowLabelWindow()); + dc.SetFont(GetLabelFont()); + + wxArrayString lines; + lines.push_back(GetRowLabelValue(GetNumberRows())); + + long width = 0; + long dummy = 0; + GetTextBoxSize(dc, lines, &width, &dummy); + + width += 8; + SetRowLabelSize(width); +} + + void CustomGrid::setSortMarker(SortMarker marker) { m_marker = marker; |