<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Text formatieren]]></title><description><![CDATA[<p>Hallo,</p>
<p>Ich habe einen Text der über eine Spezielle Formatierung farbig wird:</p>
<blockquote>
<p>Formatierter Text:<br />
Das ist rot, das ist blau</p>
<p>Plaintext:<br />
Das ist <sup>FF0000rot</sup>FFFFFF, das ist ^0000FFblau</p>
</blockquote>
<p>Edit: Die farbe wird hier leider nicht angezeigt im forum mit [color]</p>
<p>NUn wollte ich fragen wie mache ich es am besten das ich das mit einem RichEdit in der Farbe dargestellt wird wie es in echt sein soll?<br />
Ich meine nicht wie ich es farbig mach, sondern das auslesen das der an der richtigen Stelle die Farbe einsetzt. Und auch wieder zurück.</p>
<p>Ich hoffe da kann mir jemand helfen.</p>
<p>~Jukka</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/176743/text-formatieren</link><generator>RSS for Node</generator><lastBuildDate>Sat, 15 Aug 2026 06:27:54 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/176743.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 24 Mar 2007 13:06:04 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Text formatieren on Sat, 24 Mar 2007 13:06:54 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>Ich habe einen Text der über eine Spezielle Formatierung farbig wird:</p>
<blockquote>
<p>Formatierter Text:<br />
Das ist rot, das ist blau</p>
<p>Plaintext:<br />
Das ist <sup>FF0000rot</sup>FFFFFF, das ist ^0000FFblau</p>
</blockquote>
<p>Edit: Die farbe wird hier leider nicht angezeigt im forum mit [color]</p>
<p>NUn wollte ich fragen wie mache ich es am besten das ich das mit einem RichEdit in der Farbe dargestellt wird wie es in echt sein soll?<br />
Ich meine nicht wie ich es farbig mach, sondern das auslesen das der an der richtigen Stelle die Farbe einsetzt. Und auch wieder zurück.</p>
<p>Ich hoffe da kann mir jemand helfen.</p>
<p>~Jukka</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1251612</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1251612</guid><dc:creator><![CDATA[Jukka]]></dc:creator><pubDate>Sat, 24 Mar 2007 13:06:54 GMT</pubDate></item><item><title><![CDATA[Reply to Text formatieren on Sat, 24 Mar 2007 13:26:58 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>Wenn du so ein selbstgestricktes Format hast, must du es auch selber parsen und auswerten. Du solltest besser gleich das ganze als RTF speichern und laden.</p>
<p>bis bald<br />
akari</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1251620</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1251620</guid><dc:creator><![CDATA[akari]]></dc:creator><pubDate>Sat, 24 Mar 2007 13:26:58 GMT</pubDate></item><item><title><![CDATA[Reply to Text formatieren on Sat, 24 Mar 2007 13:35:15 GMT]]></title><description><![CDATA[<p>Ds ist es ja, wie parse ich das so am besten?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1251623</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1251623</guid><dc:creator><![CDATA[Jukka]]></dc:creator><pubDate>Sat, 24 Mar 2007 13:35:15 GMT</pubDate></item><item><title><![CDATA[Reply to Text formatieren on Sat, 24 Mar 2007 14:03:51 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>Der Builder (wobei ich nur bis Version 5 kenne) bietet keine spezielle Funktionen dafür, da müßtest du mit den normalen AnsiString-Funktionen arbeiten (::AnsiPos, SubString, Delete)</p>
<p>bis bald<br />
akari</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1251636</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1251636</guid><dc:creator><![CDATA[akari]]></dc:creator><pubDate>Sat, 24 Mar 2007 14:03:51 GMT</pubDate></item><item><title><![CDATA[Reply to Text formatieren on Sat, 24 Mar 2007 14:11:26 GMT]]></title><description><![CDATA[<p>Hm ok, das sollte ich noch hinbekommen. Nur noch die Frage: Wir kann ich es aus dem Formatierten Text heraus wieder &quot;zurückparsen&quot;, weil ja keine anzeigen für die Farbe im text stehen irgendwie.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1251641</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1251641</guid><dc:creator><![CDATA[Jukka]]></dc:creator><pubDate>Sat, 24 Mar 2007 14:11:26 GMT</pubDate></item><item><title><![CDATA[Reply to Text formatieren on Sat, 24 Mar 2007 14:16:33 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>Da ist es wohl am einfachsten du speicherst das als RTF ab und schaust dir das Ergebnis im Klartext an. Dort siehst du was im RTF-Format für Tags verwendet die du dann einfach durch deine eigenen ersetzen must.</p>
<p>bis bald<br />
akari</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1251644</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1251644</guid><dc:creator><![CDATA[akari]]></dc:creator><pubDate>Sat, 24 Mar 2007 14:16:33 GMT</pubDate></item><item><title><![CDATA[Reply to Text formatieren on Sat, 24 Mar 2007 16:43:19 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>Nun ich wollte erstmal zum Testen eine Funtion schreiben die wenn eine Formatierung gefunden wird die ganze Zeile färbt jedoch gibt es dort ein Problem:</p>
<pre><code class="language-cpp">void ParseIncomingText(TMemo *Text, TRichEdit *FormatedText)
 {
	for (int i = 0; i &lt; Text-&gt;Lines-&gt;Count; i++)
	 {
		if(Text-&gt;Lines-&gt;Strings[i].Pos(&quot;^&quot;) &gt; 0)
		 {
			   FormatedText-&gt;Lines-&gt;Add(Text-&gt;Lines-&gt;Strings[i]);
			   int Color = ConvertToColor(
							FormatedText-&gt;Lines-&gt;Strings[FormatedText-&gt;Lines-&gt;Count-1].
							SubString(FormatedText-&gt;Lines-&gt;Strings[FormatedText-&gt;Lines-&gt;Count-1].Pos(&quot;^&quot;)+1
							,6)
						   );
			   FormatedText-&gt;Lines-&gt;Strings[i].Delete(FormatedText-&gt;Lines-&gt;Strings[FormatedText-&gt;Lines-&gt;Count-1].Pos(&quot;^&quot;),6);
			   FormatedText-&gt;SelectAll();
			   FormatedText-&gt;SelAttributes-&gt;Color = Color;
		 }
	 }
 }
</code></pre>
<p>ConvertToColor st eine Funktion zum umwandeln des Strings in TColor die funktioniert. Wenn ich mir Color ausgeben lasse istd er wert richtig.<br />
Die funktion Schreibt den Text dann auch in der Richtigen Farbe in das RichEdit. Jedoch löscht das Hex nicht. Und ich weiß auch ncicht wie ich es am besten machen woll wenn da mehere formationen sind.</p>
<p>Ich überlege daran es mit sscanf zu probieren</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1251722</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1251722</guid><dc:creator><![CDATA[Jukka]]></dc:creator><pubDate>Sat, 24 Mar 2007 16:43:19 GMT</pubDate></item><item><title><![CDATA[Reply to Text formatieren on Sat, 24 Mar 2007 18:54:43 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>Bleib besser bei VCL-Mitteln und benutzt den <a href="http://www.junix.ch/bcb/help/debug.html" rel="nofollow">Debugger</a> um den Verlauf deines Programmes sowie die Werte in den Variablen Schritt für Schritt durchzugehen.</p>
<p>bis bald<br />
akari</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1251815</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1251815</guid><dc:creator><![CDATA[akari]]></dc:creator><pubDate>Sat, 24 Mar 2007 18:54:43 GMT</pubDate></item></channel></rss>