ImageList:这是一个错误......? [英] ImageList: Is this a bug...?

查看:67
本文介绍了ImageList:这是一个错误......?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

....或者我错过了什么?


设置:


- 我创建了一个空的Winforms项目,并添加了两个按钮A和B.

- 按钮A的图像属性设置为指向图像文件来回

" users.png"

- 添加了一个图像列表并将SAME图像添加到此列表中,设置

属性(大小等)与A'的Image属性完全相同。

- 将按钮B'的ImageList属性设置为创建的新图像列表,并且它是

imageindex为0.


现在的图片显示在两个按钮上,但是当按钮A的图像看起来很好,按钮B'的图像看起来很糟糕,周围有蓝色边框

它... .remember:它是完全相同的图片,大小等....


我之前做过另一篇文章,但在尝试调整每个可能的设置之后
$ b $我自己,在Armin Zingler的大力帮助下,我们仍然没有找到

a这种行为的原因。这可能是一个影响很多用户的问题,所以如果有人对这种情况有什么建议,请告诉我

知道......如果这不是一个bug,应该有人在那里

知道怎么解决这个....我希望... :-)


我'' ve提供了我的testproject的链接,原始的.png图像位于

/ bin文件夹中。

http://langedal.com/testicons.zip


越来越沮丧......; - )


Roger

....or am I missing something?

Setup:

- I''ve created an empty Winforms project, and added two buttons A and B.
- Button A''s Image property is set to point to a imagefile calles
"users.png"
- Added an imagelist and added the SAME image to this list, setting the
properties (size etc.) exactly the same as for A''s Image property.
- Set button B''s ImageList property to the new imagelist created, and it''s
imageindex to 0.

The picture now shows on both buttons, but while Button A''s image looks
great, Button B''s image looks awful, with a blue border around
it....remember: It is the exact same picture, size, etc....

I did another post earlier, but after trying to tweak every possible setting
myself, and after extensive help from Armin Zingler, we have still not found
a reason for this behaviour. This may possibly be a problem affecting a lot
of users, so if anyone has suggestions on why this occurs, please let me
know... And if this is not a bug, there should be someone out there that
knows how to fix this....I hope... :-)

I''ve provided a link to my testproject, the original .png image is in the
/bin folder.

http://langedal.com/testicons.zip

Getting increasingly frustrated.... ;-)

Roger

推荐答案

我尝试将Imagelist的Colordepth设置为24 -bits代替8bit,而

什么都没有。所以也许这是一个错误......工具栏上也是如此。

顺便说一下,这是一个很棒的形象!你是如何/在哪里获得的?创造了他们

你自己?


Andre Nogueira


" Roger" < RO ****** @ hotmail.com>在消息中写道

news:uF ************** @ TK2MSFTNGP10.phx.gbl ...
I tried setting the Imagelist''s Colordepth to 24-bits instead of 8bit, and
nothing. So maybe it''s a bug... The same happens on the Toolbar.
By the way, that is a great image! How/where did you get them? created them
yourself?

Andre Nogueira

"Roger" <ro******@hotmail.com> wrote in message
news:uF**************@TK2MSFTNGP10.phx.gbl...
...或am am我错过了什么?

设置:

- 我创建了一个空的Winforms项目,并添加了两个按钮A和B.
- 按钮A'' s Image属性设置为指向imagefile calles
" users.png"
- 添加了一个图像列表并将SAME图像添加到此列表中,设置了
属性(大小等)与A'的Image属性完全相同。
- 将按钮B'的ImageList属性设置为创建的新图像列表,并且它的图像索引为0.

我之前做过另一篇文章,但在尝试调整每一个可能的设置后,我自己,并经过广泛的帮助来自Armin Zingle r,我们还没有找到这种行为的原因。这可能是一个影响用户的问题,所以如果有人对这种情况有什么建议,请让我知道......如果这不是一个bug,那么应该是有人在那里
知道如何解决这个问题....我希望... :-)

我已经提供了一个指向我的testproject的链接,原始.png图像位于
/ bin文件夹中。

http: //langedal.com/testicons.zip

越来越沮丧...... ;-)

Roger
...or am I missing something?

Setup:

- I''ve created an empty Winforms project, and added two buttons A and B.
- Button A''s Image property is set to point to a imagefile calles
"users.png"
- Added an imagelist and added the SAME image to this list, setting the
properties (size etc.) exactly the same as for A''s Image property.
- Set button B''s ImageList property to the new imagelist created, and it''s
imageindex to 0.

The picture now shows on both buttons, but while Button A''s image looks
great, Button B''s image looks awful, with a blue border around
it....remember: It is the exact same picture, size, etc....

I did another post earlier, but after trying to tweak every possible
setting
myself, and after extensive help from Armin Zingler, we have still not
found
a reason for this behaviour. This may possibly be a problem affecting a
lot
of users, so if anyone has suggestions on why this occurs, please let me
know... And if this is not a bug, there should be someone out there that
knows how to fix this....I hope... :-)

I''ve provided a link to my testproject, the original .png image is in the
/bin folder.

http://langedal.com/testicons.zip

Getting increasingly frustrated.... ;-)

Roger



*" Roger" < RO ****** @ hotmail.com> scripsit:
* "Roger" <ro******@hotmail.com> scripsit:
...或者我错过了什么?

设置:

- 我创建了一个空的Winforms项目,并添加了两个按钮A和B.
- 按钮A'的图像属性设置为指向图像文件calles
" users.png"
- 添加了图像列表并添加了相同的图像这个列表,设置
属性(大小等)与A'的Image属性完全相同。
- 将按钮B'的ImageList属性设置为创建的新图像列表,它'' s
imageindex为0.

图片现在显示在两个按钮上,但是当按钮A的图像看起来很棒时,按钮B的图像看起来很糟糕,它周围有一个蓝色的边框....记住:这是完全相同的图片,大小等....
...or am I missing something?

Setup:

- I''ve created an empty Winforms project, and added two buttons A and B.
- Button A''s Image property is set to point to a imagefile calles
"users.png"
- Added an imagelist and added the SAME image to this list, setting the
properties (size etc.) exactly the same as for A''s Image property.
- Set button B''s ImageList property to the new imagelist created, and it''s
imageindex to 0.

The picture now shows on both buttons, but while Button A''s image looks
great, Button B''s image looks awful, with a blue border around
it....remember: It is the exact same picture, size, etc....




这是一个ImageList控件的问题。图像列表仅在设计时使用时才支持
位图。然而,我没有得到它

在运行时添加图像(蓝色变为黑色)。


还有一些其他线程这个问题,也许你会发现

有用的东西:


< http://www.google.com/groups?q = dotnet + imagelist +透明度+ png>


-

Herfried K. Wagner [MVP]

< http:// www。 mvps.org/dotnet>



That''s an issue with the ImageList control. The imagelist will support
bitmaps only when used at design time. Nevertheless, I didn''t get it
work with adding the images at runtime (the blue changes to black).

There were some other threads on this issue, maybe you will find
something useful there:

<http://www.google.com/groups?q=dotnet+imagelist+transparency+png>

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>


" Herfried K. Wagner [MVP]" <喜*************** @ gmx.at> schrieb
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> schrieb

在这个问题上还有其他一些主题,也许你会发现
有用的东西:

< http:// www。 google.com/groups?q=dotnet+imagelist+transparency+png>

There were some other threads on this issue, maybe you will find
something useful there:

<http://www.google.com/groups?q=dotnet+imagelist+transparency+png>




如果我一直非常聪明地先问google,那么它本可以节省我5个左右

小时....; - ((

-

Armin



If I had been so clever to ask google first, it would have saved me about 5
hours.... ;-((
--
Armin


这篇关于ImageList:这是一个错误......?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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