Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How can I make grid.text1 transparent?
Message
From
27/06/2001 10:27:40
 
 
To
27/06/2001 10:00:36
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00524094
Message ID:
00524117
Views:
15
Hi!

Probably you're doing rows highlighting by different colors by using DynamicBackColor, so I suggest you already familiar with approach.

Adjust the expression of the DynamicBackColor for each column so it colors rows for all rews in grid but current. To do this, add code to AfterRowCloChange:
if thisform.nRecNo<>recno(this.RecordSource)
  thisform.nRecNo = recno(this.RecordSource)
  this.Refresh
endif
Add nRecNo property to the form. You can add it to the grid class if you want or to the grid in run-time using AddProperty. Note that initial value of property should be set to 0 and refreshed by recno() in grid.Init and refreshed any time you change record pointer in the grid alias in code.

Than your DynamicBackColor expression assignment will look like following:
grid.Column1.DynamicBackColor = "iif(thisform.nRecNo=recno('" + grid.RecordSource + "')," + ;
   allt(str(grid.BackColor)) + ", <your original DynamicBackColor expression>)
If you use property of the grid to track last current row, it will look like following:
grid.Column1.DynamicBackColor = "iif(this.nRecNo=recno('" + grid.RecordSource + "')," + ;
   allt(str(grid.BackColor)) + ", <your original DynamicBackColor expression>)
HTH.

>I'm developing in VFP 5.0, and have a grid that has rows appear in either red or green depending on a setting in the table that the grid is based upon. That functionality is working fine.
>
>My problem is that I would like a row to remain its original color when selected, but I can't figure out how to do that. According the the VFP online help, if I set grid.text.BackStyle = 0, then the grid.text.BackColor is ignored and the color should be transparent, but I'm still picking up whatever color I have listed in the BackColor property.
>
>Any ideas would be greatly appreciated!
>
>Thanks in advance --
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Previous
Reply
Map
View

Click here to load this message in the networking platform