Professional Web Applications Themes

how to make columns the same size in a radio button list - ASP.NET General

The only thing i can figure out is making the length of the Text property on each listitem the same. That means something like this: <asp:listitem Text="itemone" /> <asp:listitem Text="item&nbsp;&nbsp;&nbsp;" /> kinda ugly but you could write a function that would do all this for you. i tested it and it works -trevor "Mark Kamoski" <mkamoski> wrote in message news:ODP%23x9uUDHA.2364TK2MSFTNGP09.phx.gbl... Hi-- OK, I want... ...a one-line radionbuttonlist... ...with 4 items in it... ...and I want the spacing from the center of any given radio button to either of its immediate neighbors to be the same as the distance from the ...

  1. #1

    Default Re: how to make columns the same size in a radio button list

    The only thing i can figure out is making the length of the Text property on each listitem the same. That means something like this:

    <asp:listitem Text="itemone" />
    <asp:listitem Text="item&nbsp;&nbsp;&nbsp;" />

    kinda ugly but you could write a function that would do all this for you. i tested it and it works

    -trevor
    "Mark Kamoski" <mkamoski> wrote in message news:ODP%23x9uUDHA.2364TK2MSFTNGP09.phx.gbl...


    Hi--

    OK, I want...

    ...a one-line radionbuttonlist...

    ...with 4 items in it...

    ...and I want the spacing from the center of any given radio button to either of its immediate neighbors to be the same as the distance from the center ANOTHER given radio button to either of ITS neighbors...

    ...that is, I want the "columns" of the radionbuttonlist layout to be the same width-- of course, regardless of the length of the text labels for the radio buttons themselves...

    ...that is, the column width should use the longest radio button label as the gauge and make all of the columns the same width as this longest one...

    ...I want to do this inline (not in code behind)...

    ...I do not want to use &nbsp; to make all of the radio button labels the same width...


    For example, (but this will probably only make sense if read in Courier or a similar font), assuming that "O" is the radio button...

    ...I DO NOT want this....

    O L1 O LongLabelOne O L2 O LongLabelTwo O L3

    ...rather, I DO want something like this...

    O L1 O LongLabelOne O L2 O LongLabelTwo O L3

    How can this be accomplished?

    Please advise.

    Thank you.

    --Mark

    Trevor Hartman Guest

  2. #2

    Default Re: how to make columns the same size in a radio button list



    Trevor--

    Thank you for the ideas.

    That will, in fact, work-- BUT only if one is using a fixed-pitch font, such as Courier.

    If the font is proportional, such as Verdana, then it will NOT work.

    If you have any more ideas, please post them.

    Thank you.

    --Mark


    "Trevor Hartman" <synapseehotmail.com> wrote in message news:%23TJTvTvUDHA.1280tk2msftngp13.phx.gbl...
    The only thing i can figure out is making the length of the Text property on each listitem the same. That means something like this:

    <asp:listitem Text="itemone" />
    <asp:listitem Text="item&nbsp;&nbsp;&nbsp;" />

    kinda ugly but you could write a function that would do all this for you. i tested it and it works

    -trevor
    "Mark Kamoski" <mkamoski> wrote in message news:ODP%23x9uUDHA.2364TK2MSFTNGP09.phx.gbl...


    Hi--

    OK, I want...

    ...a one-line radionbuttonlist...

    ...with 4 items in it...

    ...and I want the spacing from the center of any given radio button to either of its immediate neighbors to be the same as the distance from the center ANOTHER given radio button to either of ITS neighbors...

    ...that is, I want the "columns" of the radionbuttonlist layout to be the same width-- of course, regardless of the length of the text labels for the radio buttons themselves...

    ...that is, the column width should use the longest radio button label as the gauge and make all of the columns the same width as this longest one...

    ...I want to do this inline (not in code behind)...

    ...I do not want to use &nbsp; to make all of the radio button labels the same width...


    For example, (but this will probably only make sense if read in Courier or a similar font), assuming that "O" is the radio button...

    ...I DO NOT want this....

    O L1 O LongLabelOne O L2 O LongLabelTwo O L3

    ...rather, I DO want something like this...

    O L1 O LongLabelOne O L2 O LongLabelTwo O L3

    How can this be accomplished?

    Please advise.

    Thank you.

    --Mark

    Mark Kamoski Guest

Similar Threads

  1. Radio Button & List to search - ASP
    By Tag2007 in forum Macromedia Dynamic HTML
    Replies: 0
    Last Post: July 27th, 11:01 AM
  2. How to make owner draw radio button?
    By Toan in forum Mac Programming
    Replies: 1
    Last Post: September 6th, 02:05 AM
  3. How to put a full radio button list in each row of datagrid?
    By John Smith in forum ASP.NET Data Grid Control
    Replies: 1
    Last Post: August 20th, 12:27 AM
  4. radio button list doesn't hold value?
    By KathyB in forum ASP.NET General
    Replies: 2
    Last Post: August 12th, 02:46 AM
  5. Programmatically Selecting Item in Radio Button List
    By John Criswell in forum ASP.NET General
    Replies: 1
    Last Post: July 24th, 07:07 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139