Hi,

Why don't you simply write:

if Self.Focus=me then
ClearFocus
else
Me.SetFocus
end if

Le 27 févr. 07 à 16:06 Soir, Emile SCHWARZ a écrit:

>   // Toogle the focus ring
>   Dim theCanvas As Canvas
>
>   // Compute if the Focus is set to a Canvas
>   If Self.Focus IsA Canvas Then
>     // Cast Canvas Control who have the Focus
>     theCanvas = Canvas(Self.Focus)
>   End If
>
>   // Clears or set the Focus
>   If theCanvas = Me Then
>     // Ask the Window to clear the focus
>     ClearFocus
>   Else
>     // Ask the Canvas to set the focus
>     Me.SetFocus
>   End If

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to