This is a migrated thread and some comments may be shown as answers.

Programmatically setting the Image from file

2 Answers 173 Views
RibbonBar
This is a migrated thread and some comments may be shown as answers.
Clatonh
Top achievements
Rank 1
Clatonh asked on 11 Jul 2007, 05:59 PM
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 Answers, 1 is accepted

Sort by
0
Clatonh
Top achievements
Rank 1
answered on 11 Jul 2007, 06:25 PM
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

0
D3M1TR1US
Top achievements
Rank 1
answered on 23 Jul 2007, 05:02 AM
Yes. That is one of the basics from the image class.
Tags
RibbonBar
Asked by
Clatonh
Top achievements
Rank 1
Answers by
Clatonh
Top achievements
Rank 1
D3M1TR1US
Top achievements
Rank 1
Share this question
or