[wxruby-users] wxComboBox and wxTE_PROCESS_ENTER
Fabio Petrucci
fabio.petrucci at gmail.com
Mon Dec 1 12:31:26 EST 2008
Ok i've found my way:
Now my ComboBox consumes ENTER and TAB keys :)
One more question:
I use window#navigate() to simulate TAB.
calling it by default param is fine even if it doesn't reconize the mapping
constant Wx::NavigationKeyEvent::IsForward
what about if i'd like to navigate backward?
i supposed a constant like Wx::NavigationKeyEvent::IsBackward
but i get an uninitialized constant
Wxruby2::Wx::NavigationKeyEvent::IsBackward
any suggestion?
regards.
bio
On Mon, Dec 1, 2008 at 12:29 AM, Fabio Petrucci <fabio.petrucci at gmail.com>wrote:
> Hi Alex & Mario,
>
> i am working on an invoice form, where the user should be able to fill
> fields using mainly tab, numeric keys and confirm by enter on every field
> he's working on. The basic reason for that, is the user should only type on
> the keyboard avoiding as much as possible using mouse for speed reason.
>
>
> On Sun, Nov 30, 2008 at 7:11 PM, Mario Steele <mario at ruby-im.net> wrote:
>
>> The problem lies in the fact, that Wx::ComboBox has a Drop down, and a
>> Text Edit in it.
>
>
> right.
>
>
>> I believe that Fabio wants the Enter event, so that he can add what a
>> person enters into the Drop Down, if I am understanding correctly.
>
>
> Basically i use Enter to validate user input
>
>
>> The best thing to do, is to monitor evt_keypress
>
>
> Is ComboBox able to trigger keypress event??
>
> On Sun, Nov 30, 2008 at 11:06 AM, Alex Fenton <alex at pressure.to> wrote:
>>
>>> Fabio Petrucc
>>> The fact that setting this style when the control is created suggests to
>>> me that it's not really meant to work like that, and I don't understand
>>> what you're trying to do here. Why do you want a ComboBox that processes
>>> ENTER?
>>>
>>
> The above user inserts hundreds of products a day and he knows exactly
> what vat code to use for that kind of product, without having to choose
> from a dropdown menu. The ENTER is to confirm what he typed.
>
> ComboBox let you do that quite well standardizing behaviour between fields.
>
>
>>> I don't know. I expect if the control is told to consume ENTER, it also
>>> consumes TAB.
>>>
>>>
> Unfortunately, on ComboBox, if you enable enter you loose the opportunity
> to use the tab
>
> thank you both.
>
> bio.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/wxruby-users/attachments/20081201/de88debc/attachment.html>
More information about the wxruby-users
mailing list