Empty text item possible?

General TRichView support forum. Please post your questions here
Post Reply
jgkoehn
Posts: 303
Joined: Thu Feb 20, 2020 9:32 pm

Empty text item possible?

Post by jgkoehn »

I am in need of a text item that has a tag but has no text is this possible?
I would rather not use Zero Width Space etc.
Sergey Tkachenko
Site Admin
Posts: 17553
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: Empty text item possible?

Post by Sergey Tkachenko »

It is possible to add it in code. But on editing, it may be removed.
You can try using a text style having EmptyWidth = 1.
jgkoehn
Posts: 303
Joined: Thu Feb 20, 2020 9:32 pm

Re: Empty text item possible?

Post by jgkoehn »

I assume by editing, if a user types, but not if the editing is done via code? This is mainly a display with out user editing.
Sergey Tkachenko
Site Admin
Posts: 17553
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: Empty text item possible?

Post by Sergey Tkachenko »

It may be removed only:
- when the user edits this paragraph (it includes calling editing methods that modify this paragraph).
- when inserting this content in another document.
Otherwise, it's ok to use empty text item.
Another solution is using hidden items.
jgkoehn
Posts: 303
Joined: Thu Feb 20, 2020 9:32 pm

Re: Empty text item possible?

Post by jgkoehn »

Can hidden items interact with a mouse hover? I suppose an empty item wouldn't either hmms.
Sergey Tkachenko
Site Admin
Posts: 17553
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: Empty text item possible?

Post by Sergey Tkachenko »

But empty text items cannot interact with a mouse pointer as well, because they have zero size.
Visibility of hidden items can be switched on and off.
Post Reply