My question is, how can I set wxScrolled viewport starting point to an arbitrary position in pixels, not in scroll units? wxWindow::ScrollWindow doesn't work with wxScrolled, or maybe I'm using it wrong:
Code: Select all
Canvas::Canvas(wxWindow *parent)
: wxScrolledCanvas(parent, wxID_ANY)
{
SetScrollRate(4, 4);
SetVirtualSize(100, 4000);
ScrollWindow(0, 5);
printf("%d\n", GetViewStart().y); // always returns 0
}