LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Representation of chemical symbols

Solved!
Go to solution

Hello, hello,

I'd like to show full chemical symbols in the user interface, exactly like this:

 

As far as I know there is no subscript/superscript for text in CVI, so it'd have to be done either:

  • graphically in a canvas, with 4 CanvasDrawText(), and then possibly converted to a BitMap for reuse.
  • directly in the UIR with 4 Text Message controls.
  • Just use ugly text like Mg12:24+2 but the chemists will weep.

Any other idea ?

Thanks

0 Kudos
Message 1 of 4
(853 Views)

Hi,

 

the idea of subscript/superscript in UI text is under consideration for 12 years now 🙄, and with the unofficial end of the product is not likely to be realized.... I used the second approach with several text message controls which is more effort but looks reasonable

 

0 Kudos
Message 2 of 4
(847 Views)

Yeah, I'd seen your idea suggestion, but unless HTML gets folded into CVI, I don't see how they could get it in ! No small feat, without even considering the Damocles sword hanging above CVI.

I need the chemical symbols on graphs and in tables, so I'll try the canvas/bitmap/image approach.

0 Kudos
Message 3 of 4
(845 Views)
Solution
Accepted by topic author gdargaud

I've coded a small(ish) function to create a bitmap of a chemical element symbol, with options. It's available at https://gitlab.com/dargaud/ElementBitmap

 

0 Kudos
Message 4 of 4
(764 Views)