|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
button in boldHello 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.... "James_Ptg" <Twinse***@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/>
Show quote
Hide quote
"James_Ptg" <Twinse***@hotmail.Com> wrote in message Here is a simple example:news:uWkC%23Q8OGHA.740@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.... 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
Show quote
Hide quote
"james" <jjames700REMOV***@earthlink.net> wrote in message I would have said "buried deep in the help"news:ui1Qq%238OGHA.2828@TK2MSFTNGP12.phx.gbl... > > "James_Ptg" <Twinse***@hotmail.Com> wrote in message > news:uWkC%23Q8OGHA.740@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 > > GalenS
Show quote
Hide quote
"Galen Somerville" <galen@community.nospam> wrote in message Yes, that is probably a more accurate description ! :-)news:u6OQw99OGHA.2604@TK2MSFTNGP09.phx.gbl... > > "james" <jjames700REMOV***@earthlink.net> wrote in message > news:ui1Qq%238OGHA.2828@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 > james 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
Distributing VB 2005 projects
DateTimePicker + DataBinding + Null-Value: THE solution? Is there a simple way to email? ptr to string ? How to remove Volume Name on removable drive? AcroRd32.exe left open System.IO.Ports.SerialPort.GetPortNames return wrog names above CO Unit Testing and Test Cases Printing a bar code Retrieving a handle to a private delegate |
|||||||||||||||||||||||