Added SetScrollLinesX, SetScrollLinesY so apps can work around scrollbar

appearance problems by setting the scroll increment to e.g. 1
(Scrollbar problems caused by rounding errors - see comments in grid.cpp).
Also removed obsolete functions from reference, rearranged alphabetically


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29836 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2004-10-14 10:28:20 +00:00
parent 387d96cc8f
commit 608754c4a3
3 changed files with 243 additions and 368 deletions

View File

@@ -1532,6 +1532,22 @@ public:
wxWindow* GetGridColLabelWindow() { return (wxWindow*)m_colLabelWin; }
wxWindow* GetGridCornerLabelWindow() { return (wxWindow*)m_cornerLabelWin; }
// Allow adjustment of scroll increment. The default is (15, 15).
void SetScrollLineX(int x) { m_scrollLineX = x; }
void SetScrollLineY(int y) { m_scrollLineY = y; }
int GetScrollLineX() const { return m_scrollLineX; }
int GetScrollLineY() const { return m_scrollLineY; }
// Implementation
int GetScrollX(int x) const
{
return (x + GetScrollLineX() - 1) / GetScrollLineX();
}
int GetScrollY(int y) const
{
return (y + GetScrollLineY() - 1) / GetScrollLineY();
}
// ------ For compatibility with previous wxGrid only...
@@ -1875,6 +1891,8 @@ protected:
bool m_editable; // applies to whole grid
bool m_cellEditCtrlEnabled; // is in-place edit currently shown?
int m_scrollLineX; // X scroll increment
int m_scrollLineY; // Y scroll increment
void Create();
void Init();