Go to Post What I would really love to see is having the teams try to solve a problem that is real scientists are trying to solve right now. Wouldn't it be cool if a team came up with a robot design that could solve one of the world's worst problems? Talk about FIRST publicity! - Beth Sweet [more]
Home
Go Back   Chief Delphi > FIRST > General Forum
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 11-10-2014, 10:43
Drama22 Drama22 is offline
Registered User
no team
 
Join Date: Oct 2014
Location: lituania
Posts: 1
Drama22 is an unknown quantity at this point
Smile Delphi xe5 And TEmbeddedWB

hello iam new in this forum i have question i never found any answer for it in another forum i have chat application bulid with indy Tcp and its multichat application that client can send message to all other connected clients and receive it in Tmemo but in finalizing i decided To change Tmemo To TEmbeddedWB because i want the clients embedded Youtube videos and smileys like this , but i dont know how to implement this with TEmbeddedWB how can i show what client type to other connected clients in TEmbeddedWB , i found this old code but i did not understand any thing from it

code to addText

Code:
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;
code must be used when client click send

Code:
addChatText(weblog,'<span class="Name">'+Name+':</span> '+ Msg,1);
But its not working not shwing any thing in TEmbeddedWB always empty
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 23:16.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi