Forms :: How To Set Selected Text Bold

Feb 16, 2009

I just couldn't find the right words to say it but, the thing is, I just want to make a certain word inside a paragraph bold. The word will be automatically set to bold in runtime. See for example the words 'John' shall be all set to bold.

Here is the

tempstr = tempstr.Replace(vbTab, "")
Dim secstr As String = tempstr.Replace(Chr(10), " ")
str = Split(secstr, " ")

[Code]....

the output of the above code is, it only makes the first occurence bold. All other word "John" are just set to Regular text when what I want is to make it all bold.

What is lacking? I used the "for each loop" to visit all the words.

View 2 Replies


ADVERTISEMENT

Change Either Selected Tab Font (to Bold) Or Color?

Jul 18, 2010

I've been googling, testing, etc for a couple hours and I'm right where I started off. the vb.net tab control sucks... Does anyone have an tips or code to make it so when I select a tab the font color changes OR it just makes the tab heading text bold?I've messed around with the draw commands and while that does work, it draws the borders/backgrounds so they are very old / outdated looking.This is basically for a simple tab text editor I'm working on when a textbox in the control changes I can update the associated tab with either a red font or just bold it to indicate the textbox on that tab is modified. I've definitely be open for alternative tab controls as long as they are free and come with a vb.net example :)

This is in vb.net 2008 express

View 2 Replies

Change Selected Listbox Items Format To Bold At Run Time?

Feb 24, 2009

Is it possible to change the text format of a ListBox selected item at run time?

View 14 Replies

Forms :: Textbox Text Always Selected By Defualt?

Feb 3, 2011

I created a form to capture a user name and password.I thought it would be nice, during the form load event, for me to put the windows username in the name field for them in case they were the same.When I do this the name appears selected/highlighted.I didn't expect this to be the default but it seems to be.I then use select(0, 0) to remove the selection I didn't want in the first place and try to move the focus down to the password field but it doesn't work.Can someone tell me if the text being automatically selected is normal and why I can't change focus to the password field.[code]

View 2 Replies

Make A Group Box's Text Bold But Not The Text Of Controls Contained In It?

Feb 17, 2012

I went and created a tab containing a good amount of controls, most of which are contained within what I'll just call the top-level group box. Now I decide I'd like the text of the top-level group box to be bold, but nothing else. When I set the top-level group box's font to bold, however, all of the controls contained within it become bolded as well, which is what I don't want. I can set each individual control's bold property to false, but it seems like there should be an easier way to do this.

View 2 Replies

VS 2010 - Apply A Bold Style To The Text Of A Text Box?

Mar 20, 2011

How can i apply a bold style to the text of a text box?

View 4 Replies

Bold Only Certain Text In A Textbox?

May 26, 2010

Is it possible to bold only certain text in a textbox? Also the same for coloring and underlining and such?

View 20 Replies

Bold Text Of A Stringbuilder?

Apr 4, 2007

I'm trying to find out an easy way of bolding a string of my stringbuilder...if that is even possible.The stringbuilder eventually passes all the text to richtextbox..I'd like to bold this string

sb.AppendLine("--------------------------------")
and also
sb.AppendLine("Results for " & finalname)

[code].....

View 6 Replies

How To Bold And / Or Italics Text In RTF

Aug 20, 2010

I want to highlight certain words in a doc in a richtextbox and make it bold.

View 11 Replies

Bold Text Added To Listbox?

May 25, 2010

I have a form that users record some event that is happening. They enter in what different things are occurring, for instance like a Basketball game. When certain events happen "steal", "score", "foul" these will get inputted to a listbox that records the whole game and is timestamped. However for these specific event i want them BOLD . So it would look something like

3:24 STEAL 3:25 #45 stole the ball, passed to #54

Or something like that. How do i get certain items to be bold?

View 7 Replies

FindReplace & Bold Text In A String?

Apr 20, 2009

I am donig some FindReplace in my app and I wanted to know if there was a way to bold the text that i'm "replacing".I've found other posts on Bolding text in a RichTextBox through a While loop but I wanted to do this in a string and the .Find is not an option for Strings.Here's my code sample:

Code:
FormatData = Replace(FormatData, "TEST" , "THIS SHOULD BE BOLD")

View 1 Replies

Format BOLD And ITALIC To Same Text?

Apr 7, 2011

Can we able to format BOLD and ITALIC to the same text?

View 1 Replies

VS 2008 Bold Text In A RichTextBox?

Jun 18, 2012

on a timer that ticks every 1ms have it:

if RichTextBox1.Contains "begin" then
change "begin" to "begin".bolded
end if

[Code].....

View 6 Replies

VS 2010 Bold Certain Text In Richtextbox?

Mar 8, 2011

I'm trying to have a feature in my application where every time the user presses the "-" key the word directly before it becomes bold. This much I've been able to figure out:

[Code?

View 4 Replies

Answered Making A My.Settings Bit Of Text Bold?

Aug 12, 2010

I'm using My.Settings to store some text information which will be displayed to the user under certain conditions. What I'd like to know is whether part of the text (not all of it) can be formatted in bold?

The reason I'm storing in My.Settings is because it can be customized but not to the extent where I need to store it in a database. And while I'm at it, is it possible to format parts of MessageBox text and labels in bold, or is this an all or not at all situation i.e. changing the font property?

View 2 Replies

Bold Text String When Adding It To Listbox?

Mar 28, 2011

I'm adding text string into a list box together with data retrieved from text box, and I wanna bold that text but really don't have any idea how to do so.

E.g. listProducts.Items.Add("Product Name - " & textProdName.text)

I just wanna bold that first bit of text in the quotes.

View 3 Replies

Change To Bold A Part Of The Label's Text

Dec 7, 2009

How can i change to bold a part of the label's text? e.g. "&Hello" will appear as: "Hello"
"Hello John" how can i make it appear as: "Hello John"?

View 4 Replies

Format The Text So It Can Be Saved As Courier New Or Bold?

May 18, 2011

i'm writing a simple program that outputs a report to a text file with code similar to below PrintLine(1, "Hello", "World") my question is how to format the text so it can be saved as courier new or bold? frustrated visual basic user

View 2 Replies

Formatting Text (Bold, Italic, Underline) Etc Going Into A RTB

Mar 14, 2011

RTB.text (or .rtf) = "Some text" & "some bold text" & TextBoxA.text & BoldTextBoxB.text.

How to I make "some bold text" bold and the text in "BoldTextBoxB" bold when it goes into my RTB?

I need bold, italic, and underline, but would prefer a general solution.

View 9 Replies

How To Make Dialog Text (Certain Words) Bold

Feb 6, 2012

I want to change certain words in line as bold and remaining words as normal case. And I want to display this kind of text in dialog box. I want to achieve it in vb 2008.

View 3 Replies

Make Bold Textbox Text Using Checkbox?

Jun 9, 2011

IN VB.NET (VISUAL STUDIO 2005)I HAVE taken one textbox with some message and want to bold it by using chkbox control when checkbox is checked the text in textbox should be bold otherwise it is regular.i tried the code too many different ways but till now problem is not solved

View 1 Replies

Alter The Value Of The Field In The Table To Show The Text As Bold?

Feb 10, 2009

There is a label control on .aspx The text "hello" comes from database i.e. label1.text = "hello" Note that, I do not have permission to change the UI code.

I would like to alter the value of the field in the table to show the text as bold i.e. <strong>

To have the text displayed as highlighted i.e. bold, I manually modified the text inside the field of the table to show

<strong>hello</strong>

Is this ok? It does not seem to work because in the label control I see: <strong>hello</strong>

View 8 Replies

C# - Make Portion Of Label Text To Be Styled Bold

Jun 2, 2011

What is the standard / best practices way to achieve the effect of text formatting within a label in a standard .NET Windows Forms Application? For example, I want a label I would programmatically change. However, I might want a particular word in the label to be bold.

View 2 Replies

How To Bold Specific Text In Report Viewer Control

Mar 25, 2010

I have a vb.net project containing the report viewer control that has a dataset bound to it. I have designed a letter in report viewer and need to highlight a few words by bolding and underlining the words. Can this be done? All I seem to be able to do is bold the textbox control, but then every text that resides in the text box will be bold and underlined. I cannot create a static label because the names may increase or decrease in size as well.

View 7 Replies

Keep Bold / Italic / Underline Options On Text Resize

Dec 20, 2009

i am using the following code to resize text.all you have to do is hold the Shift key down and scroll the MouseWheel either up or down..[code]i cannot seem to figure out, is how to keep the font options that were previously set ex.if i set a word to bold, italic, or underline, and use my shift + mousewheel to resize all or just selected text, all the options are reset to default, meaning, no options as previously selected..

View 7 Replies

Programmatically Make Text Bold On Windows Form?

Dec 7, 2010

using vb.net 2005, creating a windows form.

I need to programmatically make part of a string bold, how to do this?

EX: here is the asp.net version of what i need

Dim aString As String = "<b>Product Details:</b> here are the details of the product"

but I need to do this for a windows form, is there a good way to do this?

View 2 Replies

VB Text Format - BOLD And ALIGNMENT (Right, Left, Center)

Jul 10, 2011

In VB, to do a newline feed its VbCrLf, but to do text format - BOLD and ALIGNMENT (Right, Left, Center)....how?

This is my code that I will use for printing..

1) I want to make Textbox1.text and textbox2.text in BOLD text format and in center alignment that will output to

My printout.. Because the output is always in align left.

CODE:

View 6 Replies

VS 2008 - How To Make Just Group Box Caption Text Bold

Jul 14, 2009

How come when I make a group box "caption" text bold it also makes everything in the group box bold? How do I do this from the IDE - change just the font characteristics of the group box itself and not it's contents?

View 6 Replies

Word Automation - Write To Word And Have Normal Text And Bold Text In The One Line?

Mar 30, 2012

All i want to do is write some text into word... some of the text is normal text the other is bold... how do I achieve this?The samples I have seen, they either do normal text or bold.. but in different lines utilising InsertParagraphAfter()I need to have both in the one lineie how do i do the following line? using vb.net and word automation (word 2010)

View 2 Replies

Bold Some Dates The Program Doesn't Show Bold Dates On Month Calendar?

Dec 15, 2009

I have one more problem with MonthControl.And when I bold some dates the program doesn't show bold dates on month calendar.When I move on next or previous month and get back to currently month the program normal displays bold dates. What's the problem?

View 22 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved