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.
style bug - before.png (768 Bytes) Viewed 2524 times
But when I Enter in the middle of the coloured section the whole first line is red styled.
style bug - after.png (904 Bytes) Viewed 2524 times
I think it's a bug so I've made a ticket for it https://trac.wxwidgets.org/ticket/18494 but maybe I'm doing something wrong, so just to be sure I ask it here as well.
FWIW, you shouldn't get your hopes up to get a fix. I have a total of 4 open tickets regarding wxRTC which are several years old. The wxRTC code is quite complex and "unique", and except for the orginal author Julian Smart there is hardly anyone able to fix anything in it. But unfortunately he's not very active.
Yes I noticed the other open tickets regarding wxRichTextCtrl. I'm already trying to grasp what's going on but have a hard time understanding some portions of the code. The styling of the paragraph where the break happens is done here: https://github.com/wxWidgets/wxWidgets/ ... .cpp#L2955
if (!(fragment.GetAttributes().GetFlags() & wxTEXT_ATTR_KEEP_FIRST_PARA_STYLE))
{
para->SetAttributes(firstPara->GetAttributes());
para->SetProperties(firstPara->GetProperties());
}
'para' is the original paragraph, 'firstPara' the first paragraph of the fragment being inserted in 'para'.
But should a paragraph take over the style of a fragment being inserted anyway?
doublemax wrote: ↑Tue Sep 10, 2019 8:57 am
FWIW, you shouldn't get your hopes up to get a fix. I have a total of 4 open tickets regarding wxRTC which are several years old. The wxRTC code is quite complex and "unique", and except for the orginal author Julian Smart there is hardly anyone able to fix anything in it. But unfortunately he's not very active.
One time I tried to add export to Richtext and could not wrap my head around it. Of course JS was indeed supportive and failure was on my side. I think Mr. Smart ned to document how the Control works and how the classes interact with each other. Otherwise the control won't get much updates unless he's the one doing it!
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?
Hi,
I think he started dropping out when we switched to git.
Anyway, I hope someone can ping him and hopefully he will come back and support his baby (wxWidgets) again.
Question: If wxWidgets purpose is to use the platform's native API as much as possible, why doesn't wxRTC use/wrap the richedit control shipped with Windows with all it's functionality? AFAICS it has al the styling and paragraph formatting. https://docs.microsoft.com/en-us/window ... t-controls
Hi,
It does - look at the wxTextCtrl with TE_RICH2 style.
However, there are some other OSes which does not have support for different styling, paragraph, etc.
That's why Julian created this special wxRTC library to be used there.
ONEEYEMAN wrote: ↑Wed Sep 11, 2019 2:15 pm
It does - look at the wxTextCtrl with TE_RICH2 style.
However, there are some other OSes which does not have support for different styling, paragraph, etc.
Yes, wxTextCtrl uses the native control. But wxRTC doesn't, it draws text itself using wxDC::DrawText.
But just like wxDataViewCtrl has a native implemention on osx/gtk and a custom for msw, I thought it would be nice if we could use the native msw control with it's formatting/styling functionality.