Showing the TradeMark symbol

This Q&A forum allows users to post and respond to "How Do I Do ....." questions. Please do not use to report (suspected) errors - you must use your regional help desk for this. The information contained in this forum has not been validated by LANSA and, as such, LANSA cannot guarantee the accuracy of the information.
Post Reply
caseywhite
Posts: 192
Joined: Thu May 26, 2016 1:17 am

Showing the TradeMark symbol

Post by caseywhite »

There is data stored in the database that currently uses ™ because a web event function is showing the data. In VL web instead of showing ™ (Alt-0153) it shows ™. Is there a way for me to replace ™ with the TM symbol using some intrinsic function?
LANSAGuru
Posts: 69
Joined: Thu Mar 24, 2016 5:31 am

Re: Showing the TradeMark symbol

Post by LANSAGuru »

So the deal is you are attempting (I assume) to put html markup into a label. Raw html markup itself needs to be included as raw html markup. For instance ™ is NOT the trademark symbol. Instead it is the html markup for the trade symbol

So you need to use the html container control. It is like a label, except you can put any html markup you want inside of it.

e.g.

Begin_Com Role(*EXTENDS #PRIM_WEB)
Define_Com Class(#PRIM_LABL) Name(#Label1) Caption('Label1') Displayposition(1) Ellipses(Word) Height(25) Left(119) Parent(#COM_OWNER) Tabposition(1) Tabstop(False) Top(67) Verticalalignment(Center) Width(120)
Define_Com Class(#PRIM_WEB.HtmlContainer) Name(#Html1) Description('Html Container') Displayposition(2) Height(28) Left(120) Parent(#COM_OWNER) Tabposition(2) Tabstop(False) Top(125) Width(150)

Evtroutine Handling(#Com_owner.Initialize)
#Label1 := '™'
#Html1 := '™'
Endroutine

End_Com
caseywhite
Posts: 192
Joined: Thu May 26, 2016 1:17 am

Re: Showing the TradeMark symbol

Post by caseywhite »

Not quite. I just want to show the TM symbol. I don't want to use HTML. I am assuming like in VB I can use some Chr$ function or something like that to show a TM. So if I detect ™ in the database field I am going to show the TM symbol. The user is telling me they can't get the TM symbol to type or paste into a file.
MarkD
Posts: 692
Joined: Wed Dec 02, 2015 9:56 am

Re: Showing the TradeMark symbol

Post by MarkD »

As in http://www.fileformat.info/info/unicode ... /index.htm ?

Try #MyLabel := (8482).AsUnicodeString
caseywhite
Posts: 192
Joined: Thu May 26, 2016 1:17 am

Re: Showing the TradeMark symbol

Post by caseywhite »

That is exactly what I was looking for. Thanks a lot. Works perfectly.
LANSAGuru
Posts: 69
Joined: Thu Mar 24, 2016 5:31 am

Re: Showing the TradeMark symbol

Post by LANSAGuru »

Some caveats.

This only works if the target field is Unicode (server module side) which you say is where you are getting the value from.
It only works if you are scanning all values for predefined html entities and hard coding the results.
If you have many of these (different types of html entities) because they are coming form a content management system, this would not work as you would need to write a substitution for every one of them.

If this is a one off this works fine. The point was, if you are just jamming it into a label AND it is ALREADY in html form, you can simply use the html container which is at the end of the day, just a label as well. This will work for any html content embedded inside of a file.

If you simply want to put a trademark simple on a page in a label in VL Web you could simply assign the value to a label.

e.g. (the trade mark symbol font size is increased here for emphasis so you can see it is the actual TM symbol)

#MyLabel := '™'
instead of
#MyLabel := (8482).AsUnicodeString
Post Reply