Topic: Color coding panels
Hi all,
I was trying to add color coding feature to panels using EHW script but couldn't make it work. Could anybody help please.
Sample project attached:
God... please help me become the person my dog thinks I am.
My Visual Database → General → Color coding panels
Hi all,
I was trying to add color coding feature to panels using EHW script but couldn't make it work. Could anybody help please.
Sample project attached:
Adam,
In your SETTINGS table you have multiple records. You are checking for colors in record id of 1, but record id of 1 does not exist. I changed the record id 2 to 1 and this corrected it. But since all panel colors did not have values, it was causing an error. I put an IFNULL in your SQL statement to get around this error.
Adam,
In your SETTINGS table you have multiple records. You are checking for colors in record id of 1, but record id of 1 does not exist. I changed the record id 2 to 1 and this corrected it. But since all panel colors did not have values, it was causing an error. I put an IFNULL in your SQL statement to get around this error.
Hi EHW,
Thank you very much for your kind help...
Unless, I'm doing something wrong, records 55555.. and 6666.. colors seems to stay same even after changing colors of say record 666.. Panel colors are not record specific atm.
Adam,
It was a little confusing to me. Your code is only retrieving values from one record in the SETTINGS table even though you have multiple records in there. So if you want to have multiple settings then you need to retrieve the corresponding values based on the selected row in your tablegrid. See attached for fix.
Thanks a lot EHW...............
Great stuff as usual... Truly appreciated..........
On new record previous record colors were displayed on form2. I added the following under Fom2 onShow to overcome
If Form2.dbAction = 'NewRecord' then
begin
Form2.PanelColPanel01.Color := $00D3D3D3;
Form2.PanelColPanel02.Color := $00D3D3D3;
Form2.PanelColPanel03.Color := $00D3D3D3;
Form2.PanelColPanel04.Color := $00D3D3D3;
end;
Merry Christmas and Happy New Year to you and ALL....
My Visual Database → General → Color coding panels
Powered by PunBB, supported by Informer Technologies, Inc.
Theme Hydrogen by Kushi