473,386 Members | 1,841 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,386 software developers and data experts.

Font Bold

Lou
Why is font bold a read only property.
I create a new label control and want to set the font properties.
How do I set the font properties of a newly created label control?

lbl = New Label

lbl.Font.Bold=True
Feb 10 '07 #1
3 7994
"Lou" <lo********@comcast.netschrieb:
Why is font bold a read only property.
I create a new label control and want to set the font properties.
How do I set the font properties of a newly created label control?

lbl = New Label

lbl.Font.Bold=True
\\\
lbl.Font = New Font(lbl.Font, FontStyle.Bold)
///

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Feb 11 '07 #2
I don't know why

It is something we got used to and the way that I know of is to set the font
to a new font like: Label1.Font= New Font(...)

hth,
Sam
"Lou" <lo********@comcast.netwrote in message
news:um**************@TK2MSFTNGP03.phx.gbl...
Why is font bold a read only property.
I create a new label control and want to set the font properties.
How do I set the font properties of a newly created label control?

lbl = New Label

lbl.Font.Bold=True


Feb 11 '07 #3
Lou
Way too easy!
thanks.

"Herfried K. Wagner [MVP]" <hi***************@gmx.atwrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
"Lou" <lo********@comcast.netschrieb:
>Why is font bold a read only property.
I create a new label control and want to set the font properties.
How do I set the font properties of a newly created label control?

lbl = New Label

lbl.Font.Bold=True

\\\
lbl.Font = New Font(lbl.Font, FontStyle.Bold)
///

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Feb 12 '07 #4

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

Similar topics

16
by: Coder Droid | last post by:
I'm trying my first table-less site, and I've bumped my head up against a wall. I can't change the font size within a div. Real quick, my style sheet has: -------------------------------------...
2
by: Hariharan S | last post by:
Hi Guys, Have an issue with the Font object. I have a text box in which I can enter text and I have included a small button which upon selection, should enable me to change the newly entered...
2
by: Amith | last post by:
Hi, I am using an ActiveX created using delphi. It has a font property exposed. The font property is of type IFontDisp in the server(delphi). The font properties like Size, Bold, Underline etc...
4
by: tshad | last post by:
I am having trouble with links in my DataGrid. I have Links all over my page set to smaller and they are consistant all over the page in both Mozilla and IE, except for the DataGrid. Here is a...
7
by: Sakharam Phapale | last post by:
Hi All, How to preserve the old font properties while changing new one? I posted same question 2 months back, but I had very small time then. eg. "Shopping for" is a text in RichTextBox and...
2
by: Adam Honek | last post by:
Okay, Assinging the font and its style (bold, italic etc.) using the font dialog is easy such as: FontDialog1.ShowDialog() txtEmailBody.SelectionFont = FontDialog1.Font But how does one...
4
by: paraidy | last post by:
Hi, i'm using a richtextbox named r1, and i want to write in Bold and italic, i tryed this for bold and it work Dim f As New Font("Verdana", 30, FontStyle.Bold) r1.Font = f r1.Text = "Hello" ...
1
by: Henry Jones | last post by:
I found some code to change the font on a button to bold: private void btnBold_Click(object sender, System.EventArgs e) { btnCalculate.Font = new Font(btnCalculate.Font, ...
1
by: FLEMEF | last post by:
Hello All, I'm not very good at Java... With this piece of Java code, how could I modify the StyleOptions.java program to allow the user to specify the size of the font, while using the text...
2
by: kheitmann | last post by:
OK, so I have a blog. I downloaded the "theme" from somewhere and have edited a few areas to suit my needs. There are different font themes within the page theme. Long story short, my "Text Posts"...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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...

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.