FOCUS and Default (OpenInsight 32-bit Specific)
At 26 AUG 2002 07:48:01PM Jonathan Bird wrote:
I have a control that has a default provided by a custom routine.
When using the tab key or mouse to move to the control, the default is calculated and provided. However, when setting the FOCUS property of the window to that control, the default is not calculated. How come? what must I do to make the default calculate?
TIA
JB
At 26 AUG 2002 10:06PM Paul Rowe wrote:
Try setting SYSTEM focus instead - SYSTEM focus generates a gotfocus but the focus property of the Window does not. I think it's in the gotfocus event that the default gets processed.
Paul
At 26 AUG 2002 10:24PM Jonathan Bird wrote:
Thanks, perhaps I should read the help more closely….
J
At 27 AUG 2002 02:10PM Jim Weir wrote:
Johnathan:
Setting focus doesn't trigger the GOTFOCUS event. You must send the event programatically. Eg.
SET_PROPERTY(CTRLENTID,'FOCUS',1)
SEND_EVENT(CTRLENTID,'GOTFOCUS')
Jim Weir
At 27 AUG 2002 08:45PM Jonathan Bird wrote:
Jim,
Thanks for that. But you do not have to use the send_event if focus is given by this statement:
SET_PROPERTY('SYSTEM','FOCUS',CtrlEntId)
So now I have two ways of doing what I need!
J