Jump to content


Photo

TNxButton


  • Please log in to reply
2 replies to this topic

#1 Alexandr

Alexandr
  • Members
  • 21 posts
  • Gender:Male

Posted 01 March 2013 - 09:25 PM

Hello!
I have problem:
if NxButton is focused and key press Enter, then "TNxButton.KeyDown" and "TNxButton.KeyUp" procedure not executed.
If press Space button, then all ok.

How fix it?

#2 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,191 posts
  • Gender:Male

Posted 02 March 2013 - 08:03 AM

Hm, very strange. I am having one thing in my mind.
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.

#3 Boki (Berg)

Boki (Berg)

    Boki (Berg)

  • Forum Admin
  • PipPipPipPipPip
  • 8,191 posts
  • Gender:Male

Posted 02 March 2013 - 08:08 AM

Hello,

Please comment next line in NxCollection.pas:


procedure TNxButton.CMDialogKey(var Message: TCMDialogKey);
begin
  with Message do
  begin
    if Enabled
      and (((CharCode = VK_RETURN) and FActive) or ((CharCode = VK_ESCAPE) and FCancel))
      and (KeyDataToShiftState(Message.KeyData) = []) then
    begin
      Click;
///      Result := 1;
    end else inherited;
  end;
end;

I hope that I didn't broke something.
boki@bergsoft.net | LinkedIn Profile
--
BergSoft Home Page: www.bergsoft.net
Users Section: users.bergsoft.net
Articles and Tutorials: help.bergsoft.net (Developers Network)
--
BergSoft Facebook page
--
Send us applications made with our components and we will submit them on: www.bergsoft.net/apps.htm. Link to this page will be also set on home page too.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users