wxTE_PROCESS_ENTER, wxDefaultValidator, _T("ID_TC")); For this control ...

问题描述 投票:0回答:1
To insert text at the given position, you should use

to set the insertion point (by creating an empty selection at the desired position) and then

FTextCtrl = new wxTextCtrl(parent, wxID_ANY, _("Text"), wxPoint(20, 20), wxDefaultSize, wxTE_CENTRE | wxTE_PROCESS_ENTER, wxDefaultValidator, _T("ID_TC"));

. Of course, if you just want to append the text, you could use

directly.
c++ wxwidgets textctrl
1个回答
2
投票

SetSelection()我有这个textctrl WriteText()对于这个基于编程逻辑的控件,我想在文本域中插入一个可编辑的字符。怎样才能做到同样的效果呢?AppendText()

ChangeValue()我有这样的textctrl FTextCtrl = new wxTextCtrl(parent, wxID_ANY, _("Text"), wxPoint(20, 20), wxDefaultSize, wxTE_CENTRE。

© www.soinside.com 2019 - 2024. All rights reserved.