wxPropertyGrid 属性表格组件

程序名称:wxPropertyGrid

授权协议: 未知

操作系统: 跨平台

开发语言: C/C++

wxPropertyGrid 介绍

wxPropertyGrid 是一个属性编辑器的UI组件,支持字符串、数字、标志、字体、颜色等属性类型设置。

示例代码

// Add int property  
pg->Append( new wxIntProperty(wxT("IntProperty"), wxPG_LABEL, 12345678) );

// Add float property (value type is actually double)  
pg->Append( new wxFloatProperty(wxT("FloatProperty"), wxPG_LABEL, 12345.678) );

// Add a bool property  
pg->Append( new wxBoolProperty(wxT("BoolProperty"), wxPG_LABEL, false) );

// A string property that can be edited in a separate editor dialog.  
pg->Append( new wxLongStringProperty(wxT("LongStringProperty"),  
                                             wxPG_LABEL,  
                                             wxT("This is much longer string than the ")  
                                             wxT("first one. Edit it by clicking the button.")));

// String editor with dir selector button.  
pg->Append( new wxDirProperty(wxT("DirProperty"), wxPG_LABEL, ::wxGetUserHome()) );

// wxArrayStringProperty embeds a wxArrayString.  
pg->Append( new wxArrayStringProperty(wxT("Label of ArrayStringProperty"),  
                                              wxT("NameOfArrayStringProp")));

// A file selector property.  
pg->Append( new wxFileProperty(wxT("FileProperty"), wxPG_LABEL, wxEmptyString) );

// Extra: set wildcard for file property (format same as in wxFileDialog).  
pg->SetPropertyAttribute( wxT("FileProperty"),  
                                  wxPG_FILE_WILDCARD,  
                                  wxT("All files (*.*)|*.*") );

wxPropertyGrid 官网

http://wxpropgrid.sourceforge.net/

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。