wxListCtrl简单使用
来源:互联网 发布:pickit2烧写软件 编辑:程序博客网 时间:2024/05/22 06:21
核心代码:
Simple::Simple(const wxString& title) :wxFrame(NULL, wxID_ANY, title, wxDefaultPosition, wxSize(450,400)){ wxPanel* panel = new wxPanel(this, wxID_ANY); //wxListCtrl* listCtrl = new wxListCtrl(panel, wxID_ANY, wxPoint(50, 50), wxDefaultSize, wxLC_REPORT | wxDOUBLE_BORDER); m_item_list = new wxListCtrl(panel, wxID_ANY, wxPoint(10,10), wxDefaultSize, wxLC_REPORT); m_item_list->SetForegroundColour(wxColour(0, 255, 0)); m_item_list->SetBackgroundColour(wxColour(0, 0, 0)); // Add first column wxListItem col0; col0.SetId(0); col0.SetText(_("Foo")); col0.SetWidth(100); m_item_list->InsertColumn(0, col0); // Add second column wxListItem col1; col1.SetId(1); col1.SetText(_("Name")); col1.SetWidth(100); m_item_list->InsertColumn(1, col1); // Add third column wxListItem col2; col2.SetId(2); col2.SetText(_("Comments")); col2.SetWidth(100); m_item_list->InsertColumn(2, col2); wxButton* button = new wxButton(panel, wxID_ANY, "add",wxPoint(314,9)); button->Bind(wxEVT_BUTTON, &Simple::OnButtonClick, this); this->Centre();}Simple::~Simple(){}void Simple::OnButtonClick(wxCommandEvent& event){ static int i = 0; m_item_list->InsertItem(i, ""); m_item_list->SetItem(i, 0, "ID"); m_item_list->SetItem(i, 1, "worker"); m_item_list->SetItem(i, 2, "value"); ++i;}
0 0
- wxListCtrl简单使用
- wxListCtrl简单使用
- wxListCtrl表格样式
- wxListCtrl的基本用法
- wxListCtrl之InsertItem与SetItem的问题
- wxWidgets教程(15)——wxListCtrl用法
- 简单使用
- 简单使用
- 简单使用
- [wxWidgets]为wxListCtrl增加函数,给定行数列数获取字符串
- wxWidgets 控件 wxListCtrl 获取当前选定位置的 内容【python + cpp 】
- [wxWidgets]_[初级]_[监听wxListCtrl和wxGrid的滚动条事件]
- springBoot简单学习使用;curl简单使用
- java使用redis简单使用
- spring 简单使用AOC使用
- logstash使用之简单使用
- 简单易懂的使用
- ant的简单使用
- Intellij Idea下SVN配置及使用
- android 中webView与Activity之间的交互
- android studio插件
- (Leetcode)7. Reverse Integer
- fock join 列子
- wxListCtrl简单使用
- [leetcode] 292. Nim Game
- Javascript读书笔记:函数定义和函数调用
- bzoj 1023 [SHOI2008]cactus仙人掌图
- html css属性记录
- 百度搜索开发
- 时隔8年,再次回到CSDN,重启学习与研究之路
- 8、ROS使用C++编写一个简单的Publisher和Subscriber
- 73. Set Matrix Zeroes