目录
2.1)、 默认情况下,BOX容器 mousechild 为true
2.6)、为啥改为ButtonBox,就可以让整个BOX响应点击事件了?
效果显示:
一、list控件
1、选中事件的例子
/**
* @brief 监听选择子项的事件
* @param[in] callback 选择子项时的回调函数
* @return 无
*/
void AttachSelect(const EventCallback& callback) { OnEvent[kEventSelect] += callback; }
选中后,给文本控件赋值,并将列表隐藏
nameList_ = (ui::ListBox*)FindControl(L"nameList");
nameList_->AttachSelect([this](ui::EventArgs*) {
//int nSelect = nameList_->GetCurSel();
std::wstring name = nameList_->GetText();
user_name_edit_->SetText(name);
nameList_->SetVisible(false);
r