Forecolor in grid displays the records alternating color
Moderator: Rathinagiri
- Rathinagiri
- Posts: 5482
- Joined: Tue Jul 29, 2008 6:30 pm
- DBs Used: MariaDB, SQLite, SQLCipher and MySQL
- Location: Sivakasi, India
- Contact:
Re: Forecolor in grid displays the records alternating color
The DynamicBackColor in third column of the browser, expects a block which returns an array of color codes. You have given block which returns again a block instead of an array of color codes. ie., you have nested two blocks which is an error here.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
South or North HMG is worth.
...the possibilities are endless.
- Czarny_Pijar
- Posts: 172
- Joined: Thu Mar 18, 2010 11:31 pm
- Location: 19.2341 E 50.2267 N
Re: Forecolor in grid displays the records alternating color
I think that is an important example, and it should be placed in the Samples.rathinagiri wrote:Code: Select all
DYNAMICBACKCOLOR { bckColor, bckColor, { || If( g_existotal < 0, { 255, 0, 0 }, If( RecNo() % 2 == 0, { 255,255,255 } , { 244,244,244 } ) ) } } ; DYNAMICFORECOLOR { bckFore , bckFore , { || If( g_existotal < 0, { 255, 255, 255 }, {0,0,0} ) } } ;
How about a missing Grid.13 ?
Re: Forecolor in grid displays the records alternating color
Hi,
Thanks for explanation Rathinagiri, now I understand.
Best Regards
Javier
Thanks for explanation Rathinagiri, now I understand.
Best Regards
Javier
- nguyenchiduc
- Posts: 78
- Joined: Sat Nov 13, 2010 7:27 am
Re: Forecolor in grid displays the records alternating color
Use the color will be very helpful when sorting objects according to the work. Combined with the COMBOBOX would be great.
I recently switched to HMG, the characteristics of the BROWSE and GRID very helpful
<Screen Shots were removed because URLs not active anymore>
I recently switched to HMG, the characteristics of the BROWSE and GRID very helpful
Code: Select all
/* DYNAMICFORECOLOR */
PRIVATE mau_chu := { || if ( alltrim(khongma_tho->xu_ly) == 'YES' .OR. alltrim(khongma_tho->ma) == 'OK', {255,255,255}, if ( alltrim(khongma_tho->xu_ly) == 'XOA' , {255,255,255}, if ( alltrim(khongma_tho->xu_ly) == 'LAP_MA' , {0,0,255}, if ( alltrim(khongma_tho->xu_ly) == 'D_HANH' , {255,0,0},{0,0,0})))) }
/* DYNAMICBACKCOLOR */
PRIVATE mau_nen := { || if ( alltrim(khongma_tho->xu_ly) == 'YES' , {0,0,255}, if ( alltrim(khongma_tho->xu_ly) == 'XOA' , {0,0,0},if ( alltrim(khongma_tho->ma) == 'OK',{255,0,0},{255,255,255} ))) }Re: Forecolor in grid displays the records alternating color
Yes HMG is a great software tool 
Your screenshots are also fantastic
Well done friend
Your screenshots are also fantastic
Well done friend
With best regards,
Sudip
Sudip
- nguyenchiduc
- Posts: 78
- Joined: Sat Nov 13, 2010 7:27 am
Re: Forecolor in grid displays the records alternating color
thank you!sudip wrote:Yes HMG is a great software tool
Your screenshots are also fantastic
Well done friend
I do not want fancy, showy, but I have to analyze data with many tables at once. With a table has thousands of records and the key (customer, number, object ...). Colors will help me to quickly sort and limit mistakes.
Use the command:
SET FILTER TO something...
combined with DYNAMICFORECOLOR and DYNAMICBACKCOLOR in GRID will help me in analyzing data
- Pablo César
- Posts: 4059
- Joined: Wed Sep 08, 2010 1:18 pm
- Location: Curitiba - Brasil
Re: Forecolor in grid displays the records alternating color
I made some corrections, some are for Grid propose and others which have not working.Czarny_Pijar wrote:I think that is an important example, and it should be placed in the Samples.rathinagiri wrote:Hi Javier,jparada wrote:Hi,
After getting that negative numbers are deployed with the color red (Thanks again Roberto).
Now I also like to do the same with DynamicBackColor property, and I try to do exactly as I do with the property DynamicForeColor, but I could not do it.
I attached image about the error that I am getting, please take a look, and also attach a small example, please take a look too.
Please can someone tell me how to fix it?
Thanks
Best Regards
Javier
Change the two lines (33,34) with this...Code: Select all
DYNAMICBACKCOLOR { bckColor, bckColor, { || If( g_existotal < 0, { 255, 0, 0 }, If( RecNo() % 2 == 0, { 255,255,255 } , { 244,244,244 } ) ) } } ; DYNAMICFORECOLOR { bckFore , bckFore , { || If( g_existotal < 0, { 255, 255, 255 }, {0,0,0} ) } } ;
How about a missing Grid.13 ?
I hope you enjoy it !
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
-
Javier Tovar
- Posts: 1275
- Joined: Tue Sep 03, 2013 4:22 am
- Location: Tecámac, México
Re: Forecolor in grid displays the records alternating color
Excelente Pablo César,
Saludos
Saludos
- Pablo César
- Posts: 4059
- Joined: Wed Sep 08, 2010 1:18 pm
- Location: Curitiba - Brasil
Forecolor in grid displays the records alternating color
Thank you Javier, for your kind words.
Reserved merits to Javier Parada
Reserved merits to Javier Parada
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
-
EduardoLuis
- Posts: 684
- Joined: Tue Jun 04, 2013 6:33 pm
- Location: Argentina
Re: Forecolor in grid displays the records alternating color
Hi Pablo:
As allways your contributions are exellent.-
Thanks for share with all of us.-
With regards. Eduardo
As allways your contributions are exellent.-
Thanks for share with all of us.-
With regards. Eduardo