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

  • Home
  • SEARCH
  • 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 8746699
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T12:14:08+00:00 2026-06-13T12:14:08+00:00

Screen width is just not enough to display some text fields. I don’t know

  • 0

Screen width is just not enough to display some text fields. I don’t know how to auto-wrap them and I doubt that it can be easily done.

So, I thought that I would do something like

procedure TForm1.FormMouseMove(Sender: TObject;
    Shift: TShiftState; X,Y: Integer);

   var column, row : Integer;
begin
  myDbGrid.MouseToCell(X, Y, column, row);
  myDbGrid.Hinst := myDbGrid.Cells(column, row); // <==== ooops
end;

or, maybe do it in OnShowHint and get the mouse coords & translate them to column & row (more efficient)

but, of course, TDbGrid doesn’t have Cells. Any idea how I can set the hint for the control as the user moves the mouse over the “cells” of the grid?

  • 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-06-13T12:14:08+00:00Added an answer on June 13, 2026 at 12:14 pm

    Use this code:

    type
     THackGrid = class(TDBGrid);
    
    procedure TForm1.DBGrid1MouseMove(Sender: TObject; Shift: TShiftState; X,
      Y: Integer);
    var
      Cell: TGridCoord;
      ActRec: Integer;
    begin
      Cell := DBGrid1.MouseCoord(X, Y);
      if dgIndicator in DBGrid1.Options then
        Dec(Cell.X);
      if dgTitles in DBGrid1.Options then
        Dec(Cell.Y);
      if THackGrid(DBGrid1).DataLink.Active and (Cell.X >= 0) and
        (Cell.Y >= 0) then
      begin
        ActRec := THackGrid(DBGrid1).DataLink.ActiveRecord;
        try
          THackGrid(DBGrid1).DataLink.ActiveRecord := Cell.Y;
          Caption := DBGrid1.Columns[Cell.X].Field.AsString;
        finally
          THackGrid(DBGrid1).DataLink.ActiveRecord := ActRec;
        end;
      end;
    end;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a screen with pivot functionality, and I'd very much like just one
What does JavaScript pull out with: screen.width and screen.height on the ipad 3? Is
I'm trying to write Firefox stylish css ( full screen width style ) for
I'd like to have the width of my table 100% of screen width -
Is it possible to assign a widget width to half the available screen width,
I'm displaying pop up window using the below code: var left = (screen.width/2)-(400/2); var
how do i get the width and height of the entire screen in XNA?
So what's the lowest screen resolution, especially width, that I should consider when building
I want my table to be with width of 80% of the screen. The
I'm pretty sure the question has been asked and answered, I don't know HTML

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.