473,396 Members | 1,809 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

bold selected text

trying to convert selected text in a textbox to bold font.

can someone provide me code sample?

thanks.
Nov 29 '07 #1
6 1912
Mike,

In my idea is what you want with a textbox impossible (or you should set
your computer in any way only displaying bold characters).

Use for your purpose the richtextbox.

Cor

Nov 29 '07 #2
On Nov 29, 10:35 am, mike <m...@discussions.microsoft.comwrote:
trying to convert selected text in a textbox to bold font.

can someone provide me code sample?

thanks.
Just to make sure you understand Cor's message... He's telling you,
correctly, that you can't get there from here. In a normal TextBox
contorl, the font is either bold or it's not. You can't have some
bold, some not bold. To accomplish that, you need to use a
RichTextBox control.

--
Tom Shelton
Nov 29 '07 #3
On Thu, 29 Nov 2007 09:35:01 -0800, mike
<mi**@discussions.microsoft.comwrote:
>trying to convert selected text in a textbox to bold font.

can someone provide me code sample?
You can't do that. A Textbox has one Font property that applies to
all of the text.
Nov 29 '07 #4

"mike" <mi**@discussions.microsoft.comwrote in message
news:AE**********************************@microsof t.com...
trying to convert selected text in a textbox to bold font.

can someone provide me code sample?
You can do it with a richTextbox control. I have just done that with a
project where I had to search the textbox, find keywords or a character in
a Textbox, and bold the word or single character in the textbox.

<http://www.google.com/search?hl=en&q=how+to+bold+a+word+in+a+richTextBox +VB.net&btnG=Search>

Nov 30 '07 #5
"mike" <mi**@discussions.microsoft.comschrieb:
trying to convert selected text in a textbox to bold font.

Take a look at the richtextbox control and its 'SelectionFont' property.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Nov 30 '07 #6
Herfried,

It is long ago that we have heare "YodaLeay ahoe" or whatever they do it in
Austria.

:-)

(just smiling friday as you know)

Cor

"Herfried K. Wagner [MVP]" <hi***************@gmx.atschreef in bericht
news:%2******************@TK2MSFTNGP05.phx.gbl...
"mike" <mi**@discussions.microsoft.comschrieb:
>trying to convert selected text in a textbox to bold font.


Take a look at the richtextbox control and its 'SelectionFont' property.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Nov 30 '07 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Imaya Kumar | last post by:
Hi, i'm developing an editor in VS.NET using Rich Text Box Control. I need to make a selected text Bold. how can i do this? also i will have an Italic Button too. If i click Bold button the...
6
by: Ronny sigo | last post by:
Hello all, I have made a form with a lot of entryfields and one button which, when clicked on, transforms all of the entryfields values into a MS Word document. All the formatting is done...
3
by: TM | last post by:
I have a messagebox and I would like to display a message along with the some selected text I am searching for. But I would like the selected text to appear as bold. I would like my message...
11
by: Mano | last post by:
When settiing a TreeNode to bold the text label of that node is clipped. As describedin in the Bug Rebort FDBK16963 I set the underliying TreeView Fond to be bold. Now I have the strange...
9
by: Jason | last post by:
If I've got Me.RichTextBox1.Text = "In Ricn Tex Box" Me.RichTextBox1.Text &= "Line two" & vbCrLf How do I make the first line appear BOLD?
2
by: andreas | last post by:
When I select a text in a richtextbox to set de selected text in bold, regular, italic .. or non I want to do that with one click Thus I must find out if the selected text is already in bold,...
2
by: Prose | last post by:
Okay i already made a discussion about this but this time.. i thought id be more acurate soo: Im Using VB 2005 Express Edition Im Making a Text Editor kinda like MS Word and Notepad Combined, So...
2
by: =?Utf-8?B?UmljaA==?= | last post by:
I have code to bold text in a datagridviewcell: Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Dim cs As DataGridViewCellStyle, fnt...
1
jamesd0142
by: jamesd0142 | last post by:
Hi, im using a rich text box called "main", a button called "bold". when my program is running i want to be able to type in the rich text box, then when i highlight some text and press the bold...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.