octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #54942] implement uicontrol focusing behavior


From: Pantxo Diribarne
Subject: [Octave-bug-tracker] [bug #54942] implement uicontrol focusing behavior
Date: Sun, 4 Nov 2018 14:37:15 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:62.0) Gecko/20100101 Firefox/62.0

Follow-up Comment #4, bug #54942 (project octave):

@Rik:
>> What is this piece of code?
This was indeed debugging leftover, thaks, I pushed the patch here:

http://hg.savannah.gnu.org/hgweb/octave/rev/80c8062e855a

>> I thought that if the button had the focus and I typed <RETURN> that the
button would be activated

No, this just gives this uicontrol (widget) the keyboard focus. As a result it
is this widget that will receive keyboard events and have a chance to handle
them.
Now if you want the uicontrol to react on <return> entry you need to provide a
corresponding "keypressfcn", e.g.


function keypress (h, ev)
  if (strcmp (ev.Key, "return"))
    close (gcbf ())
  endif
endfunction

uicontrol ("keypressfcn", @keypress);



    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?54942>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]