Questions tagged [tstringgrid]

TStringGrid is VCL grid control designed to manage the handling of strings and associated objects in Delphi and related development tools. It is defined in the Grids.pas (or VCL.Grids.pas starting with Delphi XE2 version) unit.

The exact amount of features vary depending upon chosed devtool and its version.

Some documentation links include^

181 questions
4
votes
1 answer

Extending library classes with own methods in Delphi pascal

I was wondering if there is a way to add custom method to already existing/included class component in Delphi Pascal. I would like to use this to rotate StringGrid like this: StringGridn.rotate(angle); instead of: rotate(StringGridn,…
schullzroll
  • 168
  • 13
4
votes
3 answers

Live update of StringGrid when horizontal scroll bar is moving?

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…
RobertFrank
  • 7,332
  • 11
  • 53
  • 99
4
votes
3 answers

How can I create an event handler for a non published but public event in delphi?

In RAD Studio 10.1 Berlin quite a few things has changed from previous version. In FMX there are a few previously published events that has now been changed to only be public. I have a Multi Platform Project that uses a TStringGrid component and the…
TheAviator
  • 41
  • 5
4
votes
1 answer

How can I select multiple individual cells of a string grid?

I am looking for a string grid that allows me select multiple cells anywhere in the grid without them adjoining each other, e.g pressing CTRL and clicking on various cells over the grid. Or if anyone knows how to do this with the standard Delphi…
colin
  • 2,983
  • 6
  • 41
  • 49
4
votes
2 answers

TStringGrid with BOTH editing AND range selection?

Question: Can anyone point to an article or code samples anywhere on how to provide BOTH editing AND range selection in a TStringGrid? Yes, I KNOW there are third-party grids that do this, but it's frustrating that the built-in grid lacks this…
Kevin Killion
  • 123
  • 2
  • 9
4
votes
2 answers

Firemonkey MouseToCell equivalent

In Delphi VCL if I wanted to see which cell (column and row) of a TStringGrid my mouse was hovering over I'd use MouseToCell. This method is no longer in Delphi (XE2) for FireMonkey apps. Does anyone know how I can determine the cell my mouse is…
Ian Francis
  • 181
  • 1
  • 1
  • 9
4
votes
1 answer

Programmatically highlight a stringgrid row

i have a string grid in Delphi 7, with 0..N rows. There is a listbox with numbers from 0..N if the user clicks on the any number in the listbox number , that row number should be selected on the stringgrid. so i have this MystringGrid.Col :=0; …
psqluser
  • 103
  • 1
  • 2
  • 10
4
votes
3 answers

How to quickly add many rows to a TStringGrid?

I googled and found a lot of advice, but it all seemed several years old and none of it helped. I have a string grid with 8 columns and once I get more than a few hundred rows it is taking over 2 seconds to populate (I compared using…
Mawg says reinstate Monica
  • 38,334
  • 103
  • 306
  • 551
4
votes
2 answers

Writing data into a Delphi TStringGrid from an external application

I have a legacy application written in Delphi, and need to build a mechanism for reading and writing data from/to a TStringGrid. I don't have the source code of the application, there is no automation interface and it is very unlikely that the…
Glory to Russia
  • 17,289
  • 56
  • 182
  • 325
4
votes
1 answer

Copy multiple cells from grid to clipboard in excel format?

I'm working on a tool which connects to a SQL Database, gets back a dataset, and displays that data in a grid. The user must be able to select a block of cells (just rectangular) and press CTRL+C to copy it to the clipboard. How do I do this: In a…
Jerry Dodge
  • 26,858
  • 31
  • 155
  • 327
4
votes
3 answers

Why don't child controls of a TStringGrid work properly?

I am placing checkboxes (TCheckBox) in a string grid (TStringGrid) in the first column. The checkboxes show fine, positioned correctly, and respond to mouse by glowing when hovering over them. When I click them, however, they do not toggle. They…
Jerry Dodge
  • 26,858
  • 31
  • 155
  • 327
3
votes
1 answer

inserting image in stringgrid cell

i m using stringgrid in my application.The data is fetched from the database(backend mysql) and displayed in stringgrid. I want to insert image in status cell of each row. i.e. if status =online then -->image1 else --->image2 anyone…
user1071339
3
votes
1 answer

How To Change The Font Size Of Hint Text Associated With a TStringGrid Cell

I am using Lazarus v0.9.30 (32 bit compiler). I have the following code that I use to show the hint text stored in the object associated with a TColumnTitle object in a TStringGrid. procedure TTmMainForm.TmApplicationPropertiesShowHint ( var…
user1174918
  • 525
  • 6
  • 22
3
votes
1 answer

How To Toggle The cell Colour And Text In A TStringGrid On And Off

I am running Lazarus v0.9.30 (32 bit compiler). I have a TForm with a standard TStringGrid on it. The grid has the following properties set. RowCount = 5, ColumnCount = 5, FixedCols = 0, FixedRows = 0. I Googled some code that showed me how to…
user1174918
  • 525
  • 6
  • 22
3
votes
2 answers

Delphi equivalent of C#'s DataGridView

Is there any real equivalent of C#'s DataGridView in Delphi? I have tried TStringGrid But the scrollbar is either invisible when all the items are visible, or it is the smallest scrollbar possible no matter how little the items are overflowed and…
Seth Carnegie
  • 73,875
  • 22
  • 181
  • 249
1 2
3
12 13