TRibbon大图像问题
我正在 Delphi 2010 中编写一个应用程序,并第一次尝试新的 TRibbon 控件。
一切正常,但我有一个小问题:
我在分配给我的 TActionManager 控件的 TImageList 中添加了一个 64x64 位图。 然后,我将 Action 添加到 TRibbon 中的组中,并从 TImageList 设置大图像。图像显示但未正确居中,而是显示为一半,我在其中查看文本“操作”,而不是在下面。
我该如何解决这个问题?我是这个社区的新手,我尝试上传屏幕截图,但不明白要这样做。
非常感谢。
丹尼.
更新
您好,我已经完成了您所说的所有操作,并且是正确的;我有 64x64 像素的图像。尝试也许我已经明白问题出在哪里。 不久,在动作管理器中,如果我将样式设置为“默认平台”或“标准”或“XP 样式”,我会正确看到图像。但是当我运行应用程序时,它会返回到“Ribbon - Luna”并将图像截断为一半。 我尝试在运行时执行此操作,但没有成功,他设置了每个“Ribbon - Luna”。是一个错误吗?或者我弄错了什么?我看到在样式中的功能区控件中,我只能选择值:“功能区 - Luna”或“功能区 - 黑曜石”或“功能区 - 银”,而不是其他。 我尝试使用工具栏控件,如果我将“Ribbon - Luna”设置为样式,我会遇到与功能区控件相同的问题;如果我设置“默认平台”或“标准”或“XP 样式”,则一切正常。 所以我认为问题不在于功能区控件或工具栏控件,而在于actionmanager控件;但不理解为解决它,我试图研究它,但没有解决:(可以帮助我更好吗?我希望这些信息可以帮助你更多地解决我的问题。非常感谢你。
I am writing an Application in Delphi 2010 and trying the new TRibbon control for the first time.
All works fine, however I have a small problem:
I have added a 64x64 Bitmap in a TImageList which is assigned to my TActionManager control.
I have then added my Action to a group in the TRibbon, and set the large image from my TImageList. The Image displays but is not centered correctly, instead it is displayed to half and i look text "Action" in it, not under.
How can I solve this problem? I am new on this community, i have tried to upload screenshot but not understood as to do it.
Thanks very much.
Danny.
UPDATE
Hello i have done all that you told, and is correct; i have images 64x64 pixel. Trying maybe i have understood where is problem.
Shortly, in actionmanager if i set as style "Default platform" or "Standard" or "XP Style" i see images correctly. But when i run application it turn back to "Ribbon - Luna" and truncate image to half.
I have tried to do it to runtime but nothing, he set every "Ribbon - Luna". Is a bug? Or i mistake something? I have saw that in ribbon control in style i can choose only value as: "Ribbon - Luna" or "Ribbon - Obsidian" or "Ribbon - Silver" and not other.
I have tried to use the toolbar control, and if i set "Ribbon - Luna" as style i have same problem that in ribbon control; if i set "Default platform" or "Standard" or "XP Style" all work correctly.
So i have thinked that problem not is in ribbon control or in toolbar control, but in actionmanager control; but not understood as solve it, i have tried to study on it, but not solved :( Can help me better? I hope that this info can to help you more to solve mine problem. Thanks you very much.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在使用“添加”操作读入图像之前,请确保将图像列表设置为宽度 = 64 和高度 = 64。现在使用此图像列表的任何菜单都应该可以正常显示 64x64 图像。如果没有,那么您可能正在加载具有多种图像尺寸的图标,这可能就是问题所在。通过下载 GIMP 检查您正在加载的图像,然后打开它来检查(并在必要时删除)其他尺寸的不需要的图层。
Ensure that you have the image list set to Width = 64 and Height = 64 BEFORE you use the 'Add' operation to read in your image. Any menu that now uses this image list should show your 64x64 image fine. If it doesnt, then you may be loading an icon which has multiple image sizes and this may be the problem. Check the image you are loading by downloading GIMP and open it to check (and if necessary delete) unwanted layers of other sizes.
功能区控件旨在接受 32 x 32 的大图像,64 x 64 太大。尝试使用较小的图像(并确保图像列表具有相同的尺寸)。
氮@
The ribbon control is designed to accept large images that are 32 x 32, 64 x 64 is too large. Try using smaller images (and making sure the imagelist has the same dimensions).
N@