Subject | [IBO] Trouble with TDateTimeEnh |
---|---|
Author | Paul Hope |
Post date | 2007-04-19T13:46:20Z |
Hi (Geoff)
I have a TDateTimeEnh in an IB_Grid. When selecting a date sometimes its OK
and sometimes I get a cant focus an invisible window error. Problem is at
***
procedure TCustomDateTimeBoxEnh.DateTimeCloseEvent(Sender: TObject);
var
refocus: boolean;
begin
if Controller.EditBeginModify then
begin
refocus := Controller.Focused;//FDateTimePnl.FDateGrid.Focused;
Change;
CloseUp;
if refocus then // the date-grid may have stolen focus which
will
*** Controller.SetFocus; // upset tab order, so we steal it back again.
end;
end;
because Controller (the TDateTimeEnh) isnt visible any more. I tried 'if
refocus and controller.visible' but tthis allows focus to leave the grid
altogether. Becasue these components can be in a grid or not I'm not sure
how to fix it.
Regards
Paul
[Non-text portions of this message have been removed]
I have a TDateTimeEnh in an IB_Grid. When selecting a date sometimes its OK
and sometimes I get a cant focus an invisible window error. Problem is at
***
procedure TCustomDateTimeBoxEnh.DateTimeCloseEvent(Sender: TObject);
var
refocus: boolean;
begin
if Controller.EditBeginModify then
begin
refocus := Controller.Focused;//FDateTimePnl.FDateGrid.Focused;
Change;
CloseUp;
if refocus then // the date-grid may have stolen focus which
will
*** Controller.SetFocus; // upset tab order, so we steal it back again.
end;
end;
because Controller (the TDateTimeEnh) isnt visible any more. I tried 'if
refocus and controller.visible' but tthis allows focus to leave the grid
altogether. Becasue these components can be in a grid or not I'm not sure
how to fix it.
Regards
Paul
[Non-text portions of this message have been removed]