I cannot change button's background image, everything else reacts.

using UnityEngine;
using System.Collections;
using UnityEngine.UI;

public class BuyMovement : MonoBehaviour {
    public Button MovBuyButton; // assign in the editor
    public PlayerMovement spdmod;
    public MoneyRegulator cash;
    public Button ProgressBar;
    public int level = 0;

    public Sprite lev0, lev1, lev2, lev3;

    void Start() {
        MovBuyButton.GetComponent<Button>().onClick.AddListener(() => { buttonClicked(); });
    }

    void buttonClicked() {
        if (level == 0 && cash.Cash > 500) {
            cash.Cash -= 500;
            spdmod.external_speed = 2;
            level++;
            Debug.Log ("Actually done.");
            // gameObject.GetComponent<Image>().sprite = lev1;
            ProgressBar.image.overrideSprite = lev0;
        }
    }
}

I have such code, when I press the button, 500 cash is gone, I get more speed, I level up, inspector says “Actually done”, no errors, but it still doesn’t change source of image. Could you please explain why?

From what I see… ProgressBar is a “Button”. In my code Button does not have an “image” property. Hmmmm, I am using 4.6.1f1, maybe your version does. How I change the image to the button is:

Image aImage = ButtonList[0].GetComponentInChildren<Image>();
aImage.sprite = _Beaten;