| Forum List • Thread List • Reply • Refresh • New Topic • Search • Previous • Next 1 | 1. wxTextCtrl style changes itself #4439 | Hi, I'm using a wxTextCtrl in an app. After the wxTextCtrl code i set the defaultStyle ... :
====================================================================
textFenster = (wxTextCtrl *) NULL; textFenster = new wxTextCtrl ( this, -1, wxString(""), wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE | wxTE_RICH );
textFenster->SetDefaultStyle(wxTextAttr(*wxBLACK, wxNullColour, wxFont(10, wxSWISS, wxNORMAL, wxNORMAL, FALSE, _T("Lucida Console"))));
====================================================================
Its all done in the frame constructor. This textcontrol behaves realy strange : - when i type text in the window after opening the app its using the right font - when i don't type text and open a file after starting the app, the control is using the wrong (default) font -but when i type text and open AFTER that a file is uses the right font again... - after typing text and clearing the control (with textFenster->clear()) opening a file causes the same like directly trying open a file.
What's the reason for this ? Shouldn't the app fallback to the as DefaultStyle setted style after opening or clearing ?
| Forum List • Thread List • Reply • Refresh • New Topic • Search • Previous • Next 1 |
|
|