Roger Alcindor
asked on
How can I disable the horizontal scroll bar in a TDBGrid VCL control using C++ builder
I am using Embarcadero C++ builder 10.1 Berlin to write a C++ Windows application.
I wish to remove the horizontal scroll bar. How can I do this please.
With the TStringGrid control there is a Scrollbars property which can be set to do this so why not for a TDBGrid ??
I wish to remove the horizontal scroll bar. How can I do this please.
With the TStringGrid control there is a Scrollbars property which can be set to do this so why not for a TDBGrid ??
ASKER
Hello Kent,
Thanks for the information. I'm using C++ builder 10.1 not RAD studio and don't have Delphi included. Is there no way to do this without Delphi ?
Thanks for the information. I'm using C++ builder 10.1 not RAD studio and don't have Delphi included. Is there no way to do this without Delphi ?
Oops. Looked at quickly and thought it was C++.
I'm reloading applications on my desktop and don't have C++ Builder available right now.
The short of it is
I'm reloading applications on my desktop and don't have C++ Builder available right now.
The short of it is
procedure TNoVertScrollDBGrid.Paint;
begin
SetScrollRange(Self.Handle, SB_VERT, 0, 0, False);
inherited Paint;
end;
Can be rewritten in C++ pretty easily. I don't recall how to get to the objects "real" Paint method, but let me look that up and get back to you. If you already know, you're a couple of steps up on me! :)ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
That's something that I've never seen discussed before. :) Still, it seems that somebody had the idea before you did and there is a solution. :)
https://community.embarcadero.com/article/technical-articles/146-data/12804-removing-the-vertical-scrollbar-from-a-tdbgrid
The article shows how to disable the vertical scroll bar, but it should be a simple process to disable the horizontal bar instead.
Good Luck,
Kent