Re: Highlight default button [message #70227] |
Fri, 26 March 2010 07:51 |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
LNpellen writes:
> I'm trying to modify CW_FORM to have a default focus on a button or a
> text-field. I have succeeded with the text-fields. For the buttons I
> think I have the focus correct because pressing space bar works, but
> there is no highlight or dotted line around the text to indicate which
> button have the focus and I'd prefer to press Return or Enter instead.
>
> I found a thread in this group from 2000 where the answer was that
> this is not possible with Windows. Is it still so in 2010? The
> dialog_message type Question have this correct so I cannot understand
> why this should not be possible for all buttons in IDL. I tried to
> find the dialog_message source code to copy code, but did not succeed.
You can't find it because it is not there. IDL is using
different calls to OS-specific functionality in the
dialogs, and that is not exposed to us using widgets.
In Windows 7, anyway, when you set the INPUT_FOCUS to a
button, the button gains a thin, almost unnoticable,
dashed line just inside the button boundary that will
distinguish it from other buttons. (I had to look twice
to find it!) AFAIK, there is no way to change the action
from the space bar to anything else.
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|