Changing default button on-the-fly (OpenInsight Specific)
At 13 FEB 2002 10:23:52AM Richard Channer wrote:
Hi guys,
I am changing the default button on a form, which works OK.
(.BTN_SELECT-]DEFAULT=1)
However, the 'heavy outline' is not displayed, so it is never clear which button is the current default. Is it possible to make this happen?
Richard Channer
Medicode Ltd
At 13 FEB 2002 11:02AM Donald Bakke wrote:
Richard,
When you call this code, does another button have focus? If so, the heavy line won't appear on the new default button until you move off of the button and onto an edit control.
dbakke@srpcs.com
At 13 FEB 2002 11:43AM Rich Channer wrote:
Thanks, setting the focus elsewhere does create the heavy outline on my new default button. However, the button which was previously set to default still has a heavy outline, so you then get 2 buttons with heavy outlines!
So what I have done, is whenever I need to set a new default button, loop through all other 'potential' default buttons, and set focus to them, finally setting focus to the relevant control. This has the effect of removing the unwanted heavy outline from the previous button.
Thanks for your help,
Richard