I need to change text in an rtb using a combo box can anyone help

Watch this thread
This discussion is closed.
Hami374
Badges: 0
? You'll earn badges for being active around the site. Rep gems come when your posts are rated by other community members.
#1
Report Thread starter 18 years ago
#1
I am studying Avce ict and need to hand my assignment on friday but i havent put in atext box for font size i have done a type combo box but cant figure out how to make different sizes work. All work is done in Visual basic 6
0
EI_123
Badges: 0
Rep:
? You'll earn badges for being active around the site. Rep gems come when your posts are rated by other community members.
#2
Report 18 years ago
#2
(Original post by Hami374)
I am studying Avce ict and need to hand my assignment on friday but i havent put in atext box for font size i have done a type combo box but cant figure out how to make different sizes work. All work is done in Visual basic 6
With a Textbox named Text1 and a Combobox named Combo1 you could try this:

Private Sub Combo1_Click()
Text1.FontSize = CInt(Combo1.Text)
End Sub
Attached files
0
EI_123
Badges: 0
Rep:
? You'll earn badges for being active around the site. Rep gems come when your posts are rated by other community members.
#3
Report 18 years ago
#3
If you are talking about the RichEdit ActiveX control use this line instead:
RichTextBox1.Font.Size = CInt(Combo1.Text)

If you are using Windows API you should use CreateFontIndirect() and SendMessage(WM_SETFONT).
0
X
new posts
Back
to top
Latest

How did The Student Room help you with your university application?

Talking to current university students (3)
17.65%
Talking to peers going through the same thing (4)
23.53%
Speaking to student ambassadors from the universities (1)
5.88%
Speaking to staff members from universities (0)
0%
Using the personal statement builder, library or helper service (3)
17.65%
Reading articles about what steps to take (5)
29.41%
Learning about/speaking to Student Finance England (0)
0%
Something else (tell us in the thread) (1)
5.88%

Watched Threads

View All