Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Active record in grid
Message
From
20/10/1997 13:36:12
Sonny Chouinard
CHCA Computer Systems Inc.
Lachenaie, Quebec, Canada
 
 
To
20/10/1997 11:42:25
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00055505
Message ID:
00055567
Views:
30
>>>This question has been asked a few times before, but since I have never had to do it, I don't remember how.
>>>I need to highlight the entire row of a grid when the record is selected. What do I put in the dynamicbackcolor to tell the control that it's record is selected?
>>
>>Use the following command in the init method of the grid!
>>THIS.SetAll("DynamicBackColor","IIF(THISFORM.grdRecNo == RECNO(),RGB(128,128,128),RGB(255,255,255))","Column")
>>
>>In the ActiveRowColChange method
>>THISFORM.grdRecNo= RECNO("myTable")
>>THIS.Refresh()
>
>Thanks, Sonny. I had forgotten that it takes an external variable. I decided to put the property in the grid instead of the form, though, to keep things more OO.
>Here's another one for you (or anybody else):
>How to give the selected box the same color as its selected brothers? To rephrase:
>all of the controls in my grid are readonly, and I want to give the impression that it oesn't matter which column is clicked on, only the row, so I would like the selected row and column's control to have the same properties as the unselected columns. Ever done this?

Ok, I`ve had some problems with that but you can put the back color of the textbox
the same color than the selected row. And/or the backstyle property to transparent.
Previous
Reply
Map
View

Click here to load this message in the networking platform