Jump to content
Sign in to follow this  
Vanar

Non-breaking spaces in TListItemText (iOS)

Recommended Posts

I have a problem with wrapping a line with non-breaking spaces in TListItemText.
The wrapping ignores non-breaking spaces.

 

For example,

Var Te: TListItemText;
      AItem: TListViewItem;
...
Te                    := TListItemText.Create(AItem);
Te.Text             := "******************** Received 1 000 bonuses"; // There is a non-breaking space between "1" and "000"
Te.Width          := 120;
Te.height         := 20;
Te.WordWrap := True;
...

I want to get:
"******************** Received
1 000 bonuses",

but I get what is shown in the picture.

543853615_non-breakingspace.png.8468f468af47deb3921d2b04e7ce5350.png
"******************** Received 1 
000 bonuses".

Is it possible?

Edited by Vanar

Share this post


Link to post

Not sure, but have you tried this:
 

ListItemText.Text := 'This is a non-breaking space:' + #$00A0 + 'here.';

 

Share this post


Link to post

Clarification (I probably didn't write it precisely enough):

 

Under Windows, all variants
1. ListItemText.Text := 'This is a non-breaking space:' + #$00A0 + 'here.';
2. ListItemText.Text := 'This is a non-breaking space:' + #160 + 'here.';
3. ListItemText.Text := 'This is a non-breaking space: here.';
work fine

 

The problem occurs in iOS
(I haven't tried it under Android, but they say it works)

 

My task is to implement it for iOS

Edited by Vanar

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×