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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How To Get ... Grid.highlightbackcolor to fire 1

Status
Not open for further replies.

jtlodi

Programmer
Mar 8, 2002
11
0
0
US
I have a grid on a form and with a data environment setup. When run the grid populates properly.

When the form is first displayed, the record pointer is pointing to the first record shown in the grid.

I have changed the grd.backcolor to a light green.

The grd.highlightbackcolor is set to white (255,255,255).

When I click into the grid to choose a particular record, the grd.highlightbackcolor is activated and the white highlightbackcolor is visible as one would expect.

QUESTION:
When the grid is first visible, the record pointer is pointing to the top record. I'd like to have the highlightbackcolor to be activated at this time also without having to click into the grid.

How might I do this?
 
Put the code in the INIT method of the grid.

Brian
 
Hi jtlodi

When you run the form, you have the focus not in the grid. Then you get the focus to the grid by click on the grid which produces the desired color.

SO imitate this...

In the forms init event.. add the code..

ThisForm.Grid1.SetFocus()
Then to put the focus to whatever you want..
ThisForm.(whatever).SetFocus()


____________________________________________
ramani - (Subramanian.G) :)
 
Thank you for the reply ... of course it took care of my problem ... can I buy you guys a beer sometime?

Jim
(jtlodi)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top