General information
Category:
Forms & Form designer
>I have a form with a grid control on it.
>In the Valid event of one of the column will calling FORM2.
>After the FORM2 was closed,the focus of grid was STILL KEEP on that field,i.e. not advance to next column.
>
>How can I solve this problem ?
>Please kindly comment.
if your valid method returns .f. then you will retain focus on the original control. If you return a value from your called form2 it can be used to change the value property of the control you were on. thisform.control.value = returned_value. If you want to retain focus on your current control you simply call the setfocus method. Thisform.control.setfocus() . Be careful about hte firing order of the methods you are using to set values. The vfp samples have a n example which lists the order in which the methods execute. It is in vfp\samples\solutions project. hth b
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only