?
Solved

StringGrid Drag selection

Posted on 2003-03-20
6
Medium Priority
?
319 Views
Last Modified: 2010-04-04
Hello,

I have a 7 by 1 string grid in place in my application that allows users to indicate which days of the week are applicable by selecting individual cells. When a user selects a cell it toggles its colour to indicate the change.

I would like to expand this to allow users to drag the mouse over the cells they would like to select, so the stringgrid changes all cells that fall under the mouse drag motion.

Any suggestions on how I can achieve this with a TStringGrid would be great.

Thanks,

Matt
0
Comment
Question by:mattlaver
[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
  • 2
6 Comments
 
LVL 27

Expert Comment

by:kretzschmar
ID: 8172592
? this does the tstringrid without any additional code

just do a try

meikl ;-)
0
 
LVL 1

Author Comment

by:mattlaver
ID: 8173390
Well no quite, this method only selects the first cell that the mouse was clicked on. It does not select the other cells, even though they are highlighted.

This is true when 'goRangeSelect' is set to True.

I need to capture in my program which cells have been ranged selected so I can paint them a diffrent colour.

I imagine this can be done with one of the events on the TStringList, however am unsure how to do this.
0
 
LVL 27

Accepted Solution

by:
kretzschmar earned 500 total points
ID: 8173462
you can lookup the selection-property
in your paint-routine
0
 

Expert Comment

by:CleanupPing
ID: 9316667
mattlaver:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Suggested Courses

801 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