Solved

Rich text box

Posted on 2002-07-05
3
220 Views
Last Modified: 2010-05-02
Can a user enter text in two different fonts(essentially two different languages) in a single richtext box? The user will enter text which is a combination of two different fonts which will be stored in the database. If it is not possible to do it with rich text box, what other control can be used for the above problem. Thanks in advance.
0
Comment
Question by:mkarthikeyan
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 100 total points
ID: 7131689
Using the SelFontName and SelFontSize you can format the selected text the given FontName and Size.
CHeers
0
 
LVL 22

Expert Comment

by:Mohammed Nasman
ID: 7131768
Hello

Here's a sample to format text in RichTextBox
Private Sub Command1_Click()
  With RichTextBox1
    .Text = "Hello World"
    .SelStart = 0
    .SelLength = 5
    .SelFontName = "Tahoma"
    .SelFontSize = 20
    .SelStart = 6
    .SelLength = 11
    .SelFontName = "Times new roman"
    .SelFontSize = 18
    .SelItalic = True
  End With
End Sub

Best regards
0
 

Author Comment

by:mkarthikeyan
ID: 7133445
Thanks it worked out. But I am having problems when I retrieve it from the database and again show in the rich text box.
0

Featured Post

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

717 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question