07-03-2019 12:54 PM
Hi everybody:
I'm working with Multicolum TextBox; one column contain JSON text, the text normally is bigger than column size.
when I move the mouse pointer over the column, all JSON data is showed (yellow box) in single row, but I would like to change the format of the JSON to multirow:
from:
{"event_id":2, "event_desc":"static", "event_type_id_ref":5, "key":10, "key_name":"STATIC_MAPING", "active_map":7, "triggered_by":18}
to:
{
"event_id":2,
"event_desc":"static",
"event_type_id_ref":5,
"key":10,
"key_name":"STATIC_MAPING",
"active_map":7,
"triggered_by":18
}
If move mouse over the cell, now I can change the format of the JSON (to multi-row) and replace the Listbox "TipStrip", but only display the new format if the mouse is right on the Cell line, not in the center of the cell, in this case is displaying the original Cell Data (one row).
I thing is showing the formatted data because I'm putting the mouse not in an specific cell, but inside of the MC List, so, is showing the last TipStrip I updated.
is anyway to Disable the Cell "display"? so, the MC List will display the latest TipStrip (maybe, not sure).
or any other Ideas?
I need to do this becase the new format is easier to see the values for every variable.
Thank you.
please see attached VI. and pictures.
07-03-2019 01:37 PM
What you're seeing isn't really a TipStrip, so code that plays with the TipStrip wouldn't have any effect.
Perhaps your best course of action would be to reformat the data before putting it into the MCLB.
07-03-2019 02:26 PM
actually, the TipStrip is saving the data on ListBox TipStrip, but it is very difficult to show that data because most of the times the Mouse pointer is over the Cell, so the cell is showing the original data.
I tried to format the data before saving on cell, but after that, the normal view for the cell is just "{", the data is there, but it is multi row, so can't see the rest, if the Mouse pointer is in cell, the formatted display is displayed, but in normal conditions can't see anything , except for the first row: "{".
07-05-2019 08:15 AM
You could capture mouse-move events, reformat the data in the cell when the mouse moves over it, then restore it to normal when the mouse moves away.
If you're doing this for multiple controls, you may want to think about making an XControl.
It's very kludgy, but it's the only thing I can think of.