客户地址对于 POS 收据而言太大
我使用这条线将客户地址添加到我的 POS 收据中:
graphics.DrawString(
"Address: " + _selectedCustomer.address,
new Font("Calibri", 8),
new SolidBrush(Color.Black),
startX + 15,
startY + Offset
);
但问题是客户地址对于我的收据来说太大了(35 到 40 个字符)。 我需要根据客户地址的长度将字符串换行为 2 或 3 行。
I'm using this line to add customer address to my POS receipt:
graphics.DrawString(
"Address: " + _selectedCustomer.address,
new Font("Calibri", 8),
new SolidBrush(Color.Black),
startX + 15,
startY + Offset
);
but the problem is customer address is way too big for my receipt ( 35 to 40 char).
I need to make the string wrap in 2 or 3 lines based on the length of the customer address.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论