Jump to content


Photo

Key support to change existing column values


  • Please log in to reply
6 replies to this topic

#1 justus

justus
  • Members
  • 36 posts

Posted 11 March 2010 - 07:25 PM

Hi Boki,

I made a small demo program to show the problem my user have.

If a column is focused it seems that there is no way to get the nested editor with text selected. It would be very nice if you could provide a solution for that small problem!
The demo program will show the problem with a short description.

Best regards,
Justus

Attached Files



#2 Boki (Berg)

Boki (Berg)

    Boki (Berg)

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

Posted 11 March 2010 - 08:30 PM

Hello Justus,

I am affraid that I don'r understand the problem. Can you please give me more details.

If your request is to add F2 key, I think that I can add it

Best regards.
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 justus

justus
  • Members
  • 36 posts

Posted 12 March 2010 - 03:58 PM

QUOTE (Boki (Berg) @ Mar 11 2010, 08:30 PM) <{POST_SNAPBACK}>
Hello Justus,

I am affraid that I don'r understand the problem. Can you please give me more details.

If your request is to add F2 key, I think that I can add it

Best regards.


The problem is:
If a column is focused (e.g. backcolor is gray) and the user types e.g. 'a', the content (=text) of the cell get lost and is replaced with 'a'.
Left mouse click will enter cell and select all text, so the user can easily add 'a' at the end of the text. F2 could do same as left mouse click, that would be fine!

If you could provide 'F2' feature, it would be great if you send me the code for a quick 'hotfix'!

Thanks in advance!
Best regards,
Justus

#4 Boki (Berg)

Boki (Berg)

    Boki (Berg)

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

Posted 13 March 2010 - 03:48 AM

Hello Justus,

You may try next code:

CODE
procedure TForm1.NextGrid1KeyDown(Sender: TObject; var Key: Word;
  Shift: TShiftState);
begin
  if Key = VK_F2 then
  begin
    NextGrid1.EditCell(NextGrid1.SelectedColumn, NextGrid1.SelectedRow);
  end;
end;


I think that it done what you need.

Best regards
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.

#5 justus

justus
  • Members
  • 36 posts

Posted 15 March 2010 - 01:27 PM

Hello Boki,

that's it! It works fine, thank you for your quick response.

Btw: Can you also also give me the code that I can use to open the dropdown window in a selected TNxComboBoxColumn via key e.g. F4?


Best regards,
Justus

#6 justus

justus
  • Members
  • 36 posts

Posted 29 March 2010 - 12:21 PM

QUOTE (justus @ Mar 15 2010, 01:27 PM) <{POST_SNAPBACK}>
Btw: Can you also also give me the code that I can use to open the dropdown window in a selected TNxComboBoxColumn via key e.g. F4?

Hi,
Sorry for my inconvenience! May be you just skipped that point of the reply...

I just want to support following keys (common used in windows application)
- Open dropdown window in selected TNxComboBoxColumn with Alt+Down
- Close dropdown window in selected TNxComboBoxColumn with Esc or Return

How can I access the dropdown window that is associated with a TNxComboBoxColumn?

Best regards,
Justus

#7 Boki (Berg)

Boki (Berg)

    Boki (Berg)

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

Posted 06 April 2010 - 07:23 PM

Hello Justus,

Please sorry for big delay, I was miss this topic.

You may access to the PopupControl of Column's Editor. Example:

CODE
  TNxComboBox(NxComboBoxColumn1.Editor).PopupControl


First add NxEdit in uses section.

As far I can see Alt+Down work already smile.gif

Best regards
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.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users