![]() ![]() TitleFormatting.ForeColor = Color.DarkBlue ĭocument.EndUpdateCharacters(titleFormatting) Set the character size, font name and color Provide access to the character propertiesĬharacterProperties titleFormatting = document.BeginUpdateCharacters(range) The target range is the first paragraphĭocumentRange range = The code sample below uses this API to modify the text color and the font type. Initiates the update session and provides access to CharacterProperties for the specified range.įinalizes the character formatting update. The following members allow you to change character formatting for a given range. Use both character and paragraph formatting for a specific document range, for instance, for the document title as shown below. RichEditControlCompatibility.DefaultFontName = "Tahoma" Īpplication.SetCompatibleTextRenderingDefault(False)ĭ = 8ĭ = "Tahoma" RichEditControlCompatibility.DefaultFontSize = 8 Specify these properties before initialization of all controls, in the Main method, as illustrated in the following code.Īpplication.SetCompatibleTextRenderingDefault(false) The static RichEditControlCompatibility.DefaultFontSize and RichEditControlCompatibility.DefaultFontName properties set the default font settings for all RichEditControl instances in the application. ' Set the default font, size and forecolor Private Sub RichEditControl1_DocumentLoaded(ByVal sender As Object, ByVal e As EventArgs) Set the default font, size and forecolor ![]() Private void RichEditControl1_DocumentLoaded(object sender, EventArgs e)
0 Comments
Leave a Reply. |