如何在PictureBox中设置右对齐? [英] How to set Right alignment in PictureBox ?

查看:250
本文介绍了如何在PictureBox中设置右对齐?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

实际上我在VB.NET Windows Project中使用PictureBox并希望使用alignment作为右侧。那么如何设置PictureBox的对齐方式或任何其他方式。你能建议如何设置右对齐吗?





我这样粘贴。为了更好的理解,你可以看到为了更好的理解

https://plus.google.com/u/0/photos/108389872244532321380/albums/6072267770949145121/6072267774455009666?pid=6072267774455009666&oid=108389872244532321380

Actually I am using PictureBox in VB.NET Windows Project and want to using alignment as Right side . So How to Set alignment of PictureBox or any other way . Can you advice how to set Right alignment ?


I paste like here . you can see as visualy for better understanding
https://plus.google.com/u/0/photos/108389872244532321380/albums/6072267770949145121/6072267774455009666?pid=6072267774455009666&oid=108389872244532321380

推荐答案

首先,不要使用图片框:如果你这样做,那么你负责编写文本 - 包括你准确指定文本的去向。

使用基于文本的控件(如标签或文本框)可能会更好。



如果必须使用图片框,那么当您编写文本时,您使用的是 Graphics.DrawString [ ^ ]方法,它有重载,允许你指定矩形和文本对齐。
First off, don't use a picture box: if you do, then you are responsible for writing the text - and that includes you specifying exactly where the text should go.
You would probably be better off with a text based control such as a label or textbox.

If you must use a picturebox, then when you write the text you use the Graphics.DrawString[^] method, which has overloads allowing you to specify the rectange and text alignment.


这篇关于如何在PictureBox中设置右对齐?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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