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
0
votes
0 answers

Delphi: How to change cell color in StringGrid by ButtonClick

I decided to do a little project. It's a work with two-dimensional array, we all know it from Math class. I'd like to color main diagonal in StringGrid by red color in ButtonClick procedure. I know how to find main diagonal with FOR cycle but I…
Phil
  • 1
0
votes
1 answer

delphi TStringGrid and right mouse button

I am using Delphi 10.1 Berlin to make a Multi-Device application. I have a TStringGrid in order to list some data from a query. I also have a popup menu (edit, delete, ...), but in order to edit/delete an item I have to click on a cell using the…
Rube
  • 105
  • 3
  • 11
0
votes
0 answers

How to get the font color of a particular Delphi TStringGrid cell

I have a stringgrid that has been drawn via complex DrawCell code. It has different font colors, brush colors, alignment etc... I'm now writing code that exports the contents of the stringgrid. Of course I could use the underlying list and…
MarkW
  • 61
  • 7
0
votes
3 answers

component to theme a StringGrid like the ThemedDBGrid

Exist any similar component to theme a stringrid like the ThemedDBGrid component compatible with delphi 5.
Salvador
  • 16,132
  • 33
  • 143
  • 245
0
votes
1 answer

TStringgrid change color of row conditionally in firemonkey

How to paint an entire row based on some value in a particular column? I have TStringGrid with four columns: ID | NAME | DATE | STATE 1 X 2017-01-01 TRUE --whole row need to be yellow 2 Y 2017-01-01 …
Jande
  • 1,695
  • 2
  • 20
  • 32
0
votes
1 answer

tadvstringgrid not copying every cell

I have this tadvStringGrid it has: navigation.allowclipboardAlways=true navigation.allowclipboardshortcut=true option.goRangeSelect = true MouseActions.DisjunctRowSelect = true goEditing=true I can select multiple cells but when i ctrl-c and…
Thalden
  • 11
  • 3
0
votes
1 answer

delphi 7: How to update StringGrid cells color dependence on a state of boolean variable

I would like to have: if a boolean variable will set to true, should a cell (error message) in StringGrid be red. It isn't works automatically with OnDrawCell. How can I achieve it? Thanks in advance.
genakust
  • 89
  • 9
0
votes
0 answers

Delphi TAdvStringGrid filter - highlight filtered header cell/column

I have a TAdvStringGrid with a filter FilterDropDownAuto:= true; FilterDropDownCheck:= true; Looks like this: If the filter is active, I need to notify an user somehow. For example column header, or entire column in different color etc. How to…
j.kaspar
  • 751
  • 1
  • 11
  • 29
0
votes
1 answer

How to prohibit an unintended tStringGrid onSelectCell event firing

I use windows 10 and seattle. I try to change tStringGrid.RowCount without running onSelectCell event because there is a something which should not be run when a cell is not clicked or selected. Sometimes changing tStringGrid.RowCount fires…
JO SeongGng
  • 567
  • 3
  • 18
0
votes
2 answers

How to avoid a duplicate implementation of tStringGrid.Col & tStringGrid.Row

I try to select or click a cell externally. When I use tStringGrid.Col and tStringGrid.Row to select a cell, onSelectCell event runs twice. How can I make it to be processed once? If I use tStringGridSelectCell event to avoid the problem, a…
JO SeongGng
  • 567
  • 3
  • 18
0
votes
1 answer

Change color of text in a TStringGrid cell

How can I change the color of text in a TStringGrid cell depending on certain conditions? I am using TStringGrid to display a monthly calendar view on a form and I'm populating the TStringGrid with days of the month in certain rows and columns,…
Hackbrew
  • 349
  • 1
  • 10
  • 23
0
votes
1 answer

Change THeader font size in FMX TStringGrid

I've searched this question and found this. so, I wrote a OnApplyStyleLookup event handler like this: procedure TForm1.StringGrid1ApplyStyleLookup(Sender: TObject); var Header: THeader; I: Integer; begin Header := THeader((Sender as…
Outdoor
  • 35
  • 1
  • 7
0
votes
2 answers

StringGrid issue in Delphi XE8 firemonkey mobile app

I'm using Delphi XE8 for developing mobile application and I'm facing some of the problem in TStringGrid. I have written the following code in StringGridSelectCell event. Showmessage(StringGrid.Cells[0, ARow]); And this shows the proper value of…
0
votes
1 answer

Memory Leak on TStringGrid's onDrawColumnCell event

Background: Windows 64-bit application, Firemonkey, Delphi XE7 I have about 10 TStringGrid components and all of which are using the same onDrawColumnCell to change cell colors when the Value in the cells is not 'Normal.' I am using the following…
Alvin Lin
  • 199
  • 2
  • 5
  • 13
0
votes
1 answer

How to change the color of TStringGrid grid-lines?

I've just finished migrating from D7 to XE2 and I've noticed that the default grid-lines are extremely faint (it doesn't help that I like to set the contrast on my monitor to high), as you can see in the screenshot below: This was my attempt to…
DBedrenko
  • 4,871
  • 4
  • 38
  • 73