Change button image via code

Asked

Viewed 343 times

0

Use Genexus Evolution 3 Generator C# Win. I would like to change the image of a button via code. I put in the event start the following code:

botao. Bitmap=Loadbitmap(' picture figures m2.jpg')

But it didn’t work. The button goes blank, doesn’t load the image. I tried to put relative path to get inside a subfolder from where the application is running.

Grateful

1 answer

1


Insert the image from the button with View > Images, then use an image type variable.

So you can click the button as an image in the page Start event

&Fromimage selector.(Selrow)

I hope I’ve helped.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.