Hi,
i have text like this:
"ACPI\GENUINEIN TEL_-_X86_FAMILY_6_M ODEL_13\_0"
an after displaying it in a RichTextBox as RTF string, i get this:
"ACPI_-_x86_Family_6_M odel_13 "
How can i enclose this text section, so that the RTF Engine
does it print exactly the way it is add and does not treat
backslashes and stuff like that as control charatcers,...
I know that it is a little OT, but i did not kow where to ask,...
TIA,...
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." 10 2830
Hello Kerem,
How are you inserting the string in the RichTextBox?
If you use the property "Text", it should work... Something like:
yourRichTextBox .Text = @"ACPI\GENUINEI NTEL_-_X86_FAMILY_6_M ODEL_13\_0";
or
yourRichTextBox .Text = "ACPI\\GENUINEI NTEL_-_X86_FAMILY_6_M ODEL_13\\_0";
Cheers,
Caio Proiete
Hi,
i have text like this:
"ACPI\GENUINEIN TEL_-_X86_FAMILY_6_M ODEL_13\_0"
an after displaying it in a RichTextBox as RTF string, i get this:
"ACPI_-_x86_Family_6_M odel_13 "
How can i enclose this text section, so that the RTF Engine does it
print exactly the way it is add and does not treat backslashes and
stuff like that as control charatcers,...
I know that it is a little OT, but i did not kow where to ask,...
TIA,...
Regards
Kerem
Hi Caoi,
i insert is as a formated RichText, because i want a
basic format for it. The RTF String looks like:
@"{\rtf1 {\colortbl ;\red0\green128 \blue0;\red0\gr een0\blue255;}{ \b " +
ObjectProperty. Name + @"} \par \b0 {" + da.Description + @"}\par {\b
Value: }\cf1\b0 " + ObjectValue + @" \b0 \par}";
Its an excerpt from an self-made property grid, where this block is the part
or the description pane in the lower part of the property gridls panel. The
Problem for the Rtf-Property of the RichTextBox are the "\" Backslashes,
since everything after it will be considered as a cotrol command. But there
must be some way to enclose the String as a non Rtf string or like something
"treat the string as is" inside a RFT string,...
Is there a way
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]" <ca************ ***@proiete.com schrieb im Newsbeitrag
news:c6******** *************** *@msnews.micros oft.com...
Hello Kerem,
How are you inserting the string in the RichTextBox?
If you use the property "Text", it should work... Something like:
yourRichTextBox .Text = @"ACPI\GENUINEI NTEL_-_X86_FAMILY_6_M ODEL_13\_0";
or
yourRichTextBox .Text = "ACPI\\GENUINEI NTEL_-_X86_FAMILY_6_M ODEL_13\\_0";
Cheers,
Caio Proiete
>Hi,
i have text like this:
"ACPI\GENUINEI NTEL_-_X86_FAMILY_6_M ODEL_13\_0"
an after displaying it in a RichTextBox as RTF string, i get this:
"ACPI_-_x86_Family_6_M odel_13 "
How can i enclose this text section, so that the RTF Engine does it print exactly the way it is add and does not treat backslashes and stuff like that as control charatcers,...
I know that it is a little OT, but i did not kow where to ask,...
TIA,...
Regards
Kerem
Hum.. Okay.
Just replace each backslash to *two* backslashes, as do in C# when you don't
use the "@" :).
Something like:
@"{\rtf1 {\colortbl ;\red0\green128 \blue0;\red0\gr een0\blue255;}{ \b "
+ ObjectProperty. Name.Replace(@" \", @"\\")
+ @"} \par \b0 {"
+ da.Description
+ @"}\par {\b Value: }\cf1\b0 "
+ ObjectValue.ToS tring().Replace (@"\", @"\\")
+ @" \b0 \par}";
This is probably not be the most efficient solution, though... You should
think of using a StringBuilder and use the Append method to build the correct
RTF string...
--
Caio Proiete http://www.caioproiete.com
-
Hi Caoi,
i insert is as a formated RichText, because i want a basic format for
it. The RTF String looks like:
@"{\rtf1 {\colortbl ;\red0\green128 \blue0;\red0\gr een0\blue255;}{ \b "
+ ObjectProperty. Name + @"} \par \b0 {" + da.Description + @"}\par {\b
Value: }\cf1\b0 " + ObjectValue + @" \b0 \par}";
Its an excerpt from an self-made property grid, where this block is
the part or the description pane in the lower part of the property
gridls panel. The Problem for the Rtf-Property of the RichTextBox are
the "\" Backslashes, since everything after it will be considered as a
cotrol command. But there must be some way to enclose the String as a
non Rtf string or like something "treat the string as is" inside a RFT
string,...
Is there a way
Regards
Kerem
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. There must be some way,
to represent a string as is inside a RTF string. I could
not find something i the RTF Documentation yet, but
there should be some way. The @ quoting is no
difference to me or the string.append or other string
methods. Here is no need for them,...
Maybe there is another solution,...
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]" <ca************ ***@proiete.com schrieb im Newsbeitrag
news:c6******** *************** *@msnews.micros oft.com...
Hum.. Okay.
Just replace each backslash to *two* backslashes, as do in C# when you
don't use the "@" :).
Something like:
@"{\rtf1 {\colortbl ;\red0\green128 \blue0;\red0\gr een0\blue255;}{ \b "
+ ObjectProperty. Name.Replace(@" \", @"\\") + @"} \par \b0 {" +
da.Description + @"}\par {\b Value: }\cf1\b0 " +
ObjectValue.ToS tring().Replace (@"\", @"\\") + @" \b0 \par}";
This is probably not be the most efficient solution, though... You should
think of using a StringBuilder and use the Append method to build the
correct RTF string...
--
Caio Proiete http://www.caioproiete.com
-
>Hi Caoi,
i insert is as a formated RichText, because i want a basic format for it. The RTF String looks like:
@"{\rtf1 {\colortbl ;\red0\green128 \blue0;\red0\gr een0\blue255;}{ \b " + ObjectProperty. Name + @"} \par \b0 {" + da.Description + @"}\par {\b Value: }\cf1\b0 " + ObjectValue + @" \b0 \par}";
Its an excerpt from an self-made property grid, where this block is the part or the description pane in the lower part of the property gridls panel. The Problem for the Rtf-Property of the RichTextBox are the "\" Backslashes, since everything after it will be considered as a cotrol command. But there must be some way to enclose the String as a non Rtf string or like something "treat the string as is" inside a RFT string,...
Is there a way
Regards
Kerem
On Aug 29, 3:47*am, Kerem Gümrükcü <kareem...@hotm ail.comwrote:
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).
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
--
-----------------------
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."
"Pavel Minaev" <in****@gmail.c omschrieb im Newsbeitrag
news:da******** *************** ***********@59g 2000hsb.googleg roups.com...
On Aug 29, 3:47 am, Kerem Gümrükcü <kareem...@hotm ail.comwrote:
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).
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" <in****@gmail.c omschrieb im Newsbeitrag
news:da******** *************** ***********@59g 2000hsb.googleg roups.com.
.. On Aug 29, 3:47 am, Kerem Gümrükcü <kareem...@hotm ail.comwrote:
>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).
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]" <ca************ ***@proiete.com schrieb im Newsbeitrag
news:c6******** *************** *@msnews.micros oft.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" <in****@gmail.c omschrieb im Newsbeitrag news:da******* *************** ************@59 g2000hsb.google groups.com. .. On Aug 29, 3:47 am, Kerem Gümrükcü <kareem...@hotm ail.comwrote:
>>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).
Oh, okay :).
--
Caio Proiete http://www.caioproiete.com
-
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. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Wynter |
last post by:
RE: from Displaying a Document using the ASPNET user account to the Client Browser discussion (3/2/2004
Buddy
Thanks for helping me on getting the document to display. But now I am left with a second issue. While I was displaying the document as an attachment I end up with an extra window open or if I remove the Target='_blank' then my main window goes blank
What I am doing is using the base code from...
|
by: Yoshitha |
last post by:
hi
I have datalist control in my ASP.NET application
the problem here is
i have used a textbox with multiline true propertly when i enter data like
"fdjsfhjksdhfjsdfhsdjhfsdfhsdjfhsd
jfdsjfksdjfksdjkfjsdfjksdjfsdjfd
fdsfhjsdhfjsdhfjf dsjf dsjfhjsdfhjksdh d fdsjf
hsdjkfhdjsfhsdjfh ds
|
by: Tomaz Koritnik |
last post by:
Hi
I have many short HTML files stored in a binary stream storage to display
descriptions for various items in application. HTML would be display inside
application using some .NET control or COM control (like Microsoft
WebBrowser). For each description there is one HTML file and along
description text, it contains links to related information. Clicking related
information would for example open new form in application and display some...
|
by: Earl Teigrob |
last post by:
I can create a new custom control (and not change it) and add it to the
toolbox and drag it onto the disign screen and it works just fine,
displaying the text . However, when I add the following
datepicker control to the toolbox, it just shows a yellow dot and thats it.
What happened to the text???
Earl
|
by: Eric Lindsay |
last post by:
I can't figure how to best display little snippets of shell script using
<pre>. I just got around to organising to bulk validate some of my web
pages, and one of the problems occurs with Bash shell pieces like this:
<pre><code>
#!/bin/sh
ftp -i -n ftp.server.com< <EOF
user username password
epsv4
cd /
| |
by: gnewsgroup |
last post by:
I've googled and tried various approaches, but could not resolve this
problem. The article at MSDN: Displaying Images in a GridView Column
only presents a simple case where all data (including the images) of
the gridview come from a single table/datasource.
Here is my situation. In my web application, I need to display
customer bills info in a gridview.
Customer names and contact info are from the Customer table.
|
by: seanh |
last post by:
Hello,
I am having problems on displaying deep node elements <DDD> and <EEE> using a stylesheet to display it in html. In the ouput that I am trying to get (the part with the (******) below) is where I am having the problems,(the part with the (---) below) I was able to display.
Can anyone please help.
xml file:
<ALPHA>
<AAA="26">
<BBB>
<CCC>
|
by: =?iso-8859-1?B?S2VyZW0gR/xtcvxrY/w=?= |
last post by:
Hi,
i have text like this:
"ACPI\GENUINEINTEL_-_X86_FAMILY_6_MODEL_13\_0"
an after displaying it in a RichTextBox as RTF string, i get this:
"ACPI_-_x86_Family_6_Model_13 "
|
by: RichB |
last post by:
I am trying to get to grips with the asp.net ajaxcontrol toolkit, and am
trying to add a tabbed control to the page.
I have no problems within the aspx file, and can dynamically manipulate a
tabcontainer which has 1 panel already, however I want to try create the
TabPanels dynamically. I followed the advice here:
http://www.asp.net/learn/ajax-videos/video-156.aspx (3rd comment - Joe
Stagner)
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| | |