>>>I have a form in DOS that has acces to a modal find form. It can be from a push button either by a keystroke ( enter key or hot-key ) or by clicking with the mouse. Unfortunately when using the mouse the first selected array popup is not highlighted, so that the user is not sure where they are on the form. If I use a keystroke, this does not happen.
>>
>>Dan,
>>
>>Is the initial value of the popup set in the setup code? If not, this might cause this sort of behavior.
>>
>>hth,
>>
>
>*The array apopdata with the field names selected from the current tag.
>*cKeyString is assigned the first value of the array.
>*Typically "SMITH, JOHN"
>
>
>@ 4,2 GET cKEYSTRING ;
> PICTURE "@^" ;
> FROM aPOPDATA ;
> SIZE 3,33 ;
> VALID _rau129490() ;
> COLOR SCHEME 5, 6
>
>
>* I'm only showing one object. But cKeyString is the 2nd object.
>
>READ CYCLE MODAL OBJECT 2
>
>*I tried your modification but it still does not hilight when the
>*find push button is activated with the mouse.
Only two thoughts:
One, when working with arrays, I've always used the array subscript as the variable. Naturally, if _TALLY returns 0, the popup is disabled.
Two, and this is a bit of a trick, you could use _CUROBJ to initially set the focus to the popup, then in it's when clause, set a variable to send the focus to the first object on the screen, and indicate that this had already been done. Some like
IF NOT m.setfocus
m.setfocus = .T.
_CUROBJ = 1
ENDIF
An admitted kludge, but...
hth,
George
George
Ubi caritas et amor, deus ibi est