chpicker
Programmer
- Apr 10, 2001
- 1,316
Sorry about the poor subject, but I couldn't figure out a good way to compress this question.
I created a Grid class. The grid has a property called "cur_rec", which stores the current record (I use the AfterRowColumnChange event to store recno() into this property). The grid's INIT event uses SETALL to set the DynamicFontSize of each column based on the cur_rec property.
The actual line looks like this:
Now...this doesn't make any sense to me. Why do I have to use "This.cur_rec" instead of "This.Parent.cur_rec"? Doesn't "This" refer to the column, not the grid? Cur_rec is a property of the grid, not the column. Using the debugger shows that the DynamicFontSize does, indeed, belong to the column. If I put Parent in there, the expression is invalid, but leaving it out works fine.
As you can tell, I have the code working fine. My question is: why does it work this way? Does anyone know?
I created a Grid class. The grid has a property called "cur_rec", which stores the current record (I use the AfterRowColumnChange event to store recno() into this property). The grid's INIT event uses SETALL to set the DynamicFontSize of each column based on the cur_rec property.
The actual line looks like this:
Code:
This.SetAll("DynamicFontSize","IIF(RECNO()=This.cur_rec,10,9"),"Column")
As you can tell, I have the code working fine. My question is: why does it work this way? Does anyone know?