Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

treebox::clear failed #624

Open
uuiid opened this issue Jul 2, 2021 · 1 comment
Open

treebox::clear failed #624

uuiid opened this issue Jul 2, 2021 · 1 comment

Comments

@uuiid
Copy link

uuiid commented Jul 2, 2021

class tree : public nana::form
{
    nana::treebox p_tree;
    nana::place p_layout;
    nana::menu p_menu;

public:
    tree() : 
    p_tree(*this),
     p_layout(*this),
     p_menu()
    {
        p_layout.div("<tree>");

        auto tset = p_tree.insert("root", "root");
        tset.append("1", "1");
        tset.append("2", "2");
        tset.append("3", "3");
        tset.append("4", "4");
        p_layout.field("tree") << p_tree;
        p_menu.append("clear", [this](const nana::menu::item_proxy &in_)
                      { p_tree.clear(); });
        p_tree.events().mouse_down(nana::menu_popuper(p_menu));

        p_layout.collocate();
    };
};

nana::treebox::clear Unable to clear all items
image

@cnjinhao
Copy link
Owner

cnjinhao commented Jul 3, 2021

Thanks for reporting this bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants