| To: | REALbasic NUG <realbasic-nug at lists dot realsoftware dot com> |
|---|---|
| Subject: | Re: The Case of the Canvas Toogle Focus |
| From: | Arnaud Nicolet <arnaud at tribu dot ch> |
| Date: | Tue, 27 Feb 2007 16:26:11 +0100 |
| Delivered-to: | listarchive at realsoftware dot com |
| Delivered-to: | realbasic-nug at lists dot realsoftware dot com |
| References: | <20689483 dot 123661172588770023 dot JavaMail dot www at wwinf1636> |
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> |
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | About the new Toolbar, Emile SCHWARZ |
|---|---|
| Next by Date: | Re: REALSQLDatabase query returns more rows than I wanted [SOLVED], Youri |
| Previous by Thread: | The Case of the Canvas Toogle Focus, Emile SCHWARZ |
| Next by Thread: | Re: The Case of the Canvas Toogle Focus, Emile SCHWARZ |
| Indexes: | [Date] [Thread] [Top] [All Lists] |