darrellblackhawk
Programmer
Hello:
I've got an interesting problem that hopefully someone has
encountered already.
I have a grid on a form with 3 columns.
The columns types are: DateTime, Text, and Date.
In the init() method of the grid I have the following code:
[tt]
This.ADDPROPERTY("aDeletedRecs[1,1]",0)
This.addproperty("nDeletedRecs",0)
This.addproperty("nCurRec",1)
This.addproperty("nStartUp",0)
This.SetAll("DynamicBackColor", ;
"IIF(recno(this.recordsource)==this.nCurRec, RGB(0,255,0), RGB(255,255,255))", "Column")
This.SetAll("DynamicForeColor", ;
"IIF(recno(this.recordsource)==this.nCurRec, RGB(255,0,0), RGB(0,0,0))", "Column")
this.columns(3).DynamicCurrentControl = "Thisform.SetExtraDate(eval(this.columns(2).controlsource))"
[/tt]
The first two dynamic column properties just set the
foreground and background of the current grid row.
The last dynamic property calls on a form method
(SetExtraDate()) that determines if the value contained
in column2 is of a certain class of values and switches
the column3 control to either text1 or nothing.
This all works perfectly and is very fast.
The problem is when the DynamicCurrentControl property is
used and the textbox in column3 gets the focus, the
insertion point is invisible but otherwise the control
behaves normally.
I wrote a function that gathers all of the properties of
both the column and the textbox before and after the
DynamicCurrentControl property is defined, but there is
nothing different; other than the DynamicCurrentControl
property.
Any ideas?
Darrell
I've got an interesting problem that hopefully someone has
encountered already.
I have a grid on a form with 3 columns.
The columns types are: DateTime, Text, and Date.
In the init() method of the grid I have the following code:
[tt]
This.ADDPROPERTY("aDeletedRecs[1,1]",0)
This.addproperty("nDeletedRecs",0)
This.addproperty("nCurRec",1)
This.addproperty("nStartUp",0)
This.SetAll("DynamicBackColor", ;
"IIF(recno(this.recordsource)==this.nCurRec, RGB(0,255,0), RGB(255,255,255))", "Column")
This.SetAll("DynamicForeColor", ;
"IIF(recno(this.recordsource)==this.nCurRec, RGB(255,0,0), RGB(0,0,0))", "Column")
this.columns(3).DynamicCurrentControl = "Thisform.SetExtraDate(eval(this.columns(2).controlsource))"
[/tt]
The first two dynamic column properties just set the
foreground and background of the current grid row.
The last dynamic property calls on a form method
(SetExtraDate()) that determines if the value contained
in column2 is of a certain class of values and switches
the column3 control to either text1 or nothing.
This all works perfectly and is very fast.
The problem is when the DynamicCurrentControl property is
used and the textbox in column3 gets the focus, the
insertion point is invisible but otherwise the control
behaves normally.
I wrote a function that gathers all of the properties of
both the column and the textbox before and after the
DynamicCurrentControl property is defined, but there is
nothing different; other than the DynamicCurrentControl
property.
Any ideas?
Darrell