Is there a way to show superscript or subscript numbers on a form or in dropdowns ?
I thought I had been able to do this years ago, but I have forgotten the trick.
Anyone remember how to do this ?
~ Beverly
Yes, use the numtoascii() function and concatenate to your string
Example:
"The volume of the sphere is 100cm" + numtoascii(179)
would display a superscript 3 after the "100cm"
For a fill listing of the decimal representation of ACSII codes, check out this website:
Thank you !
Can these appear in radio buttons or concatenated to display in a dropdown listbox ?
~ Beverly
Yes, but you may need to use a dynamic label and reference a function that builds the list of values. I'll build a quick form that demonstrates this and post it here shortly.
Here is an example form demonstrating the technique for getting special characters in a radio button list or dropdown list. I've attached the .DLG file below. Note that you have to get clever with the radio button list because it does not support dynamic values. You also have to get creative with the layout of your controls in order for it to look nice (note that I have used dynamically populated text controls to be the radio button option labels and have hidden the actual radio button options by adjusting the control's handlebars to hide the option text. This is way easier to do in HTML by the way. 🙂 I had forgotten how crappy laying out forms in VFE can be.
Pics of the form and code below. It would be more efficient to create a hidden variable on the form to keep track of whether or not the dynamic list options had been initialized, but this is a quick and dirty example. Basically the watcher expression will populate the dropdown list and the radio button option labels every time the form is opened and/or the value of the radio button control is changed.
Here is the .DLG file if you want to import it:
Thank you for the example - this is exactly what I needed to know. Nice sample 🙂
- Beverly
u r welcome 🙂