Grid Cell Colors

HMG Samples and Enhancements

Moderator: Rathinagiri

Post Reply
Jim
Posts: 2
Joined: Fri Nov 11, 2016 1:40 pm

Grid Cell Colors

Post by Jim »

When a cell in a Grid is brought into focus (either by clicking on it or hovering over it) the entire row is grayed. Does anyone know how to turn off this feature so that ONLY the clicked on cell is high lighted? I would also like to be able to dynamically highlight both the the entire ROW and entire COLUMN while leaving the rest of the grid unchanged.
User avatar
mol
Posts: 3720
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

Re: Grid Cell Colors

Post by mol »

Hi!
try with this sample code (you need to change colors to your dependencies):

Code: Select all

	CellNavigationColor ( _SELECTEDROW_FORECOLOR, {255,255,255} )
	CellNavigationColor ( _SELECTEDROW_BACKCOLOR, {0,196,255} )
	CellNavigationColor ( _SELECTEDCELL_BACKCOLOR, {0,0,128} )
	CellNavigationColor ( _SELECTEDROW_DISPLAYCOLOR, .t. )
You must set grid to cell navigation
Jim
Posts: 2
Joined: Fri Nov 11, 2016 1:40 pm

Re: Grid Cell Colors

Post by Jim »

No! I want to do two things.
The first is to turn off any color change to the row, just changing the color of the single cell in focus or clicked on. I know the CellNavigationColor() can change the row color. But is there a way to turn this feature completely off when I click on a cell? I could fake it by using the CellNavigationColor() function to change the standard default color the row is turned to when a cell is clicked but all my cells in a given row are not the same color when the program starts.
The second thing is to have the ability to change the color not only in the row but also in the entire column of the cell clicked on. I think this would be easily done if I could disable the row color change first.
If I can't find a way to disable the color change in the row when the cell is clicked, then I will have to completely rethink my approach to my program.
User avatar
serge_girard
Posts: 3164
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

Re: Grid Cell Colors

Post by serge_girard »

Hi Jim,

Welcome from Belgium!

Serge
There's nothing you can do that can't be done...
User avatar
andyglezl
Posts: 1461
Joined: Fri Oct 26, 2012 7:58 pm
Location: Guadalajara Jalisco, MX
Contact:

Re: Grid Cell Colors

Post by andyglezl »

Hola, Quizà esto te ayude...
----------------------------------
Hi, Maybe this will help ...

\HMG\3.4.3\SAMPLES\Controls\Grid\Grid_Dynamic_Font
Andrés González López
Desde Guadalajara, Jalisco. México.
User avatar
serge_girard
Posts: 3164
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

Re: Grid Cell Colors

Post by serge_girard »

Anybody can help new-comer Jim with his question?

Serge
There's nothing you can do that can't be done...
User avatar
andyglezl
Posts: 1461
Joined: Fri Oct 26, 2012 7:58 pm
Location: Guadalajara Jalisco, MX
Contact:

Re: Grid Cell Colors

Post by andyglezl »

No te sirvio el ejemplo anterior ???
----------------------------------------------
Did not serve you the previous example ???



puedes poner un ejemplo de como lo estas haciendo...
---------------------------------------------------------------------------------
you can give an example of how you are doing ...
Andrés González López
Desde Guadalajara, Jalisco. México.
Post Reply