add an overloading function of listbox::scroll

clicking horizontal barre moves "one letter"
This commit is contained in:
Jinhao
2015-11-05 23:47:48 +08:00
parent 0ddee51568
commit 408b4f408b
2 changed files with 9 additions and 0 deletions

View File

@@ -2008,6 +2008,7 @@ namespace nana
scroll.h.amount(header.pixels());
scroll.h.range(graph->width() - width);
scroll.h.value(scroll.offset_x);
scroll.h.step(graph->text_extent_size(L"W").width);
}
if(scroll.v.empty() == false)
@@ -4259,6 +4260,13 @@ namespace nana
ess.update();
}
void listbox::scroll(bool to_bottom, const index_pair& pos)
{
auto & ess = _m_ess();
ess.lister.scroll(pos, to_bottom);
ess.update();
}
listbox::size_type listbox::append_header(nana::string text, unsigned width)
{
auto & ess = _m_ess();