05-03-2019 11:03 AM
Hello,
In my xTable, this sub will change the colour of the dialog permanently when I change a cell entry:-
Sub XTable1_EventValSet(ByRef This, Row, Col, ByRef Cell) 'Created Event Handler
If Row > 0 And Col > 0 Then
Data.GetChannel(Col).Values(Row) = Val(Eval(Cell.Text))
Dialog.Color = vbcyan ' this works
End If
But, how can I change the background colour of just the changed cell permanently?
I can only get the cell colour to change temporarily using the examples from Diadem help (XTable1_EventDefaultColCtrlPreset and Cell.ForeColor)......
Any help is appreciated.
Thank you.
Solved! Go to Solution.
05-06-2019 12:41 AM
Hello mrme,
did you try this:
Sub XTable1_EventValSet(ByRef This, Row, Col, ByRef Cell) 'Created Event Handler If Row > 0 And Col > 0 Then Data.GetChannel(Col).Values(Row) = Val(Eval(Cell.Text)) ' Dialog.Color = vbcyan ' this works Cell.BackColor = = vbcyan ' this works End If
End Sub
Greetings
Walter
05-06-2019 01:27 AM
Hello Walter,
Thanks for the response. Yes, I have tried it, but no success. Neither Cell.BackColor nor Cell.ForeColor work. There is no error message. Xtable1.Refresh has no effect either.
I forgot to provide the version of Diadem - it is 2018, 18.0.0f7097 (64 bit).
Thank you,
Thomas
05-14-2019 02:14 AM
Hello Thomas,
Colors can only be set in the ...Get event. I've attached an example SUD.
Greetings
Walter
05-14-2019 10:19 AM
Hello Walter,
Many thanks for the reply and example.
Thomas