|Subject||Re: [IBO] How to change Color of selected (=highlited) row ?|
> I did so, and I see no differences between my code and the Contactsample.
>Hmmmm, I didn't notice this before. I guess it must be OK. I've
> MY Contact sample:
> BufferRowNum := grContact.DataRow[ ARow ];
always been extremely wary of altering BufferRowNum inside grid
events - since IB_Grid uses BufferRowNum internally. Besides which
you had snipped this from the code you posted, so it was not obvious
you were doing this. Anyway back to your code...
if BufferRowNum > 0 then begin
// <<< Moved this line inside BufferRowNum check >>>
iOtherPilot := BufferFieldByName('OTHERPILOT').AsInteger;
// <<< Not sure what tsAbgang is or why TabIndex is relevant >>>
if tsAbgang.TabIndex = 2 then
if iOtherPilot > 0 then
// <<< this should be... >>>
if gdSelected in AState then
The most likely cause of your problem is the last item where you were
AState = [gdSelected]
Since AState is a set with possibly several values you need to use the
alternative syntax shown.
Hope this is more help than I was in the last attempt :-)