如果它是空的,如何在图像框上默认显示文本? [英] How to show by default text on image box if it is empty?

查看:75
本文介绍了如果它是空的,如何在图像框上默认显示文本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

[1]我有一个图像控件来显示学生的图片。



[2]如果我不想在图像中插入图片ctrl (即使我在应用程序中插入新记录)我想在图像control_click上显示没有插入图片()



我不想要msgbox但是图像ctrl上的消息(默认情况下,它会显示图片框中是否没有图片,否则可能显示图片)



那么sh''我这么做???

请帮助....

[1] I have a image control to show the picture of students.

[2] If I doesn''t want to insert picture in image ctrl (even when I insert a new record in application) I want to show "No picture is inserted" on image control_click()

I don''t want msgbox but the message on image ctrl (by default it sh''d show if picture is not present in the picture box otherwise it may show picture)

So what sh''d I do???
please help....

推荐答案

我过去遵循的最简单,最简单的方法是保留标签如果没有设置图像,默认情况下在图像控件上显示文本,该标签将显示在顶部,稍后如果加载图像,则可以隐藏标签。
The simplest and easiest method I used to follow is keeping an label with text on image control by default if no image is set, that label will be displayed on the top and later if image is loaded you may hide the label.


这篇关于如果它是空的,如何在图像框上默认显示文本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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