[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

DBGrid Scrollbars

Posted on 1998-03-08
3
Medium Priority
?
1,213 Views
Last Modified: 2008-02-01
I had it all figured out in Delphi2. No vertical scrollbars on DBGrid just takes:
procedure TMain.DisableVertBar(GridHandle:THandle);
var VScrollInfo : TScrollInfo;
begin
VScrollInfo.cbSize := Sizeof (VScrollInfo);
VScrollInfo.fMask := SIF_PAGE;
SetScrollInfo(GridHandle, SB_VERT, VScrollInfo, True);
end;

In D3,the scrollbar is gone alright,untill I click the form!
Do I have to do somethong else in D3?
0
Comment
Question by:lizzzard
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 1

Accepted Solution

by:
RJENKINS earned 150 total points
ID: 1360267
Try using this component,
it allows you to have the VertBar on or off.

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,Grids, DBGrids;

type
  TNVDBGrid = class(TDBGrid)
  private
   FVertScr: Boolean;
   procedure SetVertScr(Value: Boolean);
  protected
    procedure Paint; override;
  public
    constructor Create(AOwner: TComponent); override;
  published
  property VertScrollBar: Boolean read FVertScr write SetVertScr;
  end;

procedure Register;

implementation

constructor TNVDBGrid.Create(AOwner: TComponent);
begin
  Inherited;
  FVertScr := True;
end;

procedure TNVDBGrid.SetVertScr(Value: Boolean);
begin
  if Value <> FVertScr then
  begin
    FVertScr := Value;
    Repaint;
  end;
end;

procedure TNVDBGrid.Paint;
begin
  if not FVertScr then
    SetScrollRange(Self.Handle, SB_VERT, 0, 0, False);
  inherited Paint;
end;

procedure Register;
begin
  RegisterComponents('Data Controls', [TNVDBGrid]);
end;


Hope this helps
RCJ
0
 
LVL 1

Expert Comment

by:RJENKINS
ID: 1360268
Are you going to grade this answer
RCJ
0
 

Author Comment

by:lizzzard
ID: 1360269
I'm sorry,RJenkins,I've been very busy with another app. I will try it right away. Expect the grading this weekend
Thank you for your patience,
Regards,Lizzzy
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
Suggested Courses

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question