Font and bubble size, adjust bubble spacing

2 posts, 0 answers
  1. lehrbua
    lehrbua avatar
    6 posts
    Member since:
    Aug 2017

    Posted 28 May 2018 Link to this post


    is it possible to Set the Font size of Messages and adjust the height and spacing of the bubbles so i can have more Messages in a given Window size ?

  2. Dess | Tech Support Engineer, Sr.
    Dess | Tech Support Engineer, Sr.  avatar
    4125 posts

    Posted 28 May 2018 Link to this post

    Hello, Erwin,    

    You can change the font of the messages in RadChat by handling the ItemFormatting event and modifying the TextMessageItemElement.MainMessageElement.Font element: 

    Font f = new Font("Arial",8f, FontStyle.Regular);
    private void radChat1_ItemFormatting(object sender, ChatItemElementEventArgs e)
        TextMessageItemElement message = e.ItemElement as TextMessageItemElement;
        if (message!=null)
            message.MainMessageElement.Font = f;

    Thus, the height of the message elements will be automatically adjusted considering the font.

    As to the spacing between the chat messages, you can set the ChatElement.MessagesViewElement.ItemSpacing property to the desired spacing: 
    this.radChat1.ChatElement.MessagesViewElement.ItemSpacing = 50;

    I hope this information helps. If you have any additional questions, please let me know. 

    Progress TelerikRadChat for Winforms
Back to Top