comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: initial keyboard focus, tabbing and keyboard accelerators
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: initial keyboard focus, tabbing and keyboard accelerators [message #41202] Tue, 19 October 2004 01:34 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Benjamin Hornberger writes:

> the keyboard accelerators and tab modes for widgets in IDL 6.1 are a
> good thing to make IDL applications more intuitive and effient. However,
> I still see quite a few limitations.
>
> First, does anybody know if I can specify which widget will get the
> initial keyboard focus when a new window is popped up?

Whichever widget you choose to set the INPUT_FOCUS keyword
on with WIDGET_CONTROL. :-)
>
> It would be great if I could open a popup which is supposed to collect
> some info from the user, and right away the text field had the keyboard
> focus. Then I could just type the value and hit "Enter" to close the
> popup (without having to click into the text field with the mouse first).

You mean without having to program anything. Yes, it would
be great. But, unfortunately, it would throw a massive number
of programmers out of work. For now, we must put up with
programming the whole thing itself. It is only a matter
of setting the focus, and doing the right thing when you
get the Enter event in your event handler. But I've written
many widgets that act as you describe.

> More features which seem to be missing or incomplete (compared to what I
> consider "standard" at least for Windows applications):

Oh, dear. Let's not even talk about Windows. It is clear
to me after only a month in Europe that LINIX is talking
over the world. :-)

> 1. When I tab into a text field which already has something written in
> it, I would like the existing text to be highlighted already, so that I
> can just overwrite it.

When you get a keyboard focus event in your text widget (you
set it up to do so, right?), then use the SET_TEXT_SELECT
keyword with WIDGET_CONTROL to select whatever text is there.

If you compile fsc_field.pro you will find an example program
at the bottom. Run that and tab between the three text fields
to see what I mean.

> 3. Similarly, I would like text fields (like cw_field or David's
> fsc_field) where I can have one letter in the label underlined. If "Alt"
> plus that letter are pressed, the keyboard focus should jump into the
> text field, and the existing text should be highlighted. This actually
> applies in a similar fashion to all widgets which have a label, like
> sliders, droplists etc.

With the exception of the underlined letter, I think this functionality
can be implemented now. I agree, an underlined letter would be nice,
and make it in color too, as long as you have the code opened up. :-)

> 4. Currently, with tab mode activated, buttons with a bitmap label
> (rather than a text label) don't show visually if they have the keyboard
> focus (are tabbed onto). Buttons with a text label show a dotted
> rectangle on them if they have the keyboard focus.

Tabs on Windows machines beep their heads off at you. What's up with
that!? Annoying as hell. Had to turn all the sounds off on my computer
to deal with it. Now that I think about it, keep that in.

Cheers,

David

--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http:/www.dfanning.com/
Phone: 970-221-0438, IDL Book Orders: 1-888-461-0155
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Re: Concatenate arrays
Next Topic: Re: Hang on! Re: initial keyboard focus, tabbing and keyboard accelerators

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 09:53:34 PDT 2025

Total time taken to generate the page: 0.16026 seconds