有图形的标签? [英] Labels with graphics?

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

问题描述

是否有将图形或图标嵌入标签的常用方法?我希望

有类似Press<< IMGBTN1> To Continue的内容。或者按

<< IMGBTN2>寻求帮助。


通常我只会为整个字符串创建一个图形,但是这个将

翻译成多种语言并且我想保留图像

泛型并且只翻译文本。

解决方案
" raiderdav" < ra ******* @ gmail.comwrote:


是否有将图形或图标嵌入标签的常用方法?

通常我只是为整个字符串创建一个图形,但是这将用多种语言翻译
并且我想保留图像

generic并且只翻译文本。



你绝对不能用一个简单的标签来做。你可以在Paint事件中使用

自定义绘图,但是你必须考虑

自动换行等内容。


您还可以确保图像落在标签之外,例如继续点击:<<< />
""我想每种语言都有一个

的方式来说明这句话,以便图像最后,但你永远不会知道。


一般建议将图像与文本完全分开

用于本地化目的。


Eq。


5月12日,10:56 * am,raiderdav< raider ... @ gmail.comwrote:


是否有一种嵌入图形的常用方法或图标成标签? *我希望

有类似按<< IMGBTN1>继续的内容或者按

<< IMGBTN2>寻求帮助。


通常我只会为整个字符串创建一个图形,但是这个将

翻译成多种语言,我想保留图像

泛型并且只翻译文本。






框架中没有这样的控件,想象一下,如果相反,

你想要两个图像吗?或者如何表示

图像的位置?

但是实现并不困难,你可以创建一个控件,

由两个标签和一个PictureBox组成


框架中没有这样的控件,想象一下,如果改为


你想要两个图像?或者如何表示

图像的位置?

但是实现并不困难,你可以创建一个控件,

由两个标签组成,一个PictureBox



谢谢你们两个评论。看起来我需要为自己创建一个

Label-Image-Label控件。


我需要显示的图标/图像是一切都很简单。考虑到为每个图标创建一个自定义字体字符,我也是

,但是我认为因为字体全部而难以正确着色所以

单色,并且没有办法在单个标签内对单个字符进行着色

(或者在那里?)。


谢谢,

dave


Is there a common way to embed a graphic or icon into a label? I want
to have something like "Press <<IMGBTN1>To Continue" or "Press
<<IMGBTN2>For Help".

Normally I''d just create a graphic for the whole string, but this will
be translated in multiple languages and I want to keep the images
generic and only translate text.

解决方案

"raiderdav" <ra*******@gmail.comwrote:

Is there a common way to embed a graphic or icon into a label?
Normally I''d just create a graphic for the whole string, but this will
be translated in multiple languages and I want to keep the images
generic and only translate text.

You definitely can''t do it with a simple label. You could do it with
custom drawing in a Paint event, but you''d have to consider things like
word wrap.

You could also ensure the image falls outside the label, e.g. "To
continue, click: <separate image here>". I suppose every language has a
way of stating this sentence so that the image comes last, but you never
know.

The general recommendation is to keep images totally separate from text
for localisation purposes.

Eq.


On May 12, 10:56*am, raiderdav <raider...@gmail.comwrote:

Is there a common way to embed a graphic or icon into a label? *I want
to have something like "Press <<IMGBTN1>To Continue" or "Press
<<IMGBTN2>For Help".

Normally I''d just create a graphic for the whole string, but this will
be translated in multiple languages and I want to keep the images
generic and only translate text.

Hi,

There is no such a control in the framework, imagine, what if instead
of one you want two images?, or how to indicate the position of the
images?
But it''s not difficult to implement, you could create a control that
is compose of two labels and one PictureBox


There is no such a control in the framework, imagine, what if instead

of one you want two images?, or how to indicate the position of the
images?
But it''s not difficult to implement, you could create a control that
is compose of two labels and one PictureBox

Thank you both for the comments. It looks like I''ll need to create a
Label-Image-Label control for myself.

The icons/images that I need to display are all very simple. I''m also
considering creating a custom font character for each icon, but I
suppose that will be difficult to color properly as fonts are all
single colored, and there is no way to color individual characters
within a single label (or is there?).

Thanks,
dave


这篇关于有图形的标签?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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