Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. label properties

label properties

Scheduled Pinned Locked Moved ASP.NET
help
5 Posts 3 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    kuwl_mark
    wrote on last edited by
    #1

    pls can you help in setting label properties dynamically i want to set font ,font name ,font style,font weight of a label itried lbl12.Font.Name = FontSize.Small but it is not working Dim Lbl12 As New Label Lbl12.ID = "Lbl12" & i & " " pls help me

    _ M 2 Replies Last reply
    0
    • K kuwl_mark

      pls can you help in setting label properties dynamically i want to set font ,font name ,font style,font weight of a label itried lbl12.Font.Name = FontSize.Small but it is not working Dim Lbl12 As New Label Lbl12.ID = "Lbl12" & i & " " pls help me

      _ Offline
      _ Offline
      _AK_
      wrote on last edited by
      #2

      Hi, create a new font object and then give the properties. Something like this: With Label1 .Font = New Font(.Font.Name, .Font.Size * 1.5, .Font.Style, .Font.Unit) End With Hope this will help. Best Regards, Apurva Kaushal

      1 Reply Last reply
      0
      • K kuwl_mark

        pls can you help in setting label properties dynamically i want to set font ,font name ,font style,font weight of a label itried lbl12.Font.Name = FontSize.Small but it is not working Dim Lbl12 As New Label Lbl12.ID = "Lbl12" & i & " " pls help me

        M Offline
        M Offline
        Malik Nasir
        wrote on last edited by
        #3

        the same works fine i tried this one lbl12.Font.Name ="verdana" lbl12.Font.size=12 lbl12.BackColor = System.Drawing.Color.Blue and it worked Regards

        K 1 Reply Last reply
        0
        • M Malik Nasir

          the same works fine i tried this one lbl12.Font.Name ="verdana" lbl12.Font.size=12 lbl12.BackColor = System.Drawing.Color.Blue and it worked Regards

          K Offline
          K Offline
          kuwl_mark
          wrote on last edited by
          #4

          Thanks but size is not working i use it several way lbl12.Font.size=12 lbl12.Font.size=12px lbl12.Font.size="12px" pls help me out also I use image button to display image and i want to use Image control how to setpath and properties to it

          _ 1 Reply Last reply
          0
          • K kuwl_mark

            Thanks but size is not working i use it several way lbl12.Font.size=12 lbl12.Font.size=12px lbl12.Font.size="12px" pls help me out also I use image button to display image and i want to use Image control how to setpath and properties to it

            _ Offline
            _ Offline
            _AK_
            wrote on last edited by
            #5

            Hi, The first one is working fine here i.e lbl12.Font.size=12. Which property you want to set for the image control. the common is Best Regards, Apurva Kaushal

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups