This is a migrated thread and some comments may be shown as answers.

Font and bubble size, adjust bubble spacing

1 Answer 33 Views
This is a migrated thread and some comments may be shown as answers.
lehrbua
Top achievements
Rank 2
lehrbua asked on 28 May 2018, 10:39 AM

Hello,

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 ?

1 Answer, 1 is accepted

Sort by
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 28 May 2018, 12:26 PM
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. 

Regards,
Dess
Progress TelerikRadChat for Winforms
Asked by
lehrbua
Top achievements
Rank 2
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or