AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren

Delphi and indy

Ein Thema von drama22 · begonnen am 7. Okt 2014 · letzter Beitrag vom 10. Okt 2014
 
drama22

Registriert seit: 12. Jan 2013
88 Beiträge
 
#8

AW: Delphi and indy

  Alt 9. Okt 2014, 00:36
i search in google and i found this very old code
Delphi-Quellcode:
procedure addChatText(WB: TEmbeddedWB; const html: string;add:integer = 0);
var
   Range: IHTMLTxtRange;
   mText : string;
   ext : string;
   sURL : string;
   i : Integer;
begin
  if not joined then Exit;

  if Not Assigned(Wb.Document) then exit;
  Range := ((WB.Document AS IHTMLDocument2).body AS IHTMLBodyElement).createTextRange;
  Range.Collapse(False) ;

  if add = 1 then
  begin
    if ChatContent <> nil then
    begin
      ChatContent.Add(html+'<BR>');
      mText := ChatContent.Text;
    end else
    begin
      mText := html+'<BR>';
    end;
  end else begin
    mText := html+'<BR>';
  end;

  if ChatContent <> nil then
  begin
    if ChatContent.Count > ChatContentTotal then
    begin
      for i := 0 to 10 do
      begin
        ChatContent.Delete(0);
      end;
    end;
// while (ChatContent.Count) > ChatContentTotal do ChatContent.Delete(0);
  end;

  mText := Replace(mText,'!res!url!',sURL);
  mText := Replace(mText,'£££',ext);
  chatClear(WB,0);
  Range.PasteHTML(mText);
  // WB.Body.innerHTML := mText;
  if OptionsIni.SoftScrolling = 0 then chatScroll(WB);
end;
and this how i find example to add text
addChatText(weblog,'<span class="Name">'+userSetting.Name+':</span> '+ strMsg,1); i cant get this worked in delphi xe5

Thats why i thought i can do it like Tmemo

Geändert von drama22 ( 9. Okt 2014 um 00:49 Uhr)
  Mit Zitat antworten Zitat
 

Themen-Optionen Thema durchsuchen
Thema durchsuchen:

Erweiterte Suche
Ansicht

Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 20:43 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz