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
  1. Home
  2. Web Development
  3. ASP.NET
  4. RadioButton Width

RadioButton Width

Scheduled Pinned Locked Moved ASP.NET
csharpquestion
4 Posts 2 Posters 0 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
    kontax
    wrote on last edited by
    #1

    Hi everyone, I need to create runtime RadioButtons with C#, and I want to set the width of the label (or of the entire control). This way it's not working: RadioButton rdb = new RadioButton(); rdb.Width=300; :sigh: Suggestions? What am I doing wrong? Thanks!

    M 1 Reply Last reply
    0
    • K kontax

      Hi everyone, I need to create runtime RadioButtons with C#, and I want to set the width of the label (or of the entire control). This way it's not working: RadioButton rdb = new RadioButton(); rdb.Width=300; :sigh: Suggestions? What am I doing wrong? Thanks!

      M Offline
      M Offline
      Mitch F
      wrote on last edited by
      #2

      Have you tried setting the AutoSize property of the RadioButton to false? By your code, I'm assuming you're not using ASP .Net, and that you are using C#; if that is the case, you might want to put this question in the C# forum next time. Otherwise, I apologize for my assumption. :) I hope this helps.

      K 1 Reply Last reply
      0
      • M Mitch F

        Have you tried setting the AutoSize property of the RadioButton to false? By your code, I'm assuming you're not using ASP .Net, and that you are using C#; if that is the case, you might want to put this question in the C# forum next time. Otherwise, I apologize for my assumption. :) I hope this helps.

        K Offline
        K Offline
        kontax
        wrote on last edited by
        #3

        Okk...I'm using C#, you're right :) but I'm developing a web application, so I thought it was better to post here, otherwise i could have got an answer about windows applications... Yes, I tried to change the autosize to false, but it didn't work... Don't know what I have to think... Anyway, Thanks!

        M 1 Reply Last reply
        0
        • K kontax

          Okk...I'm using C#, you're right :) but I'm developing a web application, so I thought it was better to post here, otherwise i could have got an answer about windows applications... Yes, I tried to change the autosize to false, but it didn't work... Don't know what I have to think... Anyway, Thanks!

          M Offline
          M Offline
          Mitch F
          wrote on last edited by
          #4

          I apologize for my assumption; you've posted in the right area. :) If you look at the source code in HTML after ASP .Net creates the radio buttons, it actually creates two HTML elements, an tag (which creates the button) and a tag (that contains the text linked to the button). You will most likely have to find a way to get CSS attached to the element. I hope this helps.

          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