Subject | [IBO]TIB_Enhanced controls in Grid - Geoff ;-) |
---|---|
Author | Paul Hope |
Post date | 2007-10-16T15:16:33Z |
Hello anyone but especially Geoff if you're around
Some time ago we discussed the problem of a TIB_DateTimeEnh in a TIB_Grid
losing focus for one TAB. For example if a grid has three columns and the
middle one has a TIB_DateTimeEnh then the TAB sequence from column 1 would
be column2, nothing, column3.
I have found that for my TIB_Grid derivitive the TAB sequence leaves the
grid altogether when tabbing out of the control so I looked at it again.
This fixes it but I can't judge how safe or nice it is and would like your
opinion . .
In unit Telesis_IB_DateTimeEnh.pas,
Add IB_Grid to the uses clause
in the TIB_DateTimeEnh declaration add
private
procedure CMExit(var Message: TCMExit); message CM_EXIT;
and in the body
procedure TIB_DateTimeEnh.CMExit(var Message: TCMExit);
begin
inherited;
if Parent is TIB_CustomGrid then TWinControl(Parent).SetFocus;
end;
If you think it is OK then because of the way the components are inherited I
think I would have to do the same for the other embeded components.
Regards
Paul
[Non-text portions of this message have been removed]
Some time ago we discussed the problem of a TIB_DateTimeEnh in a TIB_Grid
losing focus for one TAB. For example if a grid has three columns and the
middle one has a TIB_DateTimeEnh then the TAB sequence from column 1 would
be column2, nothing, column3.
I have found that for my TIB_Grid derivitive the TAB sequence leaves the
grid altogether when tabbing out of the control so I looked at it again.
This fixes it but I can't judge how safe or nice it is and would like your
opinion . .
In unit Telesis_IB_DateTimeEnh.pas,
Add IB_Grid to the uses clause
in the TIB_DateTimeEnh declaration add
private
procedure CMExit(var Message: TCMExit); message CM_EXIT;
and in the body
procedure TIB_DateTimeEnh.CMExit(var Message: TCMExit);
begin
inherited;
if Parent is TIB_CustomGrid then TWinControl(Parent).SetFocus;
end;
If you think it is OK then because of the way the components are inherited I
think I would have to do the same for the other embeded components.
Regards
Paul
[Non-text portions of this message have been removed]