<?xml version='1.0' encoding="utf-8"?>
      <rss version='2.0'>
      <channel>
      <title>Форум на Исходниках.RU</title>
      <link>https://forum.sources.ru</link>
      <description>Форум на Исходниках.RU</description>
      <generator>Форум на Исходниках.RU</generator>
  	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=50719&amp;view=findpost&amp;p=336387</guid>
        <pubDate>Mon, 12 Apr 2004 05:36:04 +0000</pubDate>
        <title>Почему не устанавливается компонент?</title>
        <link>https://forum.sources.ru/index.php?showtopic=50719&amp;view=findpost&amp;p=336387</link>
        <description><![CDATA[IrQX: Мастера Дельфи сказали в чем ошибка.<br>
Ошибка вот в чем:<br>
<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">&nbsp;</div><div class="code_line">.....</div><div class="code_line">procedure register;</div><div class="code_line">&nbsp;</div><div class="code_line">impenmetation</div><div class="code_line">&nbsp;</div><div class="code_line">procedure Register;</div><div class="code_line">.......</div></ol></div></div></div></div><script>preloadCodeButtons('1');</script><br>
<br>
а надо:<br>
<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">&nbsp;</div><div class="code_line">.....</div><div class="code_line">procedure Register;</div><div class="code_line">&nbsp;</div><div class="code_line">impenmetation</div><div class="code_line">&nbsp;</div><div class="code_line">procedure Register;</div><div class="code_line">.......</div></ol></div></div></div></div><br>
<br>
обратите внимание что &quot;[/B]R[B]egiter&quot; с большой буквы...<br>
<br>
Вот такие вот особенности в Дельфи.<br>
<br>
Считаю тему закрытой :D <br>
<br>
Всем спасибо&#33;]]></description>
        <author>IrQX</author>
        <category>Delphi: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=50719&amp;view=findpost&amp;p=335881</guid>
        <pubDate>Sun, 11 Apr 2004 04:16:22 +0000</pubDate>
        <title>Почему не устанавливается компонент?</title>
        <link>https://forum.sources.ru/index.php?showtopic=50719&amp;view=findpost&amp;p=335881</link>
        <description><![CDATA[IrQX: товарищи предложения еще есть?<br><br>З.Ы. Снова надеюсь на вашу отзывчивость  :rolleyes:]]></description>
        <author>IrQX</author>
        <category>Delphi: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=50719&amp;view=findpost&amp;p=335848</guid>
        <pubDate>Sat, 10 Apr 2004 23:36:46 +0000</pubDate>
        <title>Почему не устанавливается компонент?</title>
        <link>https://forum.sources.ru/index.php?showtopic=50719&amp;view=findpost&amp;p=335848</link>
        <description><![CDATA[Song: Это одно и то же.]]></description>
        <author>Song</author>
        <category>Delphi: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=50719&amp;view=findpost&amp;p=335837</guid>
        <pubDate>Sat, 10 Apr 2004 22:57:37 +0000</pubDate>
        <title>Почему не устанавливается компонент?</title>
        <link>https://forum.sources.ru/index.php?showtopic=50719&amp;view=findpost&amp;p=335837</link>
        <description><![CDATA[IrQX: Delphi 8 и Delphi .NET  - это одно и тоже. Только компоненты там, насколько я знаю пишутся иначе, если пишутся вовсе.]]></description>
        <author>IrQX</author>
        <category>Delphi: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=50719&amp;view=findpost&amp;p=335710</guid>
        <pubDate>Sat, 10 Apr 2004 16:39:38 +0000</pubDate>
        <title>Почему не устанавливается компонент?</title>
        <link>https://forum.sources.ru/index.php?showtopic=50719&amp;view=findpost&amp;p=335710</link>
        <description><![CDATA[Kostas: <div class='tag-quote'><span class='tag-quote-prefix'>Цитата</span> <div class='quote '><strong class='tag-b'>IrQX</strong>, 10.04.04, 16:00<br>
у меня Delphi 7. выше только Delphi .NET </div></div><br>
есть еще Delphi 8]]></description>
        <author>Kostas</author>
        <category>Delphi: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=50719&amp;view=findpost&amp;p=335531</guid>
        <pubDate>Sat, 10 Apr 2004 10:00:01 +0000</pubDate>
        <title>Почему не устанавливается компонент?</title>
        <link>https://forum.sources.ru/index.php?showtopic=50719&amp;view=findpost&amp;p=335531</link>
        <description><![CDATA[IrQX: у меня Delphi 7. выше только Delphi .NET]]></description>
        <author>IrQX</author>
        <category>Delphi: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=50719&amp;view=findpost&amp;p=335390</guid>
        <pubDate>Sat, 10 Apr 2004 03:47:31 +0000</pubDate>
        <title>Почему не устанавливается компонент?</title>
        <link>https://forum.sources.ru/index.php?showtopic=50719&amp;view=findpost&amp;p=335390</link>
        <description><![CDATA[мыш: Может попробовать откомпилить код в более новой версии дельфи? Анализатор должен быть более совершенный, может найдет ошибку...]]></description>
        <author>мыш</author>
        <category>Delphi: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=50719&amp;view=findpost&amp;p=335365</guid>
        <pubDate>Sat, 10 Apr 2004 00:40:48 +0000</pubDate>
        <title>Почему не устанавливается компонент?</title>
        <link>https://forum.sources.ru/index.php?showtopic=50719&amp;view=findpost&amp;p=335365</link>
        <description><![CDATA[IrQX: Нет, это не в пакете дело, хотя на всякий случай, поэксперементировал с опциями. А заодно с параметрами компиляции, но все равно: результат старый...  &lt;_&lt; <br><br>З.Ы. Может есть еще какие-либопредложения?<br>З.Ы.Ы Заранее всем благодарен&#33;]]></description>
        <author>IrQX</author>
        <category>Delphi: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=50719&amp;view=findpost&amp;p=334698</guid>
        <pubDate>Fri, 09 Apr 2004 07:20:35 +0000</pubDate>
        <title>Почему не устанавливается компонент?</title>
        <link>https://forum.sources.ru/index.php?showtopic=50719&amp;view=findpost&amp;p=334698</link>
        <description><![CDATA[ych_boriss: Попробуй поиграться с опциями пакета, например выстави:<br>
<br>
<strong class='tag-b'>Usage Options</strong> = Designtime and Runtime<br>
<strong class='tag-b'>Build Control</strong> = Explict rebuild<br>
<br>
Это на вкладке <strong class='tag-b'>Description</strong> опций проекта. И перекомпилируй]]></description>
        <author>ych_boriss</author>
        <category>Delphi: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=50719&amp;view=findpost&amp;p=334632</guid>
        <pubDate>Fri, 09 Apr 2004 04:30:04 +0000</pubDate>
        <title>Почему не устанавливается компонент?</title>
        <link>https://forum.sources.ru/index.php?showtopic=50719&amp;view=findpost&amp;p=334632</link>
        <description><![CDATA[IrQX: Спасибо всем за поддержку и помощь&#33;<br><br>Да я ставил его и в отдельный пакет и в общий - итог один.<br><br>2 мыш: насчет модуля Windows сказать трудно: если мне не изменяет память, то я писал компоненту и она ставилась без него. В принципе я не против его добавить, но тогда IDE начинает ругаться, на класс TBitmap и Канву (см. выше).]]></description>
        <author>IrQX</author>
        <category>Delphi: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=50719&amp;view=findpost&amp;p=334622</guid>
        <pubDate>Fri, 09 Apr 2004 03:59:50 +0000</pubDate>
        <title>Почему не устанавливается компонент?</title>
        <link>https://forum.sources.ru/index.php?showtopic=50719&amp;view=findpost&amp;p=334622</link>
        <description><![CDATA[мыш: Да чего вы набросились на пацана? Он действительно не ставится ни в какую ни в одтельный пакет ни просто. При этом компилируется успешно, но до тех пор, пока нет модуля Windows в uses. Вообще, такое ощущение, что это какая-то очень хитрая ошибка в модуле где-то до функции create, знаете бывает так что строку не закроешь где-нибудь в начале, а ошибка выдается в середине модуля, ругаясь на вполне законное создание какого-нибудь экземпляра. Мне кажется здесь тоже самое и лучшим методом будет пересоздать модуль и немножко покопировать текст туда-сюда.]]></description>
        <author>мыш</author>
        <category>Delphi: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=50719&amp;view=findpost&amp;p=334612</guid>
        <pubDate>Fri, 09 Apr 2004 02:39:58 +0000</pubDate>
        <title>Почему не устанавливается компонент?</title>
        <link>https://forum.sources.ru/index.php?showtopic=50719&amp;view=findpost&amp;p=334612</link>
        <description><![CDATA[Vit: Ты в отдельный пакет ставил?]]></description>
        <author>Vit</author>
        <category>Delphi: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=50719&amp;view=findpost&amp;p=334606</guid>
        <pubDate>Fri, 09 Apr 2004 02:09:39 +0000</pubDate>
        <title>Почему не устанавливается компонент?</title>
        <link>https://forum.sources.ru/index.php?showtopic=50719&amp;view=findpost&amp;p=334606</link>
        <description><![CDATA[IrQX: 2 Song: я так и делал. Обычно сразу появляется окно : &quot;такой-то компонент - установлен&#33;&quot;<br>но в моем случае ничего не происходило...  &lt;_&lt; <br><br>я как-то встречался с таким... но полная перепись кода испраивило этот &quot;глюк&quot;... щас у меня нет времени переписывать заново, к тому же не знаю: поможет ли это. Поэтому я и спрашиваю.<br><br>З.Ы. может это из-за перекрытия какой-либо функции (в коде) ???]]></description>
        <author>IrQX</author>
        <category>Delphi: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=50719&amp;view=findpost&amp;p=334327</guid>
        <pubDate>Thu, 08 Apr 2004 13:54:07 +0000</pubDate>
        <title>Почему не устанавливается компонент?</title>
        <link>https://forum.sources.ru/index.php?showtopic=50719&amp;view=findpost&amp;p=334327</link>
        <description><![CDATA[Song: <strong class='tag-b'>IrQX</strong>, так делал? :<br>
1) Install component<br>
2) Compile package (если нужно)<br>
3) Install package]]></description>
        <author>Song</author>
        <category>Delphi: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=50719&amp;view=findpost&amp;p=334297</guid>
        <pubDate>Thu, 08 Apr 2004 13:14:25 +0000</pubDate>
        <title>Почему не устанавливается компонент?</title>
        <link>https://forum.sources.ru/index.php?showtopic=50719&amp;view=findpost&amp;p=334297</link>
        <description><![CDATA[ych_boriss: <strong class='tag-b'>IrQX</strong>, извини, не хотел обидеть.<br>
расскажи, как устанавливал пакет.]]></description>
        <author>ych_boriss</author>
        <category>Delphi: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=50719&amp;view=findpost&amp;p=334268</guid>
        <pubDate>Thu, 08 Apr 2004 12:48:34 +0000</pubDate>
        <title>Почему не устанавливается компонент?</title>
        <link>https://forum.sources.ru/index.php?showtopic=50719&amp;view=findpost&amp;p=334268</link>
        <description><![CDATA[IrQX: 2 ych_boriss: спасибо за издевательство&#33; Но Обязан возразить&#33; вкладки CHAT там нету, и прокручивать я умею  :angry: я же прошу не усмехаться а помочь разобраться в этой &quot;недокументированной&quot; особенности...  :wall:]]></description>
        <author>IrQX</author>
        <category>Delphi: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=50719&amp;view=findpost&amp;p=334148</guid>
        <pubDate>Thu, 08 Apr 2004 10:50:07 +0000</pubDate>
        <title>Почему не устанавливается компонент?</title>
        <link>https://forum.sources.ru/index.php?showtopic=50719&amp;view=findpost&amp;p=334148</link>
        <description><![CDATA[ych_boriss: Ну не могет такова быть&#33;<br>Что вкладки &quot;CHAT&quot; на палитре вообще нету?. А ты в конец вкладок прокручивал?]]></description>
        <author>ych_boriss</author>
        <category>Delphi: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=50719&amp;view=findpost&amp;p=334002</guid>
        <pubDate>Thu, 08 Apr 2004 07:45:20 +0000</pubDate>
        <title>Почему не устанавливается компонент?</title>
        <link>https://forum.sources.ru/index.php?showtopic=50719&amp;view=findpost&amp;p=334002</link>
        <description><![CDATA[IrQX: 2 Song: я не говорю, что тут телепаты, поэтому вот пас файл.<br>&quot;не хочет&quot; - понимается, что он устанавливается, но в палитре компонентов не появляется.<br><br>2 мыш: пробовал добавить Windows получаю ошифки о подмене типов, точнее отказывается работать TBitMap и точно не помню, но по-моему, еще и Canvas...<br><br>2 All : Спасибо что откликнулись, а не бросили в беде :D]]></description>
        <author>IrQX</author>
        <category>Delphi: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=50719&amp;view=findpost&amp;p=333932</guid>
        <pubDate>Thu, 08 Apr 2004 04:36:46 +0000</pubDate>
        <title>Почему не устанавливается компонент?</title>
        <link>https://forum.sources.ru/index.php?showtopic=50719&amp;view=findpost&amp;p=333932</link>
        <description><![CDATA[мыш: Я вам не скажу за всю Одессу... Но при добавлении в юзес модуля windows начинают происходить странные вещи. Попробуй.]]></description>
        <author>мыш</author>
        <category>Delphi: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=50719&amp;view=findpost&amp;p=333924</guid>
        <pubDate>Thu, 08 Apr 2004 04:19:37 +0000</pubDate>
        <title>Почему не устанавливается компонент?</title>
        <link>https://forum.sources.ru/index.php?showtopic=50719&amp;view=findpost&amp;p=333924</link>
        <description><![CDATA[Song: ну что значит &quot;не хочет&quot; ?<br>Думаешь тут телепаты собрались или все подорвались твой текст сохранить в pas и попробовать его установить?]]></description>
        <author>Song</author>
        <category>Delphi: Общие вопросы</category>
      </item>
	
      <item>
        <guid isPermaLink='true'>https://forum.sources.ru/index.php?showtopic=50719&amp;view=findpost&amp;p=333898</guid>
        <pubDate>Thu, 08 Apr 2004 02:11:32 +0000</pubDate>
        <title>Почему не устанавливается компонент?</title>
        <link>https://forum.sources.ru/index.php?showtopic=50719&amp;view=findpost&amp;p=333898</link>
        <description><![CDATA[IrQX: На днях писал компонент, для чата с поддержкой цветов и смайликов, и столкнулся с такой проблеммой: компонент откомпилировался, а устанавливаться не хочет  &lt;_&lt; . Если кто-нибудь знает в чем тут проблема, объясните плиз&#33;<br>
<br>
Вот код:<br>
<br>
<div class='tag-code'><span class='pre_code'></span><div class='code  code_collapsed ' title='Подсветка синтаксиса доступна зарегистрированным участникам Форума.' style=''><div><div><ol type="1"><div class="code_line">&nbsp;</div><div class="code_line">unit ChatEdit;</div><div class="code_line">&nbsp;</div><div class="code_line">interface</div><div class="code_line">&nbsp;</div><div class="code_line">uses Controls, Types, SysUtils, Graphics, Classes, Forms, StdCtrls, ExtCtrls;</div><div class="code_line">&nbsp;</div><div class="code_line">const</div><div class="code_line">&nbsp;&nbsp;NRSMILIES = 35;</div><div class="code_line">&nbsp;&nbsp;SMILESIZE = 20;</div><div class="code_line">&nbsp;&nbsp;SmileCodes:array[0..NRSMILIES-1]of string[4]=</div><div class="code_line">&nbsp;&nbsp;(&#39;8-|&#39;, &#39;:-/&#39;, &#39;:O&#39;, &#39;&#62;:)&#39;, &#39;0:)&#39;, &#39;:-&amp;&#39;, &#39;(:|&#39;, &#39;8-}&#39;,</div><div class="code_line">&nbsp;&nbsp;&#39;:x&#39;, &#39;X-(&#39;, &#39;:((&#39;, &#39;:-B&#39;, &#39;:-$&#39;, &#39;=P~&#39;, &#39;=D&#62;&#39;, &#39;:\&quot;&#62;&#39;, &#39;:&#62;&#39;, &#39;:))&#39;,</div><div class="code_line">&nbsp;&nbsp;&#39;=;&#39;, &#39;[-(&#39;, &#39;:-?&#39;, &#39;:D&#39;, &#39;:p&#39;, &#39;B-)&#39;, &#39;:|&#39;, &#39;I-)&#39;, &#39;:o)&#39;, &#39;#-o&#39;, &#39;;)o&#39;, &#39;:-*&#39;, &#39;:-S&#39;, &#39;/:)&#39;, &#39;:)&#39;, &#39;:(&#39;, &#39;;)&#39;);</div><div class="code_line">&nbsp;</div><div class="code_line">type</div><div class="code_line">TChatEdit = class(TPaintBox)</div><div class="code_line">protected</div><div class="code_line">&nbsp;&nbsp;FLines : TStringList;</div><div class="code_line">&nbsp;&nbsp;DisplayLines : TStringList;</div><div class="code_line">&nbsp;&nbsp;FFont : TFont;</div><div class="code_line">&nbsp;&nbsp;FScrollBar : TScrollBar;</div><div class="code_line">&nbsp;&nbsp;FBkColor,FTextColor1,FTextColor2,FTextColor3,FTextColor4,FTextColor5: TColor;</div><div class="code_line">&nbsp;&nbsp;FPosition : word;</div><div class="code_line">&nbsp;&nbsp;FNrLines : integer;</div><div class="code_line">&nbsp;&nbsp;Smilies : TBitmap;</div><div class="code_line">&nbsp;&nbsp;FSmiliesFile: string;</div><div class="code_line">&nbsp;&nbsp;procedure Paint; override;</div><div class="code_line">&nbsp;&nbsp;procedure SetBkColor(nc:TColor);</div><div class="code_line">&nbsp;&nbsp;procedure SetTextColor1(nc:TColor);</div><div class="code_line">&nbsp;&nbsp;procedure SetTextColor2(nc:TColor);</div><div class="code_line">&nbsp;&nbsp;procedure SetTextColor3(nc:TColor);</div><div class="code_line">&nbsp;&nbsp;procedure SetTextColor4(nc:TColor);</div><div class="code_line">&nbsp;&nbsp;procedure SetTextColor5(nc:TColor);</div><div class="code_line">&nbsp;&nbsp;procedure SetFont(nf : TFont);</div><div class="code_line">&nbsp;&nbsp;procedure SetPosition(np : Word);</div><div class="code_line">&nbsp;&nbsp;function GetNrLines : integer;</div><div class="code_line">&nbsp;&nbsp;procedure ResetCanvas;</div><div class="code_line">&nbsp;&nbsp;procedure SetScrollBar(ns : TScrollBar);</div><div class="code_line">&nbsp;&nbsp;procedure Loaded; override;</div><div class="code_line">&nbsp;&nbsp;procedure ProcessDisplay;</div><div class="code_line">public</div><div class="code_line">&nbsp;&nbsp; &nbsp;constructor Create(AOwner : TComponent); override;</div><div class="code_line">&nbsp;&nbsp; &nbsp;destructor destroy; override;</div><div class="code_line">&nbsp;&nbsp; &nbsp;procedure AddLines(value : TStringList);</div><div class="code_line">&nbsp;&nbsp; &nbsp;procedure AddLine(ns: String);</div><div class="code_line">&nbsp;&nbsp; &nbsp;procedure Clear;</div><div class="code_line">&nbsp;&nbsp; &nbsp;procedure LoadSmilies;</div><div class="code_line">&nbsp;&nbsp; &nbsp;function TextWidth(s : string):integer;</div><div class="code_line">&nbsp;published</div><div class="code_line">&nbsp;&nbsp; &nbsp;property ScrollBar : TScrollBar read FScrollBar write SetScrollBar default nil;</div><div class="code_line">&nbsp;&nbsp; &nbsp;property NrLines : integer read GetNrLines;</div><div class="code_line">&nbsp;&nbsp; &nbsp;property Font: TFont read FFont write SetFont;</div><div class="code_line">&nbsp;&nbsp; &nbsp;property Position : Word read FPosition write SetPosition;</div><div class="code_line">&nbsp;&nbsp; &nbsp;property BkColor:TColor read FBkColor write SetBkColor;</div><div class="code_line">&nbsp;&nbsp; &nbsp;property TextColor1:TColor read FTextColor1 write SetTextColor1;</div><div class="code_line">&nbsp;&nbsp; &nbsp;property TextColor2:TColor read FTextColor2 write SetTextColor2;</div><div class="code_line">&nbsp;&nbsp; &nbsp;property TextColor3:TColor read FTextColor3 write SetTextColor3;</div><div class="code_line">&nbsp;&nbsp; &nbsp;property TextColor4:TColor read FTextColor4 write SetTextColor4;</div><div class="code_line">&nbsp;&nbsp; &nbsp;property TextColor5:TColor read FTextColor5 write SetTextColor5;</div><div class="code_line">&nbsp;&nbsp; &nbsp;property SmiliesFile : string read FSmiliesFile write FSmiliesFile;</div><div class="code_line">end;</div><div class="code_line">&nbsp;</div><div class="code_line">procedure register;</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;</div><div class="code_line">implementation</div><div class="code_line">&nbsp;</div><div class="code_line">{$R *.res}</div><div class="code_line">&nbsp;</div><div class="code_line">procedure Register;</div><div class="code_line">begin</div><div class="code_line">&nbsp;&nbsp;RegisterComponents(&#39;Chat&#39;, [TChatEdit]);</div><div class="code_line">end;</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;</div><div class="code_line">//.............Constructor..........................</div><div class="code_line">Constructor TChatEdit.Create(AOwner : TComponent);</div><div class="code_line">begin</div><div class="code_line">inherited Create(aOwner);</div><div class="code_line">FLines := TStringList.Create;</div><div class="code_line">DisplayLines:=TStringList.Create;</div><div class="code_line">FFont:=TFont.Create;</div><div class="code_line">Canvas.Font:=FFont;</div><div class="code_line">Smilies:=TBitmap.Create;</div><div class="code_line">FPosition:=0;</div><div class="code_line">FScrollBar:=nil;</div><div class="code_line">FBkColor:=clWhite;</div><div class="code_line">FTextColor1:=clBlack;</div><div class="code_line">FTextColor2:=clBlack;</div><div class="code_line">FTextColor3:=clBlack;</div><div class="code_line">FTextColor4:=clBlack;</div><div class="code_line">FTextColor5:=clBlack;</div><div class="code_line">end;</div><div class="code_line">&nbsp;</div><div class="code_line">// --------------- &nbsp;destructor ---------</div><div class="code_line">destructor TChatEdit.destroy;</div><div class="code_line">begin</div><div class="code_line">&nbsp;FLines.free;</div><div class="code_line">&nbsp;DisplayLines.free;</div><div class="code_line">&nbsp;FFont.Free;</div><div class="code_line">&nbsp;Smilies.free;</div><div class="code_line">&nbsp;inherited;</div><div class="code_line">end;</div><div class="code_line">&nbsp;</div><div class="code_line">//..............Loads the smilies from a bitmap ....</div><div class="code_line">procedure TChatEdit.LoadSmilies;</div><div class="code_line">begin</div><div class="code_line">if FileExists(FSmiliesFile) then Smilies.LoadFromFile(FSmiliesFile);</div><div class="code_line">Smilies.TransparentMode:=tmAuto;</div><div class="code_line">Smilies.Transparent:=true;</div><div class="code_line">end;</div><div class="code_line">&nbsp;</div><div class="code_line">//..............Calculates the text width considering smiles...</div><div class="code_line">function TChatEdit.TextWidth(s : string):integer;</div><div class="code_line">var</div><div class="code_line">&nbsp;t,temp : string;</div><div class="code_line">&nbsp;nrsml, sml : integer;</div><div class="code_line">&nbsp;j : integer;</div><div class="code_line">begin</div><div class="code_line">t:=s;</div><div class="code_line">nrsml:=0;</div><div class="code_line">&nbsp;&nbsp;for &nbsp;j:=0 to NRSMILIES-1 do//finds first smile pos</div><div class="code_line">&nbsp;&nbsp;begin</div><div class="code_line">&nbsp;&nbsp;temp:=SmileCodes[j];</div><div class="code_line">&nbsp;&nbsp;sml:=Pos(temp,t);</div><div class="code_line">&nbsp;&nbsp;while sml&#60;&#62;0 do</div><div class="code_line">&nbsp;&nbsp; &nbsp;begin</div><div class="code_line">&nbsp;&nbsp; &nbsp; inc(nrsml);</div><div class="code_line">&nbsp;&nbsp; &nbsp; Delete(t,sml,length(temp));</div><div class="code_line">&nbsp;&nbsp; &nbsp; sml:=Pos(temp,t)</div><div class="code_line">&nbsp;&nbsp; &nbsp;end;</div><div class="code_line">&nbsp;&nbsp;end;</div><div class="code_line">result:=Canvas.TextWidth(t)+SMILESIZE*nrsml;</div><div class="code_line">end;</div><div class="code_line">&nbsp;</div><div class="code_line">//..............Processes the lines to display ....</div><div class="code_line">procedure TChatEdit.ProcessDisplay;</div><div class="code_line">var</div><div class="code_line">&nbsp;&nbsp;y, i, nl, p, q : integer;</div><div class="code_line">&nbsp;&nbsp;Line,DLine,t : string;</div><div class="code_line">&nbsp;&nbsp;revers : TStringList;</div><div class="code_line">begin</div><div class="code_line">&nbsp;&nbsp;i:=position-1;</div><div class="code_line">&nbsp;&nbsp;nl:=0;</div><div class="code_line">&nbsp;&nbsp;revers := TStringList.Create;</div><div class="code_line">&nbsp;&nbsp;revers.Clear;</div><div class="code_line">&nbsp;&nbsp;DisplayLines.Clear;</div><div class="code_line">&nbsp;</div><div class="code_line">while (nl&#60;NrLines)and(i&#62;=0) do</div><div class="code_line">&nbsp;begin</div><div class="code_line">&nbsp;&nbsp;Line:=FLines.Strings[i];</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; if TextWidth(Line)&#62;Width then</div><div class="code_line">&nbsp;&nbsp; &nbsp;begin</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;Delete(Line,1,1);</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;revers.Clear;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;while Length(Line)&#62;0 do</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; begin</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;p:=1;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;while (TextWidth(copy(Line,1,p))&#60;Width-3)and(p&#60;Length(Line)) do inc(p);</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if p&#62;=Length(Line) &nbsp;then DLine:=copy(Line,1,p)</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;begin</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DLine:=copy(Line,1,p-1);</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;q:=0;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;q:=LastDelimiter(&#39; &#39;,DLine);</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if q&#62;0 then Delete(DLine,q+1,Length(DLine)-q);</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;end;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; Delete(Line, 1,Length(DLine));</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; t:=FLines.Strings[i][1];</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; DLine:=t+DLine;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; inc(nl);</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; revers.Add(DLine);</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; end;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp;for y:=revers.Count-1 downto 0 do DisplayLines.Add(revers.Strings[y]);</div><div class="code_line">&nbsp;&nbsp; &nbsp;end</div><div class="code_line">&nbsp;&nbsp; else</div><div class="code_line">&nbsp;&nbsp; &nbsp;begin</div><div class="code_line">&nbsp;&nbsp; &nbsp;DisplayLines.Add(Line);</div><div class="code_line">&nbsp;&nbsp; &nbsp;inc(nl);</div><div class="code_line">&nbsp;&nbsp; &nbsp;end;</div><div class="code_line">&nbsp;dec(i);</div><div class="code_line">&nbsp;end;</div><div class="code_line">revers.free;</div><div class="code_line">end;</div><div class="code_line">&nbsp;</div><div class="code_line">//...............Loaded..............</div><div class="code_line">procedure TChatEdit.Loaded;</div><div class="code_line">begin</div><div class="code_line">ResetCanvas;</div><div class="code_line">Canvas.Font.Assign(FFont);</div><div class="code_line">if FileExists(FSmiliesFile) then Smilies.LoadFromFile(FSmiliesFile)</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; else Application.MessageBox(&#39;Smilies file not found&#39;,&#39;Error&#39;,0);</div><div class="code_line">&nbsp;</div><div class="code_line">Smilies.TransparentMode:=tmAuto;</div><div class="code_line">Smilies.Transparent:=true;</div><div class="code_line">Position:=1;</div><div class="code_line">inherited Loaded;</div><div class="code_line">end;</div><div class="code_line">&nbsp;</div><div class="code_line">//.................ResetCanvas........................</div><div class="code_line">procedure TChatEdit.ResetCanvas;</div><div class="code_line">begin</div><div class="code_line">Canvas.Brush.Style:=bsSolid;</div><div class="code_line">Canvas.Brush.Color:=clWindow;</div><div class="code_line">Canvas.Pen.Color:=clBlack;</div><div class="code_line">Canvas.Pen.Mode:=pmCopy;</div><div class="code_line">Canvas.Pen.Style:=psSolid;</div><div class="code_line">end;</div><div class="code_line">&nbsp;</div><div class="code_line">//............Clears the chat text....................</div><div class="code_line">procedure TChatEdit.Clear;</div><div class="code_line">begin</div><div class="code_line">FLines.Clear;</div><div class="code_line">Position:=0;</div><div class="code_line">end;</div><div class="code_line">&nbsp;</div><div class="code_line">//...........Add Lines................................</div><div class="code_line">procedure TChatEdit.AddLines(Value : TStringList);</div><div class="code_line">begin</div><div class="code_line">if (Value=nil)or(Value.Count=0) then exit;</div><div class="code_line">&nbsp;</div><div class="code_line">FLines.AddStrings(Value);</div><div class="code_line">FPosition:=FLines.Count;</div><div class="code_line">if FScrollBar&#60;&#62;nil then</div><div class="code_line">&nbsp;begin</div><div class="code_line">&nbsp;FScrollBar.Max:=FLines.Count-1;</div><div class="code_line">&nbsp;FScrollBar.Position:=FPosition;</div><div class="code_line">&nbsp;end;</div><div class="code_line">ProcessDisplay;</div><div class="code_line">Repaint;</div><div class="code_line">end;</div><div class="code_line">&nbsp;</div><div class="code_line">//...........AddLine Lines................................</div><div class="code_line">procedure TChatEdit.AddLine(ns : string);</div><div class="code_line">&nbsp;begin</div><div class="code_line">&nbsp;&nbsp;FLines.Add(ns);</div><div class="code_line">&nbsp;&nbsp;FPosition:=FLines.Count;</div><div class="code_line">&nbsp;&nbsp;if FScrollBar&#60;&#62;nil then</div><div class="code_line">&nbsp;&nbsp; begin</div><div class="code_line">&nbsp;&nbsp; &nbsp; FScrollBar.Max:=FLines.Count-1;</div><div class="code_line">&nbsp;&nbsp; &nbsp; FScrollBar.Position:=FPosition;</div><div class="code_line">&nbsp;&nbsp; end;</div><div class="code_line">&nbsp;&nbsp;ProcessDisplay;</div><div class="code_line">&nbsp;&nbsp;Repaint;</div><div class="code_line">end;</div><div class="code_line">&nbsp;</div><div class="code_line">//..................SetPosition.....................</div><div class="code_line">procedure TChatEdit.SetPosition(np : word);</div><div class="code_line">begin</div><div class="code_line">if FPosition=np then exit;</div><div class="code_line">if np&#62;FLines.Count then np:=FLines.Count;</div><div class="code_line">FPosition:=np;</div><div class="code_line">ProcessDisplay;</div><div class="code_line">Repaint;</div><div class="code_line">end;</div><div class="code_line">&nbsp;</div><div class="code_line">//...........SetFont..............................</div><div class="code_line">procedure TChatEdit.SetFont(NF : TFont);</div><div class="code_line">begin</div><div class="code_line">FFont.Assign(NF);</div><div class="code_line">Canvas.Font:=FFont;</div><div class="code_line">Repaint;</div><div class="code_line">end;</div><div class="code_line">&nbsp;</div><div class="code_line">//.................GetNrLines......................</div><div class="code_line">function TChatEdit.GetNrLines : integer;</div><div class="code_line">begin</div><div class="code_line">if ClientHeight/Canvas.TextHeight(&#39;T&#39;)&#62;SMILESIZE then FNrLines:=Canvas.TextHeight(&#39;T&#39;) else FNrLines:=SMILESIZE;</div><div class="code_line">result:=FNrLines;</div><div class="code_line">end;</div><div class="code_line">&nbsp;</div><div class="code_line">//...........SetScrollBar.............................</div><div class="code_line">procedure TChatEdit.SetScrollBar(ns : TScrollBar);</div><div class="code_line">begin</div><div class="code_line">FScrollBar:=ns;</div><div class="code_line">FScrollBar.Max:=NrLines;</div><div class="code_line">FScrollBar.Min:=0;</div><div class="code_line">FScrollBar.Kind:=sbVertical;</div><div class="code_line">FScrollBar.Left:=Left+Width;</div><div class="code_line">FScrollBar.Top:=Top;</div><div class="code_line">FScrollBar.Height:=Height;</div><div class="code_line">FScrollBar.LargeChange:=NrLines;</div><div class="code_line">FScrollBar.SmallChange:=1;</div><div class="code_line">end;</div><div class="code_line">&nbsp;</div><div class="code_line">//.................SetBkColor.....................</div><div class="code_line">procedure TChatEdit.SetBkColor(nc: TColor);</div><div class="code_line">begin</div><div class="code_line">FBkColor:=nc;</div><div class="code_line">Repaint;</div><div class="code_line">end;</div><div class="code_line">&nbsp;</div><div class="code_line">//.................SetTextColor1.....................</div><div class="code_line">procedure TChatEdit.SetTextColor1(nc: TColor);</div><div class="code_line">begin</div><div class="code_line">FTextColor1:=nc;</div><div class="code_line">Repaint;</div><div class="code_line">end;</div><div class="code_line">&nbsp;</div><div class="code_line">//.................SetTextColor2.....................</div><div class="code_line">procedure TChatEdit.SetTextColor2(nc: TColor);</div><div class="code_line">begin</div><div class="code_line">FTextColor2:=nc;</div><div class="code_line">Repaint;</div><div class="code_line">end;</div><div class="code_line">&nbsp;</div><div class="code_line">//.................SetTextColor3.....................</div><div class="code_line">procedure TChatEdit.SetTextColor3(nc: TColor);</div><div class="code_line">begin</div><div class="code_line">FTextColor3:=nc;</div><div class="code_line">Repaint;</div><div class="code_line">end;</div><div class="code_line">&nbsp;</div><div class="code_line">//.................SetTextColor4.....................</div><div class="code_line">procedure TChatEdit.SetTextColor4(nc: TColor);</div><div class="code_line">begin</div><div class="code_line">FTextColor4:=nc;</div><div class="code_line">Repaint;</div><div class="code_line">end;</div><div class="code_line">&nbsp;</div><div class="code_line">//.................SetTextColor5.....................</div><div class="code_line">procedure TChatEdit.SetTextColor5(nc: TColor);</div><div class="code_line">begin</div><div class="code_line">FTextColor5:=nc;</div><div class="code_line">Repaint;</div><div class="code_line">end;</div><div class="code_line">&nbsp;</div><div class="code_line">//...........Paint................................</div><div class="code_line">procedure TChatEdit.Paint;</div><div class="code_line">var</div><div class="code_line">&nbsp;&nbsp;j,i, minsml, textheight, smilenr : integer;</div><div class="code_line">&nbsp;&nbsp;offscreen : TBitmap;</div><div class="code_line">&nbsp;&nbsp;Cursory,Cursorx : integer; &nbsp;//y position of the text being displayed</div><div class="code_line">&nbsp;&nbsp;smilepos:array[0..100] of integer;</div><div class="code_line">&nbsp;&nbsp;smiletype:array[0..100] of integer;</div><div class="code_line">&nbsp;&nbsp;temp,line:string;</div><div class="code_line">&nbsp;&nbsp;k,sml,tip : integer;//first smile,curent smile,smile type</div><div class="code_line">&nbsp;&nbsp;curcar : integer;</div><div class="code_line">&nbsp;&nbsp;sursa,dest : TRect;</div><div class="code_line">&nbsp;&nbsp;bbb: TBrush;</div><div class="code_line">begin</div><div class="code_line">&nbsp;&nbsp;offscreen := TBitmap.Create;</div><div class="code_line">&nbsp;&nbsp;offscreen.Height:=ClientHeight;</div><div class="code_line">&nbsp;&nbsp;offscreen.Width:=ClientWidth;</div><div class="code_line">&nbsp;&nbsp;bbb:=offscreen.Canvas.Brush;</div><div class="code_line">&nbsp;&nbsp;bbb.Color:=FBkColor;</div><div class="code_line">&nbsp;&nbsp;offscreen.Canvas.Brush:=bbb;</div><div class="code_line">&nbsp;&nbsp;offscreen.Canvas.FillRect(ClientRect);</div><div class="code_line">&nbsp;&nbsp;offscreen.Canvas.Brush:=bbb;</div><div class="code_line">&nbsp;&nbsp;offscreen.Canvas.FrameRect(ClientRect);</div><div class="code_line">&nbsp;&nbsp;offscreen.Canvas.Brush:=Canvas.Brush;</div><div class="code_line">&nbsp;&nbsp;offscreen.Canvas.Font:=Canvas.Font;</div><div class="code_line">&nbsp;&nbsp;offscreen.Canvas.Brush.Color:=BkColor;</div><div class="code_line">&nbsp;&nbsp;Canvas.Draw(0,0,offscreen);</div><div class="code_line">&nbsp;&nbsp;//.............end base display....</div><div class="code_line">&nbsp;&nbsp;if DisplayLines=nil then exit;</div><div class="code_line">&nbsp;&nbsp;if DisplayLines.Count=0 then exit;</div><div class="code_line">&nbsp;&nbsp;textheight:=offscreen.Canvas.TextHeight(&#39;T&#39;);</div><div class="code_line">&nbsp;&nbsp;if textheight&#62;SMILESIZE then Cursory:= ClientHeight-5-textheight</div><div class="code_line">&nbsp;&nbsp; &nbsp;else Cursory:= ClientHeight-5-SMILESIZE;</div><div class="code_line">&nbsp;&nbsp;i:=0;</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp;//parcurge liniile de text care se afiseaza</div><div class="code_line">&nbsp;&nbsp;line:=&#39;&#39;;</div><div class="code_line">&nbsp;for i:=0 to DisplayLines.Count-1 do</div><div class="code_line">&nbsp;&nbsp; begin</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; Line:=DisplayLines.Strings[i];</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; Cursorx:=3;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; smilenr:=0; //nr de smileuri</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; minsml:=MAXINT;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//finds smiles, deletes smiles from string and sets smilepos and smile type</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;repeat</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;minsml:=MAXINT &nbsp;;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;for j:=0 to NRSMILIES-1 do//finds first smile pos</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; begin</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; temp:=SmileCodes[j];</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sml:=pos(temp,Line);</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (sml&#60;minsml)and(sml&#62;0) then</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;begin</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;minsml:=sml;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;tip:=j;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;end;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; end;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if minsml&#60;&#62;MAXINT then//eliminates smile and ads smile to list</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; begin</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;temp:=SmileCodes[tip];</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;{Line:=}Delete(Line,minsml,Length(temp));</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;smilepos[smilenr]:=minsml-1;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;smiletype[smilenr]:=tip;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;inc(smilenr);</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;end;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;until minsml&#60;&#62;MAXINT;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//if no smile exist in string</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if smilenr=0 then</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; begin</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; case Line[1] of</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#39;1&#39;:offscreen.Canvas.Font.Color:=FTextColor1;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#39;2&#39;:offscreen.Canvas.Font.Color:=FTextColor2;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#39;3&#39;:offscreen.Canvas.Font.Color:=FTextColor3;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#39;4&#39;:offscreen.Canvas.Font.Color:=FTextColor4;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#39;5&#39;:offscreen.Canvas.Font.Color:=FTextColor5;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; end;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Delete(Line,1,1);</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; offscreen.Canvas.TextOut(Cursorx,Cursory,Line);</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Cursorx:=3;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if textheight&#62;SMILESIZE then Cursory:=Cursory-textheight else Cursory:=Cursory-SMILESIZE;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; end</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;begin</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//at this point the smiles should be eliminated and their</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//positions and types stored in smilepos and smiletype</div><div class="code_line">&nbsp;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//display</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;k:=0;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;curcar:=1;//curent caracter in string (curent substring start)</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;case Line[1] of</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#39;1&#39;:offscreen.Canvas.Font.Color:=FTextColor1;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#39;2&#39;:offscreen.Canvas.Font.Color:=FTextColor2;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#39;3&#39;:offscreen.Canvas.Font.Color:=FTextColor3;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#39;4&#39;:offscreen.Canvas.Font.Color:=FTextColor4;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&#39;5&#39;:offscreen.Canvas.Font.Color:=FTextColor5;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;end;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Delete(Line,1,1);</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;for k:=0 to smilenr-1 do</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;begin</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;temp:=copy(Line,curcar,smilepos[k]-curcar);</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;curcar:=smilepos[k];</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;offscreen.Canvas.TextOut(Cursorx,Cursory,temp);</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Cursorx:=Cursorx+offscreen.Canvas.TextWidth(temp);</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;dest.Left:=Cursorx;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if textheight&#62;SMILESIZE then</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;dest.Top:=Cursory+(textheight-SMILESIZE) div 2</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; else</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;dest.Top:=Cursory-(textheight-SMILESIZE) div 2;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;dest.Right:=dest.Left+SMILESIZE;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if dest.Right&#62;ClientWidth-1 then dest.Right:=ClientWidth-1;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;dest.Bottom:=dest.Top+SMILESIZE;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if dest.Bottom&#62;ClientHeight-1 then dest.Bottom:=ClientHeight-1;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;sursa.Left:=(smiletype[k]mod 5)*SMILESIZE ;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;sursa.Top:=round((smiletype[k]/5)*SMILESIZE);</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;sursa.Right:=sursa.Left+SMILESIZE;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;sursa.Bottom:=sursa.Top+SMILESIZE;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;offscreen.Canvas.BrushCopy(dest,Smilies,sursa,Smilies.TransparentColor);</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Cursorx:=Cursorx+SMILESIZE;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;end;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //this displays the text after the last smile</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; temp:=copy(Line,curcar,smilepos[k]-1);</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; offscreen.Canvas.TextOut(Cursorx,Cursory,temp);</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //end</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Cursorx:=3;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if textheight&#62;SMILESIZE then Cursory:=Cursory-textheight &nbsp;else Cursory:=Cursory-SMILESIZE;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; end;</div><div class="code_line">&nbsp;&nbsp; &nbsp; &nbsp; end;</div><div class="code_line">&nbsp;Canvas.Draw(0,0,offscreen);</div><div class="code_line">end;</div><div class="code_line">&nbsp;</div><div class="code_line">end.</div></ol></div></div></div></div><br>
<br>
P.S. Заранее cспасибо&#33;<br>
P.S.S. Если кто-либо уже такое делал, или видел в инете уже готовый компонент, пожалуйста сообщите...  :)]]></description>
        <author>IrQX</author>
        <category>Delphi: Общие вопросы</category>
      </item>
	
      </channel>
      </rss>
	