Subject | Re: [IBO] Problems in TIB_Grid |
---|---|
Author | Salvatore Besso |
Post date | 2006-01-12T16:32:39Z |
hello Jason,
procedure TCustomGrid.CreateParams(var Params: TCreateParams);
begin
inherited CreateParams(Params);
with Params do
begin
Style := Style or WS_TABSTOP;
if FScrollBars in [ssVertical, ssBoth] then Style := Style or
WS_VSCROLL;
if FScrollBars in [ssHorizontal, ssBoth] then Style := Style or
WS_HSCROLL;
WindowClass.style := CS_DBLCLKS;
if FBorderStyle = bsSingle then
if NewStyleControls and Ctl3D then
begin
Style := Style and not WS_BORDER;
ExStyle := ExStyle or WS_EX_CLIENTEDGE;
end
else
Style := Style or WS_BORDER;
end;
end;
=========================================================
and this is TIB_CustomGrid.CreateParams:
procedure TIB_CustomGrid.CreateParams(var Params: TCreateParams);
begin
inherited CreateParams(Params);
if not (csDesigning in ComponentState) and Assigned( FParentCombo )
then
with Params do
begin
Style := Style or WS_BORDER;
ExStyle := WS_EX_TOOLWINDOW;
WindowClass.Style := CS_SAVEBITS or CS_DBLCLKS;
end;
end;
=========================================================
Do you see anything wrong that could cause the problem?
Regards
Salvatore
> to carefully examine the Params of the windows handlethis is TCustomGrid.CreateParams (TIB_CustomGrid inherits from it):
procedure TCustomGrid.CreateParams(var Params: TCreateParams);
begin
inherited CreateParams(Params);
with Params do
begin
Style := Style or WS_TABSTOP;
if FScrollBars in [ssVertical, ssBoth] then Style := Style or
WS_VSCROLL;
if FScrollBars in [ssHorizontal, ssBoth] then Style := Style or
WS_HSCROLL;
WindowClass.style := CS_DBLCLKS;
if FBorderStyle = bsSingle then
if NewStyleControls and Ctl3D then
begin
Style := Style and not WS_BORDER;
ExStyle := ExStyle or WS_EX_CLIENTEDGE;
end
else
Style := Style or WS_BORDER;
end;
end;
=========================================================
and this is TIB_CustomGrid.CreateParams:
procedure TIB_CustomGrid.CreateParams(var Params: TCreateParams);
begin
inherited CreateParams(Params);
if not (csDesigning in ComponentState) and Assigned( FParentCombo )
then
with Params do
begin
Style := Style or WS_BORDER;
ExStyle := WS_EX_TOOLWINDOW;
WindowClass.Style := CS_SAVEBITS or CS_DBLCLKS;
end;
end;
=========================================================
Do you see anything wrong that could cause the problem?
Regards
Salvatore