add an overloading function of listbox::scroll
clicking horizontal barre moves "one letter"
This commit is contained in:
@@ -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
|
/// 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, 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
|
/// 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);
|
size_type append_header(nana::string header_text, unsigned width = 120);
|
||||||
|
|||||||
@@ -2008,6 +2008,7 @@ namespace nana
|
|||||||
scroll.h.amount(header.pixels());
|
scroll.h.amount(header.pixels());
|
||||||
scroll.h.range(graph->width() - width);
|
scroll.h.range(graph->width() - width);
|
||||||
scroll.h.value(scroll.offset_x);
|
scroll.h.value(scroll.offset_x);
|
||||||
|
scroll.h.step(graph->text_extent_size(L"W").width);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(scroll.v.empty() == false)
|
if(scroll.v.empty() == false)
|
||||||
@@ -4259,6 +4260,13 @@ namespace nana
|
|||||||
ess.update();
|
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)
|
listbox::size_type listbox::append_header(nana::string text, unsigned width)
|
||||||
{
|
{
|
||||||
auto & ess = _m_ess();
|
auto & ess = _m_ess();
|
||||||
|
|||||||
Reference in New Issue
Block a user