选项卡页标题图像在右侧 [英] Tab Page Header Image On The Right

查看:99
本文介绍了选项卡页标题图像在右侧的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要在我的标签页上添加一个关闭按钮..所以我将图像添加到标签页..并在鼠标按下事件中检查其位置以关闭标签页..

但是图像显示在选项卡页眉的左侧..我如何将其移至右侧????

I need to add a close button on my tabpages.. so i add image to the tabpage..and check its position in the mouse down event for closing the tabpage..

but the image appears on the left side of tabpage header.. how can i move it to the right????

推荐答案



有一种方法可以将图像向右移动.您必须添加选项卡页面的绘画事件
并获取图形指针. http://msdn.microsoft.com/en-us/library/system.windows.forms.control.onpaint.aspx [ ^ ]

Hi,

There is a way to move the image to the right. You have to add Paint Event of tab page
and get the graphics pointer. http://msdn.microsoft.com/en-us/library/system.windows.forms.control.onpaint.aspx[^]

Graphics g = e.Graphics.
g.DrawImage(TestImage, new Rectangle(xDraw, yDraw, TestImageWidth,
TestImageHeight));



xDraw和yDraw将使您向右移动图像的偏移量.

亲切的问候,



xDraw, and yDraw will get you the offset to move the image to the right.

Kind regards,


这篇关于选项卡页标题图像在右侧的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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