简体   繁体   English

如何在wxTextCtrl中修改外观

[英]How modify a lookslike in wxTextCtrl

I need simple editor. 我需要简单的编辑器。 I use special symbols. 我使用特殊符号。 How redefine onPaint or other way what wxTextCtrl show line. 如何重新定义onPaint或其他方式以什么方式显示wxTextCtrl行。 For example: 例如:

My special <a> line have := differen symbol

How showing '< a >' in green color and symbol := show a bold ' = ' (without ':') 如何以绿色和符号显示'<a>':=显示粗体' = '(不带':')

ideal is runing this special showing in all lines without actual cursor. 理想情况是在没有实际光标的情况下在所有行中运行此特殊显示。 Whole document without actual line. 没有实际行的整个文档。

You can't override painting of wxTextCtrl (or of any other native control for that matter), nor would you want to do it. 您无法覆盖wxTextCtrl (或与此相关的任何其他本机控件)的绘制,也不想这样做。 You can define "text styles" for the regions in it however, see the "wxTextCtrl Styles" section of the documentation which should be enough for what you want to do. 您可以为其中的区域定义“文本样式”,但是,请参阅文档的“ wxTextCtrl样式”部分, 部分对于您要执行的操作应该足够了。

And if you need more than this, wxStyledTextCtrl could be helpful. 而且,如果您还需要更多, wxStyledTextCtrl可能会有所帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM