Board index » delphi » hoe to hide the v. scrollbar i TDBGrid

hoe to hide the v. scrollbar i TDBGrid

Hi,
does anyone know how (if it is possible) to hide the vertical scroll bar
in a TDBGrid
regards
Eli

 

Re:hoe to hide the v. scrollbar i TDBGrid


On Mon, 24 Nov 1997 16:36:03 +0200, Eli Cohen

Quote
<liad...@netvision.net.il> wrote:
>Hi,
>does anyone know how (if it is possible) to hide the vertical scroll bar
>in a TDBGrid
>regards
>Eli

If you have a budget for your project, the InfoPower grid has
properties that allow you to turn off the horizontal and/or vertical
scroll bars. Their web site is www.woll2woll.com. The package is very
good for many other features, this being just one minor one.

Steve F (Team B)

Re:hoe to hide the v. scrollbar i TDBGrid


Eli Cohen <liad...@netvision.net.il> wrote in article
<347990D2.14DF8...@netvision.net.il>...

Quote
> does anyone know how (if it is possible) to hide the vertical scroll bar
> in a TDBGrid

Eli,

Use the following code in your form's OnCreate event handler:

procedure TForm1.FormCreate(Sender: TObject);
begin
  // Remove vertical scroll bar
  SetWindowLong(DBGrid1.Handle, GWL_STYLE,
    GetWindowLong(DBGrid1.Handle, GWL_STYLE)
    and not WS_VSCROLL);
  // Force refresh of client and non-client areas
  SetWindowPos(DBGrid1.Handle, 0, 0, 0, 0, 0,
    SWP_NOZORDER or SWP_NOSIZE or
    SWP_NOMOVE or SWP_FRAMECHANGED);
end;

Yorai Aminov
El-On Software Systems

Other Threads