View Issue Details

IDProjectCategoryView StatusLast Update
0005228JEDI VCL00 JVCL Componentspublic2010-06-07 13:49
ReporterdesignshouseAssigned Toobones 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionnot fixable 
Product Version3.39 
Target VersionFixed in Version 
Summary0005228: JvDbGrid not focusing after TWebbrowser is focused.
DescriptionHI

i have a jvdbgrid and a webbrowser components.
i chose a record in the jvdbgrid and as a result i see a web page in the webbrowser component.
after im clicking inside the webbrowser (webbrowser has the focus now), i click again on another record in the jvdbgrid, the jvdbgrid does not get focus and remain on the same record it was before.
TagsNo tags attached.

Activities

AHUser

2010-04-24 15:06

developer   ~0017366

This bug also affects VCL's TDBGrid from which TJvDBGrid inherits. So it is not a JvDBGrid bug.
BTW: The actual bug is in the TWebBrowser component. When you click into the webbrowser IE takes the focus but the VCL doesn't know that because it is not the TOleControl that has the focus but the ActiveX IE control that got the focus. Newer versions of TEmbeddedWB include a fix for this bug.

designshouse

2010-04-24 15:10

reporter   ~0017367

I found working solution

in file JvDBGrid.pas

Add unit Winprocs;

In TJvDBGrid class add this two procedures: WMRButtonDown and WMLButtonDown in public method

TJvDBGrid = class(TJvExDBGrid, IJvDataControl)
public
procedure WMRButtonDown(var Message: TWMRButtonDown); message WM_RBUTTONDOWN;
procedure WMLButtonDown(var Message: TWMLButtonDown); message WM_LBUTTONDOWN;
end;

procedure TJvDBGrid.WMRButtonDown(var Message: TWMRButtonDown);
begin
 winprocs.SetFocus(handle);
 inherited;
end;

procedure TJvDBGrid.WMLButtonDown(var Message: TWMLButtonDown);
begin
 winprocs.SetFocus(handle);
 inherited;
end;

AHUser

2010-04-24 16:28

developer   ~0017368

Last edited: 2010-04-24 16:29

Winprocs is deprecated and only an alias for "Windows.pas"

This is only a work around. It doesn't fix the actual problem and it only fixes the grid control. But there are other controls that are affected by this bug.

obones

2010-06-07 13:49

administrator   ~0017450

Well, this is not fixable then

Issue History

Date Modified Username Field Change
2010-04-24 14:43 designshouse New Issue
2010-04-24 15:06 AHUser Note Added: 0017366
2010-04-24 15:10 designshouse Note Added: 0017367
2010-04-24 16:28 AHUser Note Added: 0017368
2010-04-24 16:29 AHUser Note Edited: 0017368
2010-06-07 13:49 obones Note Added: 0017450
2010-06-07 13:49 obones Status new => resolved
2010-06-07 13:49 obones Resolution open => not fixable
2010-06-07 13:49 obones Assigned To => obones