|
|
|
date: Fri, 29 Aug 2008 20:49:05 +0000 (UTC),
group: microsoft.public.dotnet.framework.windowsforms
back
Re: Displaying Text in a RichtText Control Problems,...
Hi Kerem,
I don't get it when you say this is not a 100% solution... This is the only
solution! :)
If you do a simple test, and set the Text property of a RichTextBox including
RTF Control Codes such as "\", and then check the Rtf property, you will
notice that the RichTextBox control duplicate the control codes...
Cheers,
--
Caio Proiete
http://www.caioproiete.com
-
> Hi,
>
> thnaks for the reply. Well thats what i also found out.
> The RTF Docs made this clear and my conclusion here
> is, that i have to work with regular expressions to replace
> everything that can be "collide" with RTF Control Codes.
> Well, this is also no 100% solution, but the best so far,...
>
> Thanks for all the Answers,...
>
> Regards
>
> Kerem
>
> "Pavel Minaev" schrieb im Newsbeitrag
> news:da794795-56bc-455a-8e44-600377b2e69c@59g2000hsb.googlegroups.com.
> .. On Aug 29, 3:47 am, Kerem Gümrükcü wrote:
>
>> Hi Caio,
>>
>>> Just replace each backslash to *two* backslashes, as >do in C# when
>>> you don't use the "@" :).
>>>
>> well, this is no real solution, since the could be a
>> situation were you have to backslashes and then
>> you will have three there.
> No, that's precisely the solution. To represent a literal backslash in
> RTF, you need to use the double-backslash escape, @"\\". If the source
> code has two backslashes, a plain replace will never yield three - you
> will have four (and the RichTextBox will correspondingly show those as
> two literal backslashes).
>
date: Fri, 29 Aug 2008 20:49:05 +0000 (UTC)
author: Caio Proiete [MCT]
Re: Displaying Text in a RichtText Control Problems,...
Hi Caio,
>I don't get it when you say this is not a 100% solution... This is the only
>solution! :)
yes it is and i am not saticfied with RTF anylonger so thats why
i use a GDI(+) solution. It was a wrong decision to use RTF,
because i needed several Graphics Operations that could not
be done with RTF, better to say redered,...
Thanks for you reply,...
Regards
Kerem.
--
-----------------------
Beste Grüsse / Best regards / Votre bien devoue
Kerem Gümrükcü
Latest Project: http://www.codeplex.com/restarts
Latest Open-Source Projects: http://entwicklung.junetz.de
-----------------------
"This reply is provided as is, without warranty express or implied."
"Caio Proiete [MCT]" schrieb im Newsbeitrag
news:c69190b38398cad83831688ca2@msnews.microsoft.com...
> Hi Kerem,
>
> I don't get it when you say this is not a 100% solution... This is the
> only solution! :)
>
> If you do a simple test, and set the Text property of a RichTextBox
> including RTF Control Codes such as "\", and then check the Rtf property,
> you will notice that the RichTextBox control duplicate the control
> codes...
>
> Cheers,
>
> --
> Caio Proiete
> http://www.caioproiete.com
>
>
> -
>
>> Hi,
>>
>> thnaks for the reply. Well thats what i also found out.
>> The RTF Docs made this clear and my conclusion here
>> is, that i have to work with regular expressions to replace
>> everything that can be "collide" with RTF Control Codes.
>> Well, this is also no 100% solution, but the best so far,...
>>
>> Thanks for all the Answers,...
>>
>> Regards
>>
>> Kerem
>>
>> "Pavel Minaev" schrieb im Newsbeitrag
>> news:da794795-56bc-455a-8e44-600377b2e69c@59g2000hsb.googlegroups.com.
>> .. On Aug 29, 3:47 am, Kerem Gümrükcü wrote:
>>
>>> Hi Caio,
>>>
>>>> Just replace each backslash to *two* backslashes, as >do in C# when
>>>> you don't use the "@" :).
>>>>
>>> well, this is no real solution, since the could be a
>>> situation were you have to backslashes and then
>>> you will have three there.
>> No, that's precisely the solution. To represent a literal backslash in
>> RTF, you need to use the double-backslash escape, @"\\". If the source
>> code has two backslashes, a plain replace will never yield three - you
>> will have four (and the RichTextBox will correspondingly show those as
>> two literal backslashes).
>>
>
>
date: Sat, 30 Aug 2008 00:37:59 +0200
author: Kerem Gümrükcü
Re: Displaying Text in a RichtText Control Problems,...
On Aug 30, 2:37 am, Kerem Gümrükcü wrote:
> Hi Caio,
>
> >I don't get it when you say this is not a 100% solution... This is the only
> >solution! :)
>
> yes it is and i am not saticfied with RTF anylonger so thats why
> i use a GDI() solution. It was a wrong decision to use RTF,
> because i needed several Graphics Operations that could not
> be done with RTF, better to say redered,...
>
> Thanks for you reply,...
If you have some reasonably complicated text layout with inline vector
graphics, and you do not mind a dependency on 3.0, consider hosting
the WPF FlowDocument control inside your WinForms application.
date: Sun, 31 Aug 2008 00:49:48 -0700 (PDT)
author: Pavel Minaev
|
|