Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3335280
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T00:00:00+00:00 2026-05-18T00:00:00+00:00

In Delphi 2010, I need to display a grid that has a horizontal scroll

  • 0

In Delphi 2010, I need to display a grid that has a horizontal scroll bar with about 15 columns x 5 rows.

I chose to use a StringGrid.

However, while the mouse button is down dragging the horizontal scroll bar, I want the grid to scroll live.

The StringGrid component, it appears, does not scroll live. It waits until the mouse button is released before updating the column and scrolling if necessary.

Also, the horizontal scroll bar button (is that what it’s called) is not proportional to the number of columns. And for a down-arrow when on the bottom row to move to the top of the next column to the right…

These seem like common needs, so I was surprised not to find them in TStringGrid.

Any suggestions on a way around these two problems? I can use a DbGrid or other standard component, but my preference is to not use a commercial grid if I can avoid it. And I’m not going to use shareware or freeware…

TIA

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T00:00:00+00:00Added an answer on May 18, 2026 at 12:00 am

    For the first question, you can set goThumbTracking in the StringGrid’s Options at design-time, or at run-time:

    StringGrid1.Options := StringGrid1.Options + [goThumbTracking];

    For the third question, you can provide the functionality you need by using keyboard event handlers of the control. An example;

    procedure TForm1.StringGrid1KeyDown(Sender: TObject; var Key: Word;
      Shift: TShiftState);
    var
      StringGrid: TStringGrid;
    begin
      StringGrid := Sender as TStringGrid;
      case Key of
        VK_DOWN:
          if StringGrid.Row = StringGrid.RowCount - 1 then begin
            Key := 0;
            StringGrid.Row := StringGrid.FixedRows;
            if StringGrid.Col = StringGrid.ColCount - 1 then
              StringGrid.Col := StringGrid.FixedCols
            else
              StringGrid.Col := StringGrid.Col + 1;
          end;
        VK_UP:    //...;
        VK_RIGHT: //;
        VK_LEFT:  //;
      end;
    end;
    

    For the second question, the scrolling code seems to be buried in private methods of TCustomGrid. I have no clue how to achieve that..

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am working with Delphi 2010 and the ShellAPI. I need a little help
I am searching for a Cyclomatic Complexity Api in Delphi (2010). I need to
I am using Delphi 2010 to build a Win32 GUI application running on Windows
I am developing a new module for a large Application in Delphi 2010. I
I am trying to compile a Delpho 2010 project using the msbuild tool. Unfortunately
I need to maintain different versions of a software, the problem is like this:
UPDATED 2010-11-25 A legacy stand-alone application (A1) is being re-created as a web application
I have a question. I am a newbie with Run Time Type Information from
I'm looking for the best* method to find the primary email address for the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.