Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

TStringGrid:  Selecting cells programmatically

Posted on 1997-06-06
1
Medium Priority
?
2,334 Views
Last Modified: 2012-06-21
Now that Borland has removed any examples from the Help system I get a little lost on how to do things -- even the most simple.  How do you select a series of cells in a TStringGrid programmatically?
0
Comment
Question by:bedner
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 

Accepted Solution

by:
brittain earned 40 total points
ID: 1336846
The Selection property takes a TGridRect parameter for highlighting the correct value you moron.

To access its member you can reference the various properties or maybe right a handy helper routine like:

function TForm1.DoSelect( l, t, r, b : integer ) : TGridRect;
begin
  with Result do begin
    Left := l;
    Top := t;
    Right := r;
    Bottom := b;
  end;
end;

procedure TForm1.Button1Click(Sender: TObject);
begin
  StringGrid1.Selection := DoSelect( 1,2 , x2,y2 );
end;

0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…

670 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question