Welcome Guest! You need to login or register to make posts.

Notification

Icon
Error

Options
Go to last post Go to first unread
NjnNhan  
#1 Posted : Friday, March 30, 2018 7:25:18 PM(UTC)
NjnNhan

Rank: Newbie

Groups: Member
Joined: 3/6/2018(UTC)
Posts: 1

Can I use Graphics DrawText to draw whitespace at start and end of the string?
I have tried to draw with space Unicode, ASCII or normal character but not work.
Please help me find the way to do that.
Many thanks.
Julia Khoptyan  
#2 Posted : Monday, April 2, 2018 3:11:09 AM(UTC)
Julia Khoptyan

Rank: Member

Groups: Member, Administration, Moderator
Joined: 8/19/2016(UTC)
Posts: 27

Was thanked: 1 time(s) in 1 post(s)
Hey NjnNhan,

The DrawText method handles a white-space at the beginning of your string as is. However, text wrapping works so that white-spaces will be ignored at the end if you divide your text into a few strings.

Perhaps, you need to use non-breaking spaces in Unicode (https://www.compart.com/en/unicode/U+00A0). What is your use-case?

If this approach doesn't work, please provide me with a code sample representing your problem.

Regards,
Julia
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.