使用图片作为按钮? [英] Using pictures as buttons?

查看:21
本文介绍了使用图片作为按钮?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我和我的一个朋友谈过,他告诉我可以在图像编辑器(gimp/photoshop)中创建图像,然后将其用作按钮.他说这就是具有出色 GUI 的应用程序的工作方式.

I talked to a friend of mine and he told me that it's possible to create an image in an image editor (gimp/photoshop) and then use it as a button . He said that's the way applications that have great GUIs do it.

他还说有一个文件描述了图像的哪些部分构成了按钮.

He also said that there is a file describing which parts of the image make up the button.

这是可能的,还是他疯了"?:)

Is this possible , or is he "crazy"? :)

推荐答案

这需要通过选择的语言等来澄清. 一般来说,大多数语言(WinForms、Java AWT/SWT 等)都有图像或背景image 属性允许您将图像用于按钮.甚至还有皮肤框架可以让您以易于定义的方式为所有控件使用图像.

This needs to be clarified with a language of choice, etc. In general, most languages (WinForms, Java AWT/SWT, etc) have an image or background image property that allows you to use images for buttons. There are even skinning frameworks that will let you use images for all controls in an easy-to-define manner.

如果您在谈论 HTML,则有一种按钮输入类型可以允许将图像用作表单的按钮.

If you are talking about HTML, there is a button input type that can allow an image to be used as a button for a form.

@Vhaerun
CodeProject 是查找大量皮肤库的好地方.我很久以前用过这个.Winamp 是一个很好的皮肤应用程序示例,用户可以在其中创建自己的模板以完全改变外观应用程序无需更改任何代码.实际上,大多数媒体播放器都有某种皮肤可用.

@Vhaerun
CodeProject is a good place to find lots of skinning libraries. I used this one a long time ago. Winamp is a great example of a skinned application, where users can actually create their own templates to completely change the look of the application without changing code whatsoever. Actually, most media players have some sort of skinning available.

这篇关于使用图片作为按钮?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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