运行时更改图像源 [英] Change image source at run time

查看:175
本文介绍了运行时更改图像源的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在点击事件中改变图像。我改变了点击图像的来源,但它不会立即反映,当任何其他事件被触发。为什么是这样,任何人都有解决方案??

解决方案设置之后调用 image.validateNow()立即强制更改。


I want to change the image at click event.I change the source of the image on click but its not reflecting immediately it comes when any other event is fired.Why is it so and anyone have the solution??

解决方案

Call image.validateNow() after setting the source to force the change immediately.

这篇关于运行时更改图像源的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆