Determine the font style of a label control

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sly9er
    New Member
    • Jun 2010
    • 9

    Determine the font style of a label control

    Hello All,

    Does anyone know how to capture and save the font style of a label control.
    (FontStyle.Bold , FontStyle.Itali c, FontStyle.Under line)

    I need to be able to save the font style and have it reapplied when I reopon my form.

    I know how to "reapply" it when I open the form again. I just need help getting the original value for saving purposes.

    Thanx in advance for any help.
  • sly9er
    New Member
    • Jun 2010
    • 9

    #2
    No takers?

    Comment

    • ThatThatGuy
      Recognized Expert Contributor
      • Jul 2009
      • 453

      #3
      Originally posted by sly9er
      No takers?
      Capture and store the font of the Label using Label.Font...

      Then you can determine the styles of the font such as using FontObject.Font Family

      To get the style you can check for underline FontObject.Unde rline

      something like that

      Comment

      • sly9er
        New Member
        • Jun 2010
        • 9

        #4
        ThatThatGuy,

        YOU ARE THE MAN!!!

        I have been searching on this topic for 3 days.

        Thank you so much!

        So if anyone else is having this issue, here is the fix.

        Get the style propertie after after the font dialog button click. (OK or Cancel).

        If FontDialog1.Fon t.Underline = True Then
        MsgBox("underli ne")// replace this with your own process
        End If

        This was so elusive, but now I can us it for Bold, Underline, Italic, Strikout, and all the possible combinations.

        Sweet. Now I can complete my script.

        Whoo Hoo!

        Comment

        • ThatThatGuy
          Recognized Expert Contributor
          • Jul 2009
          • 453

          #5
          Originally posted by sly9er
          Hello All,

          Does anyone know how to capture and save the font style of a label control.
          (FontStyle.Bold , FontStyle.Itali c, FontStyle.Under line)

          I need to be able to save the font style and have it reapplied when I reopon my form.

          I know how to "reapply" it when I open the form again. I just need help getting the original value for saving purposes.

          Thanx in advance for any help.
          You got the answer and you posted your answer as the best answer ... strange

          Comment

          • sly9er
            New Member
            • Jun 2010
            • 9

            #6
            Oops,

            Sorry about that. Not sure how I made that mistake.

            Is there a way I can switch it to your answer?

            Comment

            • ThatThatGuy
              Recognized Expert Contributor
              • Jul 2009
              • 453

              #7
              Originally posted by sly9er
              Oops,

              Sorry about that. Not sure how I made that mistake.

              Is there a way I can switch it to your answer?
              ya you've done that

              Comment

              Working...