wxHtmlWindow resize and keep the reading point
Milan Babuskov
milanb at panonnet.net
Tue Aug 22 11:47:52 PDT 2006
Razvan Cojocaru wrote:
> What is the best way to make sure that wxHtmlWindow keeps the reading
> point after a widget resize? Currently the default behaviour seems to
> be to scroll to the top after each resize.
I don't know about resize, but here's what I do when I change content:
html_window->GetViewStart(&x, &y); // save scroll position
html_window->setPageSource(htmlpage);
html_window->Scroll(x, y); // restore scroll position
I guess you just need to store scroll position before resizing and
restore it after.
--
Milan Babuskov
http://swoes.blogspot.com/
http://www.flamerobin.org
More information about the wx-users
mailing list