CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2005
    Location
    India
    Posts
    102

    image in radiobuttonlist

    Is it possible to put images in RadiobuttonList values?
    I mean if i have four listitems in radiobuttonlist. Can i set the images to the listitems instead of text data?
    Manjula
    ------------
    "To err is Human, and to blame it on a computer is even more so.."

  2. #2
    Join Date
    Feb 2005
    Location
    Denmark
    Posts
    742

    Re: image in radiobuttonlist

    I've never worked directly with the radiobutton list, so how it would be done excatly I can't say.

    But you can place images at radiobuttons by for instance providing the html image source code in the text value. This way you'll get an image next to the "button" (Perhaps, this could be done by adding a image control to the radiobuttons control).
    Such as: RadioButton.text = "<img src="someurl" attributes />"

    And I would suppose the RadioButtonList can bind to a collection of radiobuttons, so I would say - it is quite possible.

    If this isn't what you request, then I don't think I understood your question right :/


    Hope this can help you on the way.

  3. #3
    Join Date
    Mar 2005
    Location
    India
    Posts
    102

    Re: image in radiobuttonlist

    Thanks, alsvha

    I could get images by setting
    Radiobutton.text=<img src="xx.gif" attributes/>

    Thank you very much !!
    Manjula
    ------------
    "To err is Human, and to blame it on a computer is even more so.."

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured