Page 1 of 1
Underline in a datagrid
Posted: Thu Oct 08, 2015 11:38 pm
by lohill
Has anyone else had problems with turning on the text formatting for underline in datagrid cells and then not been able to turn it off? Formatting for bold and italic seem to work fine but once the formatting is changed to underline it will not revert back to plain. I can get bold with no underline but I do not want bold. This is in both 7.0.6 and 7.1.0. This may be a bug that I will report if others have seen this too.
Larry
Re: Underline in a datagrid
Posted: Mon Oct 12, 2015 12:46 pm
by Klaus
Hi Larry,
sometimes a field "refuses" to stick with its set textfont property.
In that case try this:
...
set the textstyle of char 1 to -1 of fld "xyz" to "plain"
...
At least worth a try!
Best
Klaus
Re: Underline in a datagrid
Posted: Mon Oct 12, 2015 10:13 pm
by lohill
Thanks Klaus,
It worked like a charm. Since it was for a datagrid I had to put it into the FillInData script and changed the wording to:
Code: Select all
set the textstyle of char 1 to -1 of me to "plain"
Why is it so common to have to find a workaround while doing something in LIveCode? It is the most frustrating part of working in the language for me.
Regards,
Larry
Re: Underline in a datagrid
Posted: Mon Oct 12, 2015 10:24 pm
by Klaus
Hi Larry,
glad I could help!
lohill wrote:Why is it so common to have to find a workaround while doing something in LIveCode?
This is a rhetorical question, isn't it?
Best
Klaus
Re: Underline in a datagrid
Posted: Tue Oct 20, 2015 12:35 am
by lohill
One last note: After having set the textstyle to plain in the FillInData script and getting the underlines removed from the dataGrid, I made the assumption that the code could be removed from FillInData. That was not the case however and the next time the grid was filled the underlines reappeared. So the code had to be put back and will forever be a part of that datagrid's overhead.
Larry