COMBOBOX and ON KEY

Moderator: Rathinagiri

Post Reply
Ricci
Posts: 255
Joined: Thu Nov 19, 2009 2:23 pm

COMBOBOX and ON KEY

Post by Ricci » Mon Oct 10, 2011 4:02 pm

Usally I use the ESC and Ctrl-S keys to do the same as pressing the OK or Cancel-button in my program when the user is changing some data.

Code: Select all

ON KEY ESCAPE    of Form_x action DoSomething( Form_x )
ON KEY CONTROL+S of Form_x action DoSomethingElse( Form_x )
That works in all cases except if a COMBOBOX control has the focus. In this case only ESC ist working, Ctrl-S not.
I found nothing in combobox.prg that can cause this, so it must be deeper (in CONTROL or BASIC class?). Any idea?

mrduck
Posts: 497
Joined: Fri Sep 10, 2010 5:22 pm

Post by mrduck » Mon Oct 10, 2011 6:47 pm

Ricci wrote: I found nothing in combobox.prg that can cause this, so it must be deeper (in CONTROL or BASIC class?). Any idea?

Combobox intercepts keys and probably it uses ctrl-S for something... can you please try to set another key, like F9, or P... just to see if it a specific ctrl-S problem

Ricci
Posts: 255
Joined: Thu Nov 19, 2009 2:23 pm

Post by Ricci » Mon Oct 10, 2011 7:43 pm

F9 is working, Ctrl-P not.

I think we can´t do anything in that case, it´s a "future" of QComboBox() that interprets Strg+Key as a normal keystroke that do only a search in the combobox list.

mrduck
Posts: 497
Joined: Fri Sep 10, 2010 5:22 pm

Post by mrduck » Mon Oct 10, 2011 8:09 pm

Ricci wrote:F9 is working, Ctrl-P not.

I think we can´t do anything in that case, it´s a "future" of QComboBox() that interprets Strg+Key as a normal keystroke that do only a search in the combobox list.
Yes nothing "simple" to implement....

Post Reply