Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

simultaneous highlighting of rows and columns in StringGrid

Status
Not open for further replies.

allecos

Technical User
Jul 25, 2010
2
BA
hello,

I am very new to c++ (Borland Builder) programming and I am not sure how to solve this:

When I click on a non-fixed cell in StringGrid1 I want to simultaneously highlight the whole row and the whole column where the cell is located so that clicking cells in the grid has visual effect of some kind of cross-hair emphasizing/following the selected cell.

Can anyone help me with concrete example here?

thank you
 
I've never done it so I can't supply a concrete example but I assume that you will need to find the row and column when you select a cell. You can do this when you call the OnSelectCell (see Using TStringGrid with Graphics). For working with cell, rows, and columns see Working with String Grids and More String Grids. You can also look at Commonly Asked Question #48 from BCBCAQ.



James P. Cottingham
[sup]I'm number 1,229!
I'm number 1,229![/sup]
 
Thanks a lot! I went through all your links.

For the moment I am still not able to make the code work probably because I do not understand it completely (c++, object programming etc is all new to me), but will be trying


 
Can you post your code? If you place your code between code tags, it will be easier for us to read.

Code:
This is some code in a code tag.

Code:
This is some code in a code tag.[ /code]

***Just remove the spaces between the '[' and the '/'.***

Steve.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top