[EMAIL PROTECTED] wrote:
> I am trying to have a control which knows it has been tabbed out of.
> 
> Explanations may cloud the issue. For reasons beyond my control, the
> client has specifications. I end up in this situation: There are only
> three enabled controls on a form
> 
> 1. MyControl
> 2. A cancel button
> 3. The system X close window
> 
> MyControl.OnExit(sender:TObject)
> ... Sender is always MyControl
> ... Active Control is always the Cancel button. Nowhere else to go.
> ... Can detect X close okay

Why have an input control when whatever I enter is going to get canceled?

> Both blank and non-blank data are valid. The contents of the control
> provide no clue.
> 
> When focus leaves the control (occurs before btnCancel.OnEnter), how do I
> determine  that the user clicked cancel rather than tabbing out of the
> control?

Why does it matter? There's nowhere else to tab to anyway.

> Next case, similar, but multi-part key. Two controls and one cancel button.
> 
> Final case, all forms across the application behave similarly. This is not
> a one-time kludgde but a specification for how the application functions.
> I desire strongly to hide this logic in the control or the base form.

You're also hiding it from the rest of us. You haven't told us how the 
application is supposed to function.

> A simpler solution would be grand.

A simpler solution to what problem? You haven't told us anything about 
the problem you're trying to solve. All you've told us is that you think 
that knowing how a control lost focus will let you solve that problem.

-- 
Rob

Reply via email to