How to change the scroll bar width of a dbGrid?

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #69784
    NormAtHome
    Participant

    I’ve been working on a VCL application that’s mainly meant to work on a Windows 10 tablet without the benefit of a keyboard or mouse so touch only; one of the problems I’m having is the scrollbars on the TrzDBGrid I’m using on my main form are too small to reliably tap with a fingertip so I’m looking for a way to make the scrollbars width bigger. I already have a lifetime license for Alpha Controls which I’m using to enlarge the font of the popup menus on the form; the person who suggested this gave me the most basic instructions on how to try it (he mentioned it may not work with all third party components) so I added the TrzDBGrid to the third party list in sSkinManager and he posted this code:

    procedure TForm6.sTrackBar1Change(Sender: TObject);
    begin
      sSkinManager1.ScrollsOptions.ButtonSize := sTrackBar2.Position;
      sSkinManager1.ScrollsOptions.ScrollSize := sTrackBar1.Position;
    end;

    I really don’t get how to apply this code to my application? How would I set the scrollbar width to say double the default width? Or would this only work with a Tsdbgrid?

    #69786
    NormAtHome
    Participant

    Ok I discovered that even though added to third party components the Trzdbgrid was not able to be adjusted through the Skin Manager so by replacing the Raize dbGrid with the Alpha Controls dbGrid and what I didn’t get before was that the guy who suggested this posted pictures of his example app but no code other than what I posted above; because it had a skin it was hard to see that it had trackbars on it that were being used used to change the width of the scrollbars so the code above did make sense and when I used “sSkinManager1.ScrollsOptions.ScrollSize = 34” everything worked just fine.

    #69792
    Support
    Keymaster

    Hello! Your issue is solved by replacing of grid by the TsDBGrid and using the above code?
    Or, you need a solution for the Trzdbgrid still?

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.