Project JEDI - Issue Tracker
Mantis Bugtracker

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0003695 [JEDI VCL] 00 JVCL Components feature always 2006-05-09 08:04 2006-09-29 07:36
Reporter ir2000 View Status public  
Assigned To obones
Priority normal Resolution fixed  
Status resolved   Product Version 3.20
Summary 0003695: TJvDBGrid Scrollbars
Description Would be nice to be able to turn of scrollbars (mainly vertical) when there are only a few records to displayed
Additional Information
Tags No tags attached.
Attached Files

- Relationships

-  Notes
(0009518)
obones (administrator)
2006-06-09 02:45

Can this be done in a regular TDBGrid?
(0009559)
ir2000 (reporter)
2006-06-09 10:35

I dont know exactly but I think it is not possible.
(0009907)
obones (administrator)
2006-07-29 07:44

Well then, if it's not possible in TDBGrid, it won't be in TJvDBGrid.
(0010021)
ir2000 (reporter)
2006-08-24 09:20

I had a little time and found a way.

http://www.swissdelphicenter.ch/de/showcode.php?id=1880 [^]

Author: P. Below

(*

Q:
I want to hide the vertical scrollbar on a dbgrid when the record count
exceed a number. How can I do that?

A:
Make a descendent of the TDBGrid class. Add a handler for the
WM_NCCALCSIZE message.

*)

type
  TNoScrollDBGrid = class(TDBGrid)
  private
    procedure WMNCCalcSize(var Msg: TMessage);
      message WM_NCCALCSIZE;
  end;

procedure TNoScrollDBGrid.WMNCCalcSize(var Msg: TMessage);
const
  Scrollstyles = WS_VSCROLL or WS_HSCROLL;
var
  Style: Integer;
begin
  Style := GetWindowLong(Handle, GWL_STYLE);
  if (Style and Scrollstyles) <> 0 then
    SetWindowLong(Handle, GWL_STYLE, Style and not Scrollstyles);
  inherited;
end;

//This removes both scrollbars. If you want to remove only the vertical one
//change the scrollstyles constant accordingly.
(0010248)
obones (administrator)
2006-09-29 07:36

The ScrollBars property has been added as a public property, use it at will.

- Issue History
Date Modified Username Field Change
2006-05-09 08:04 ir2000 New Issue
2006-06-09 02:45 obones Note Added: 0009518
2006-06-09 02:45 obones Status new => feedback
2006-06-09 10:35 ir2000 Note Added: 0009559
2006-07-29 07:44 obones Status feedback => resolved
2006-07-29 07:44 obones Resolution open => not fixable
2006-07-29 07:44 obones Assigned To => obones
2006-07-29 07:44 obones Note Added: 0009907
2006-08-24 09:20 ir2000 Status resolved => feedback
2006-08-24 09:20 ir2000 Resolution not fixable => reopened
2006-08-24 09:20 ir2000 Note Added: 0010021
2006-09-29 07:36 obones Status feedback => resolved
2006-09-29 07:36 obones Fixed in Version => Daily / SVN
2006-09-29 07:36 obones Resolution reopened => fixed
2006-09-29 07:36 obones Note Added: 0010248


Mantis 1.1.6[^]
Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker