Programmatically setting the Image from file

3 posts, 0 answers
  1. Clatonh
    Clatonh avatar
    8 posts
    Member since:
    Jun 2007

    Posted 11 Jul 2007 Link to this post

    Hello everyone,

    I am trying to create a ribbon programmatically & trying to set an Image from a file on the RADButtonElement, but I am failing to do so.
    Does anyone have a code handly to add a image from the local drive not from the Resource file or the ImageList control. I need to add it from the file.

    Thanks,
    Claton
  2. Clatonh
    Clatonh avatar
    8 posts
    Member since:
    Jun 2007

    Posted 11 Jul 2007 Link to this post

    I was able to find the solution myself, i used the following code

    RadButtonElement1.Image = Image.FromFile("C:\xxx\Delete.png", True)

    this worked and loaded the image from the file.

    -Claton

  3. UI for WinForms is Visual Studio 2017 Ready
  4. D3M1TR1US
    D3M1TR1US avatar
    4 posts
    Member since:
    Jul 2007

    Posted 23 Jul 2007 Link to this post

    Yes. That is one of the basics from the image class.
Back to Top