add an overloading function of listbox::scroll
clicking horizontal barre moves "one letter"
This commit is contained in:
parent
0ddee51568
commit
408b4f408b
@ -558,6 +558,7 @@ By \a clicking on one header the list get \a reordered, first up, and then down
|
||||
|
||||
/// Scrolls the view to the first or last item of a specified category
|
||||
void scroll(bool to_bottom, size_type cat_pos = ::nana::npos);
|
||||
void scroll(bool to_bottom, const index_pair& pos);
|
||||
|
||||
/// Appends a new column with a header text and the specified width at the end, and return it position
|
||||
size_type append_header(nana::string header_text, unsigned width = 120);
|
||||
|
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user