Howard Wilton

Hello - i am writing lines of text at discrete intervals to a textbox. I would like to make some lines Bold and some Normal. I'd also like to change the colour of some lines of text.

When I try to chage the font by adjusting the textbox.font property, i find that all the text changes (e.g.: from Normal to Bold or vice versa).

Is there a way to do this with the .NET CF Failing that, is there a way to do this with P/Invoke


Re: .NET Compact Framework Chaning fonts in a textbox

Christopher Fairbairn


You will need to use a different control. One which doesn't have a nice .NET CF wrapper available for it. The Win32 edit control (what a System.Windows.Forms.TextBox control wraps up) does not support multiple fonts.

You can find more details about the RichInk control in the following post PostID=1506561&SiteID=1.

This post will describe the options open to you to wrap the RichInk control, either by yourself (if you feel capable of doing this yourself), or by buying a third party wrapper control.

Hope this helps,

Christopher Fairbairn

Re: .NET Compact Framework Chaning fonts in a textbox

Dave Reinhart

Try the RichInk controls available at There is a control for .Net as well as another for use with C/C++.