Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Make a Command button look like Word Bold or Italics Button

Status
Not open for further replies.

DavidfromBoston

Programmer
Jun 4, 2002
4
US
I am using a rich text box to edit text.

I can write the code to make text bold and italics, but would like to add a button that works like the buttons in Microsoft Word. The bold button has a B in it and clicking on it leaves it "pressed" or not pressed.

 
Select your bold button, go to the properties page and select the font. Change the font to be Bold. Next, select your italic button, go to the properties page and select the font. Change the font to italics.

HTH
lightseeker
 
Hi,

You need to use a toolbar (part of MS WIndows Common Controls, so you may need to add it to your project)
Add a button to that toobar, caption it etc
You will need to set the style to tbrCheck. You can also set the deafult state if you choose.

Hope that solves it for you

Matt
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top