Underline in a datagrid

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
lohill
Posts: 770
Joined: Tue Dec 08, 2009 6:37 pm

Underline in a datagrid

Post by lohill » Thu Oct 08, 2015 11:38 pm

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

Klaus
Posts: 14199
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Underline in a datagrid

Post by Klaus » Mon Oct 12, 2015 12:46 pm

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! :D


Best

Klaus

lohill
Posts: 770
Joined: Tue Dec 08, 2009 6:37 pm

Re: Underline in a datagrid

Post by lohill » Mon Oct 12, 2015 10:13 pm

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

Klaus
Posts: 14199
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Underline in a datagrid

Post by Klaus » Mon Oct 12, 2015 10:24 pm

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? 8)


Best

Klaus

lohill
Posts: 770
Joined: Tue Dec 08, 2009 6:37 pm

Re: Underline in a datagrid

Post by lohill » Tue Oct 20, 2015 12:35 am

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

Post Reply