If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
-
Marcus Frenkel
- Experienced Solver

- Posts: 79
- Joined: Thu Sep 25, 2008 12:14 am
Post
by Marcus Frenkel » Wed Sep 29, 2010 1:34 pm
Hi,
On wxMSW the caret on wxRichTextCtrl has 2px width while on wxTextCtrl it has 1px width. I want to have the caret 1px in width on wRichTextCtrl as well so I tried:
Code: Select all
richTextCtrl->GetCaret()->SetSize(1,richTextCtrl->GetCaret()->GetSize().GetHeight() ) ;
//or
wxCaret * caret = new wxCaret(richTextCtrl,0,10);
but without success.
-
evstevemd
- Part Of The Furniture

- Posts: 2293
- Joined: Wed Jan 28, 2009 11:57 am
- Location: United Republic of Tanzania
-
Contact:
Post
by evstevemd » Wed Sep 29, 2010 2:45 pm
Try
Code: Select all
richTextCtrl->GetCaret()->SetSize(1,1);
Chief Justice: We have trouble dear citizens!
Citizens: What it is his honor?
Chief Justice:Our president is an atheist, who will he swear to?
[Ubuntu 19.04/Windows 10 Pro/MacOS 10.13 - GCC/MinGW/Clang, CodeLite IDE]
-
Marcus Frenkel
- Experienced Solver

- Posts: 79
- Joined: Thu Sep 25, 2008 12:14 am
Post
by Marcus Frenkel » Thu Sep 30, 2010 9:09 am
evstevemd wrote:code]richTextCtrl->GetCaret()->SetSize(1,1);[/code]
That causes no change in the caret style as well.
-
catalin
- Moderator

- Posts: 1596
- Joined: Wed Nov 12, 2008 7:23 am
- Location: Romania
Post
by catalin » Thu Sep 30, 2010 11:57 am
I remember trying to do the same thing once and the only thing that made it change was to change the value of wxRICHTEXT_DEFAULT_CARET_WIDTH in wxW sources. I don't remember what other things I've checked, if any..
-
Marcus Frenkel
- Experienced Solver

- Posts: 79
- Joined: Thu Sep 25, 2008 12:14 am
Post
by Marcus Frenkel » Sun Oct 03, 2010 8:24 pm
catalin wrote:I remember trying to do the same thing once and the only thing that made it change was to change the value of wxRICHTEXT_DEFAULT_CARET_WIDTH in wxW sources. I don't remember what other things I've checked, if any..
Seems like the only way.