Grid TextColor

Discussion forum about all things Team Developer 7.x
Helmut Mayerhofer
Austria
Posts: 3
Joined: 02 Dec 2019, 23:09
Location: Austria

Grid TextColor

Post by Helmut Mayerhofer » 03 Dec 2019, 02:02

TD 7.2 Grid /Textcolor: Three different colors are obviously relevant in the grid: the background color, the text color of an editable field, and the text color of a non-editable field. The first two can be altered with Attribut Inspector or the commands SalGridBackColorSet and SalGridTextColorSet.
But not the text color of the non-editable cells. This depends on the Theme used, and is very bright in most Theme's and therefore useless! Also not changeable data are important to read otherwise we would not show them at all. In statistics, our customers work exclusively with tables that can not be changed!
Is there a way to set the text color of the non-editable cells / columns to dark black, or dark blue? (Without creating our own XML theme/skin) ?

****
Is there a easy way to make Grid cells "Read Only"? That would be an even better option, so customers can also copy out data from cells they can not change. (This also works perfect for data fields!) That might also solve the upper requirement...

Thanks!
Helmut

Dave Rabelink
Founder/Site Admin
Founder/Site Admin
Netherlands
Posts: 2912
Joined: 24 Feb 2017, 09:12
Location: Gouda, The Netherlands

Re: Grid TextColor

Post by Dave Rabelink » 12 Dec 2019, 09:06

Use SalTblSetColumnFlags to set the column Read Only.

Here a sample:

Grid_ColumnReadOnly.zip
You do not have the required permissions to view the files attached to this post.
Regards,
Dave Rabelink

Image
Articles and information on Team Developer Tips & Tricks Wiki
Download samples, documents and resources from TD Sample Vault
Videos on TDWiki YouTube Channel

Helmut Mayerhofer
Austria
Posts: 3
Joined: 02 Dec 2019, 23:09
Location: Austria

Re: Grid TextColor

Post by Helmut Mayerhofer » 28 Dec 2019, 14:36

Thank you for sample!

The readonly flag inhibits nearly all keyboard actions. Nearly because:
Its possible to delete the contents, and also to paste a new value. I found no way blocking that key actions (WM_KEYUP, WM_KEYDOWN). Any ideas?

Thanks, Helmut

Return to “General Discussion”

Who is online

Users browsing this forum: [Ccbot] and 0 guests