C#字体缩放固定宽度??? [英] C# Font Scaling in a fixed width???

查看:82
本文介绍了C#字体缩放固定宽度???的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道是否有人可以帮助我。我试图将文本添加到固定宽度。比如说label1.MaximumSize = new大小(0,30);

label1.text = textbox1.text

当标签变满时我希望文本开始挤压在一起不只是切断了。我一直在玩字符串格式ECT。但似乎无法弄明白。有没有办法让标签或抽绳执行这种功能???

Hi, I was wondering if anyone could help me. I?m trying to add text into a fixed width. Say label1.MaximumSize = new Size(0, 30);
label1.text=textbox1.text
When the label gets full I want the text to start squeezing together and not just cut off. I keep playing with string formats ECT. But just can?t seem to figure it out. Is there a way to have a label or drawstring perform this kind of function???

推荐答案


我想知道是否有人可以帮助我。我试图将文本添加到固定宽度。比如说label1.MaximumSize = new大小(0,30);

label1.text = textbox1.text

当标签变满时我希望文本开始挤压在一起不只是切断了。我一直在玩字符串格式ECT。但似乎无法弄明白。有没有办法让标签或抽绳执行这种功能???
Hi, I was wondering if anyone could help me. I?m trying to add text into a fixed width. Say label1.MaximumSize = new Size(0, 30);
label1.text=textbox1.text
When the label gets full I want the text to start squeezing together and not just cut off. I keep playing with string formats ECT. But just can?t seem to figure it out. Is there a way to have a label or drawstring perform this kind of function???



这里是我的一个函数中的一些代码,它将文本标记放到jpg图形上。它的工作方式与您的需求略有不同,因为我将标签扩展到固定大小的所有文本所需的空间。您希望减少字体以匹配固定空间。

Here''s some code from one of my functions that puts a text tag onto a jpg graphic. It works a little different from your need, as I extend the label to space required by all the text at a fixed size. You want to reduce the font to match a fixed space.

展开 | 选择 | Wrap | 行号


您好,感谢您的回复。我现在正在使用类似的东西。
Hi, thanks for the reply. Im using somthing like that now.
展开 | 选择 | Wrap | 行号



您好,谢谢答复。我现在正在使用类似的东西。
Hi, thanks for the reply. Im using somthing like that now.
展开 | 选择 | Wrap | 行号


这篇关于C#字体缩放固定宽度???的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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