wxStyledTextCtrl:自动完成图像显示不正确
我需要有关带有图像的自动完成框的帮助。我无法让它显示 正确。我尝试过使用 wxArtProvider 位图以及自定义 但结果是一样的。位图为 16x16。屏幕截图可以 见下文。图像有点隐藏,不完全可见(参见红色环)
这是相关/示例代码:
RegisterImage(1, wxBitmap(ConfigManager::Instance()->GetIconPath()+wxT("keyword.png"), wxBITMAP_TYPE_PNG));
并捕获我使用的键入字符 请
//Auto complete function
void CMainFrame::OnAutoComplete(wxKeyEvent& e) {
if(e.GetKeyCode()==32 && e.ControlDown()) {
m_editor->AutoCompSetIgnoreCase(false) ;
m_editor->AutoCompShow(3, wxT("private?1 protected?1 public?1
static?2 switch?2 throw?2 try?2 use?3 var?3 while?3 xor?3"));
}
else {
e.Skip();
}
}
注意,我的自动完成系统很复杂,我决定用这个简单的系统替换,但它重现了问题。我在 Ubuntu Oneiric 上使用 wxWidgets 2.9 trunk 版本
I need help with Autocomplete box with Images. I cannot get it display
correctly. I have tried with wxArtProvider bitmaps as well as custom
ones but result is the same. Bitmaps are 16x16. screen shot can be
seen below. Images are a bit hidden not fully visible (see the red ring)
Here is a relevant/sample code:
RegisterImage(1, wxBitmap(ConfigManager::Instance()->GetIconPath()+wxT("keyword.png"), wxBITMAP_TYPE_PNG));
And catching characters as they are typed I use
//Auto complete function
void CMainFrame::OnAutoComplete(wxKeyEvent& e) {
if(e.GetKeyCode()==32 && e.ControlDown()) {
m_editor->AutoCompSetIgnoreCase(false) ;
m_editor->AutoCompShow(3, wxT("private?1 protected?1 public?1
static?2 switch?2 throw?2 try?2 use?3 var?3 while?3 xor?3"));
}
else {
e.Skip();
}
}
Note that my system of getting auto complete is complex and I decided to replace with this easy one but it reproduces the problem. I use wxWidgets 2.9 trunk version on Ubuntu Oneiric
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是一个错误,并且在最新的 SVN 版本中已修复。还升级到几乎最新版本的 scintilla。所以现在一切都很好!
It was a bug and it is fixed as of latest SVN version. There is upgrade also to almost latest version of scintilla. So all is well now!