View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0003695 | JEDI VCL | 00 JVCL Components | public | 2006-05-09 08:04 | 2006-09-29 07:36 |
Reporter | ir2000 | Assigned To | obones | ||
Priority | normal | Severity | feature | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | 3.20 | ||||
Target Version | Fixed in Version | 3.30 | |||
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 | ||||
Tags | No tags attached. | ||||
|
Can this be done in a regular TDBGrid? |
|
I dont know exactly but I think it is not possible. |
|
Well then, if it's not possible in TDBGrid, it won't be in TJvDBGrid. |
|
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. |
|
The ScrollBars property has been added as a public property, use it at will. |
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 |