>Hi to all.
>
>Maybe this is a newbie question but I would like to know how can I identify wich textbox is selected in a grid control.
>
>Thanks in advanced.
Think this should work. Needs a bit of extra code if DynamicCurrentControls are involved.
_ActiveControl = TheGrid && thisform.PageFrame1.Pages(1).OrderGrid
_ActiveColumn = _ActiveControl.ActiveColumn
if( !empty(_ActiveColumn) )
for i = 1 to _ActiveControl.ColumnCount
x = _ActiveControl.Columns[i]
if( x.ColumnOrder == _ActiveColumn )
exit
endif
endfor
for i = 1 to x.ControlCount
if ( x.Controls[i].Name == x.CurrentControl )
_ActiveControl = x.Controls[i]
exit
endif
endfor
endif
return _ActiveControl
Gregory