>Can I do something like this? I'm not having success with the syntax or object oriented references!
>If index = lastname
> this.column1.header1=rgb(255,0,0)
First, it should be this.column1.header1.
BackColor=rgb(255,0,0)
Second, this particular syntax will work in case you address it this way from the Grid object.
You may use full hierarchy and address the header starting with the Form.
thisform.GridSearch.column1.header1.BackColor = rgb(255,0,0)
>
>OR
>
>in the header.click()
>just set the color
>and reset the other heading's colors? I just can't get the right syntax to refer to the other columns.
* Header.Click()
this.parent.parent.SetAll("BackColor", RGB(192,192,192), "Header") &&
reset all headers to grey backcolor. *
this.parent.parent relative to header means reference to the Grid objectthis.BackColor = RGB(255,0,0) &&
set the current header backcolor to Red
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro
"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison