Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. CO+1. In addition to your edit based on Remy's comment: Since the question asked about a specific *cell*, you should probably show how to change only one cell by using the `ACol` and `ARow` parameters (and maybe explain the call to `InflateRect` - as a suggestion, though, you don't need a separate var; you can directly pass `Rect` to `InflateRect`, since it's not declared as a `const`).
      singulars
    2. CO@Ken I added some more explanations and the cell check. Initially I was tempted to give "use another component providing more formatting features" as the real answer as I find custom drawing always a bit dangerous because it might destroy the native look and feel. It is probably better to draw all cells custom than to risk that the other cells somehow look differently. And regarding the Rect: I am cautious. Maybe somebody decides to add code to the end of the method using Rect, unaware of the change I made to the values.
      singulars
    3. COHeinrich, the asker should know when changing it that they're modifying the `Rect`. If someone else is changing it, they should be reading the existing code before doing so. :) Nice edits - it makes the answer more self-explanatory to someone new to Delphi that finds this answer in a search. Re: cell color, you can handle drawing the default look by checking for fixed rows and cols and skipping them, using `clWindow` and `clWindowText` (or `clHighlight` and `clHighlightText` depending on `State`), and basically by calling only `InflateRect` and `TextRect` if the cell is NOT to be drawn.
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload