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

button in bold

Hello peole,

i'm begin with VB.NET (before i was under ASP and VB)

i have a -CheckBox- turned into a button with him properties Appearance.

so i whant that the text become in Bold so i have Write This ->

checkbox1.Font = New Font(checkbox1.Text, chkdef.Text)

But that dont work :-( so how i can simply turn the texte into BOLD ?

Thank a lot people....
Feb 27 '06 #1
5 1940
"James_Ptg" <Tw*******@hotmail.Com> schrieb:
checkbox1.Font = New Font(checkbox1.Text, chkdef.Text)

But that dont work :-( so how i can simply turn the texte into BOLD ?


\\\
Me.Button1.Font = _
New Font(Me.Button1.Font, Me.Button1.Font.Style Or FontStyle.Bold)
///

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
Feb 27 '06 #2

"James_Ptg" <Tw*******@hotmail.Com> wrote in message
news:uW***************@TK2MSFTNGP12.phx.gbl...
Hello peole,

i'm begin with VB.NET (before i was under ASP and VB)

i have a -CheckBox- turned into a button with him properties Appearance.

so i whant that the text become in Bold so i have Write This ->

checkbox1.Font = New Font(checkbox1.Text, chkdef.Text)

But that dont work :-( so how i can simply turn the texte into BOLD ?

Thank a lot people....


Here is a simple example:

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
With CheckBox1

.Text = "I'm BOLD"

.Font = New System.Drawing.Font("Arial", 10)

.Font = New System.Drawing.Font(CheckBox1.Font, FontStyle.Bold)

End With

End Sub

It's buried in the help (well, for me it was) Hope this helps.

james



Feb 27 '06 #3

"james" <jj***************@earthlink.net> wrote in message
news:ui****************@TK2MSFTNGP12.phx.gbl...

"James_Ptg" <Tw*******@hotmail.Com> wrote in message
news:uW***************@TK2MSFTNGP12.phx.gbl...
Hello peole,

i'm begin with VB.NET (before i was under ASP and VB)

i have a -CheckBox- turned into a button with him properties Appearance.

so i whant that the text become in Bold so i have Write This ->

checkbox1.Font = New Font(checkbox1.Text, chkdef.Text)

But that dont work :-( so how i can simply turn the texte into BOLD ?

Thank a lot people....


Here is a simple example:

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
With CheckBox1

.Text = "I'm BOLD"

.Font = New System.Drawing.Font("Arial", 10)

.Font = New System.Drawing.Font(CheckBox1.Font, FontStyle.Bold)

End With

End Sub

It's buried in the help (well, for me it was) Hope this helps.

james

I would have said "buried deep in the help"

GalenS
Feb 27 '06 #4

"Galen Somerville" <ga***@community.nospam> wrote in message
news:u6**************@TK2MSFTNGP09.phx.gbl...

"james" <jj***************@earthlink.net> wrote in message
news:ui****************@TK2MSFTNGP12.phx.gbl...
Here is a simple example:

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
With CheckBox1

.Text = "I'm BOLD"

.Font = New System.Drawing.Font("Arial", 10)

.Font = New System.Drawing.Font(CheckBox1.Font, FontStyle.Bold)

End With

End Sub

It's buried in the help (well, for me it was) Hope this helps.

james

I would have said "buried deep in the help"

GalenS

Yes, that is probably a more accurate description ! :-)

james
Feb 27 '06 #5
Just to make it more fun,,,,,,,,,,,,here's this:

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click

With CheckBox1

..Text = "I'm BOLD"

..Font = New System.Drawing.Font(CheckBox1.Font, FontStyle.Underline +
FontStyle.Bold + FontStyle.Italic + FontStyle.Strikeout)

End With

End Sub

Almost all the available settings except for FontStyle.Regular.
james

Feb 27 '06 #6

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

Similar topics

0
by: Maziar Aflatoun | last post by:
Hi everyone, I have the following shopping cart (basket view). However, Delete button in my datagrid doesn't fire any events. Does anyone know why? (It's a user web control) <%@ Control...
10
by: IkBenHet | last post by:
Hello, I am creating a toolbar for an richtext editor. I already managed to make the images act as buttons (hovering,...) But now I want to be able to keep a button selected (down) when clicking...
0
by: Maziar Aflatoun | last post by:
Hi everyone, I have the following shopping cart (basket view). However, Delete button in my datagrid doesn't fire any events. Does anyone know why? (It's a user web control) <%@ Control...
10
by: IchBin | last post by:
I am trying to set the state of a radio button. I do not see what I am doing wrong. Sorry, I am new at this.. I need another set of eyes to look at this snip of code. I am trying to set the radio...
3
by: gilbert3b2g | last post by:
I'm new to Python, and programming in general. What I'm trying to do here is to load a list of accounts from a file on my harddrive into a string of Buttons in Tkinter, and when I press one of the...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.