summaryrefslogtreecommitdiff
path: root/library/custom_grid.cpp
diff options
context:
space:
mode:
authorDaniel Wilhelm <daniel@wili.li>2014-04-18 17:12:17 +0200
committerDaniel Wilhelm <daniel@wili.li>2014-04-18 17:12:17 +0200
commitb654dbfa5f3e4a4d02f72023f7c5895635aa6396 (patch)
tree8c1dfe7f638c0fc7afc1d08bc2fc0fd0f8646e5e /library/custom_grid.cpp
parent3.17 (diff)
downloadFreeFileSync-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.cpp24
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;
bgstack15