Chat in MP1 (1 Viewer)

Michael.K

Portal Member
February 14, 2012
25
0
Home Country
Ukraine Ukraine
Hello. I need add chat functional to my plugin. Which control fit me better: ListControl(but message may be differend size), TextBox (but I cant add text to Lable because property "Lable" have only setter and i cant write like textControl.Lable+="SomeText"), Lable(but this is no good and pure idea). I must have scrolling text as well. Help me please if you experienced with this.
 

Michael.K

Portal Member
February 14, 2012
25
0
Home Country
Ukraine Ukraine
In MP1 no control that is suitable for a chat? I would like to display incoming messages like in the Skype chat. The messages can be long and must be carried, and i must display contact name and time in header of message. It would be nice if GUIListitem stretched the width of the message, well, or was similar to control StackPanel in xaml.
 
Last edited:

mbuzina

Retired Team Member
  • Premium Supporter
  • April 11, 2005
    2,839
    726
    Germany
    Home Country
    Germany Germany
    I think TextBox would fit best. Just Keep a reference to your text like
    Code:
    var myText = "";
    var newText = "";
     
    while(true) {
      newText=GetNewText();
      myText += LINEBREAK & newText;
      textControl.Label = myText;
    }

    You would also need to control the displayed part of the Textbox
     

    mbuzina

    Retired Team Member
  • Premium Supporter
  • April 11, 2005
    2,839
    726
    Germany
    Home Country
    Germany Germany
    Otherwise have a look at the WebBrowsers, you might want to display a generated html representation of the chat...
     

    Michael.K

    Portal Member
    February 14, 2012
    25
    0
    Home Country
    Ukraine Ukraine
    Otherwise have a look at the WebBrowsers, you might want to display a generated html representation of the chat...
    Thanks for answer about textBox. Can you tell me more about how to display HTML in TextBox? It can display the html? or parsing to be done manually? Or MP have webBrowserControl?
     

    mbuzina

    Retired Team Member
  • Premium Supporter
  • April 11, 2005
    2,839
    726
    Germany
    Home Country
    Germany Germany
    There are several browser plugins, so I would suggest to look at them (e.g. BrowseTheWeb and some others). They use different html Rendering engines, so you might clone their technique.
     

    Users who are viewing this thread

    Top Bottom