Difference in caret style in wxRichTextCtrl and wxTextCtrl Topic is solved

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.
Post Reply
Marcus Frenkel
Experienced Solver
Experienced Solver
Posts: 79
Joined: Thu Sep 25, 2008 12:14 am

Difference in caret style in wxRichTextCtrl and wxTextCtrl

Post by Marcus Frenkel »

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.
User avatar
evstevemd
Part Of The Furniture
Part Of The Furniture
Posts: 2409
Joined: Wed Jan 28, 2009 11:57 am
Location: United Republic of Tanzania

Post by evstevemd »

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?
Marcus Frenkel
Experienced Solver
Experienced Solver
Posts: 79
Joined: Thu Sep 25, 2008 12:14 am

Post by Marcus Frenkel »

evstevemd wrote:code]richTextCtrl->GetCaret()->SetSize(1,1);[/code]
That causes no change in the caret style as well.
catalin
Moderator
Moderator
Posts: 1618
Joined: Wed Nov 12, 2008 7:23 am
Location: Romania

Post by catalin »

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
Experienced Solver
Posts: 79
Joined: Thu Sep 25, 2008 12:14 am

Post by Marcus Frenkel »

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.
Post Reply