wxGrid::SetScrollLineX doesn't work. Topic is solved

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
kea_
Experienced Solver
Experienced Solver
Posts: 59
Joined: Wed Oct 17, 2007 7:32 am

wxGrid::SetScrollLineX doesn't work.

Post by kea_ » Fri May 15, 2009 5:54 pm

Hello together,

I don't know what I'm doing wrong.
I use a wxGrid component and like to scroll automatically with the SetScrollLineX but the function doesn't work. Do I have to set before something? Or do I have to use the wxScrolledWindow::Scroll(x, y) function but I think then I have to override the event for scrolling to get the actual position.

Thank you for your answer.

Greeting kea_

JimFairway
wxWorld Domination!
wxWorld Domination!
Posts: 1059
Joined: Sun Dec 30, 2007 6:40 pm
Location: Canada

Post by JimFairway » Fri May 15, 2009 9:38 pm

Hi kea_,

wxGrid::SetScrollLineX only sets how many pixels to move in the X direction when the user clicks in the scroll bar (not grabbing the thumb and moving it).

If you want to scroll to a specific cell, try wxGrid::MakeCellVisible - see http://docs.wxwidgets.org/2.6/wx_wxgrid ... ellvisible

Hope that helps,

Jim
OS: Vista SP1, wxWidgets 2.8.7.

kea_
Experienced Solver
Experienced Solver
Posts: 59
Joined: Wed Oct 17, 2007 7:32 am

Post by kea_ » Sat May 16, 2009 8:15 am

hello,
thank for your answer.
It doesn't work but it doesn't matter I'm doing it in a other way (for me a better way).

Greeting kea_

Post Reply