Matlab: Setting an image as form background

Well, this is something new for me — new easy techniques — so I should post it here incase I forgot where to look.

Got the tips from here: http://stackoverflow.com/questions/13101661/how-to-put-a-background-image-in-a-figure-using-matlab-guide

So, supposed hat you want to make an image as the background image that span all over the form/figure. The first step is to edit the .m file that correspondent to your form/figure .fig.

Find your figure Opening function, it should look like this:

Now, exactly before guidata(hObject, handles); code, you put these codes:

Those codes will show “the_background.jpg” located in the same directory as your GUI files as your form background and stay below other UI controls.

Leave a Reply

%d bloggers like this: