Color Schemes

textbox.scheme().selection = color(colors::red);
Set the text selection background color
This commit is contained in:
cnjinhao
2014-12-28 17:16:52 +08:00
parent ad7c36be3f
commit ecbf71b7e2
38 changed files with 506 additions and 166 deletions

View File

@@ -84,7 +84,9 @@ namespace nana
void attached(widget_reference wd, graph_reference graph)
{
widget_ = static_cast< ::nana::combox*>(&wd);
editor_ = new widgets::skeletons::text_editor(widget_->handle(), graph);
auto scheme = dynamic_cast< ::nana::widgets::skeletons::text_editor_scheme*>(API::dev::get_scheme(wd));
editor_ = new widgets::skeletons::text_editor(widget_->handle(), graph, scheme);
editor_->border_renderer([this](graph_reference graph, const ::nana::color& bgcolor){
draw_border(graph, bgcolor);
});