Tab key behaviour
#1
Posted 31 July 2014 - 05:10 PM
I upgraded Next Suite yesterday
and inside a NextGrid Object, the tab key behaviour works differently
with older version, the tab key permitted to exit from any cell in edit mode
that does not work with actual version - and cursor stays in the editing cell
how can I obtain the classical behaviour of the tab key
Thanks for your helps
#2
Posted 01 August 2014 - 10:13 PM
Can you please tell me do you have try to set WantTabs property to True?
--
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
Posted 02 August 2014 - 12:09 AM
Thanks for your answer
Yes - WantTabs property is set to true
I tried with a full new project - new nextgrid with 5 columns...
I set nextgrid WantTabs & TabLeaveControl properties to true and each coEditing option for columns to true
I can enter in any cell, that's OK
when I click in a cell, it's ok to modify it, but Tab key does not permit to go to the next cell ....
in previous version I used - that was OK
Thanks for your helps
#4
Posted 04 August 2014 - 01:37 PM
I can confirm the same issue (Next Suite 5.9.20).
I'm not sure it has been introduced with the last release since I've upgraded from Next Suite 5.9.6.
It isn't catastrophic, but it slows down keyboard-oriented users. Do you have a quick fix?
Thank you
#5
Posted 04 August 2014 - 09:53 PM
I think that I have fixed it. Please check tomorrow for updated version.
Best regards
--
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.
#6
Posted 06 August 2014 - 10:40 AM
except when using the tab key, the focus goes to next field
with a beep sound
is it possible not to have this beep sound
Thanks again
#7
Posted 14 August 2014 - 06:38 AM
I will definitely like to remove it, but I am not sure what causes it (!?). I hope that I will be able to find it.
--
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.
#8
Posted 14 December 2014 - 01:58 AM
Do deactivate the sound (very annoying!! Searched for a workaround in current version — Dec 2014 — several hours) you can try this:
Add to OnKeyPress Event of Grid this code:
if (Key = #13) then
Key := #0;
if (Key = #9) then
Key := #0;
I found this hint in a German forum, dated January, 2004
It works in Delphi XE7 and should work in older versions (s. hint date), too.
#9
Posted 14 December 2014 - 01:04 PM
Thank you very much.
I will implement it.
I will try to add such code in my class.
--
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.
#10
Posted 14 December 2014 - 01:30 PM
Hi,
This is the code I have changed. Please tell me how is working. Also if anyone else may test this will be great:
procedure TNxCustomGrid.KeyPress(var Key: Char); begin inherited; { 2/23/07: don't react when grid is in edit state } if (gtEdit in GridState) or (gtInput in GridState) or (goDisableKeys in Options) then Exit; if Key = #27 then Exit; if Key = #13 then begin if WantReturns then begin if InputSelected then begin if InputEnterMode = imAllways then begin ApplyEditing; if Assigned(InplaceEdit) then begin InplaceEdit.Text := ''; end; AddRowFromInput; if InputingColumn <> -1 then begin InplaceEdit.Text := Columns[InputingColumn].InputValue; InplaceEdit.SelectAll; end; end; end else begin case SelectionMoveDirection of mdDown: MoveSelectionDown; mdUp: MoveSelectionUp; mdLeft: MoveSelectionLeft(mkEnter); mdRight: MoveSelectionRight(mkEnter); end; end; end; { Prevent Beep sound } Key := #0; end; if not Columns.Exists(SelectedColumn) then Exit; if not InputSelected and not RowExist(SelectedRow) then Exit; if Assigned(Columns[SelectedColumn].Play) and not ReadOnly and not InputSelected then { TColumnPlay } begin if ((coEditing in Columns[SelectedColumn].Options) or (csClickable in Columns[SelectedColumn].ColumnStyle)) and UpdateColumnPlay(SelectedColumn, SelectedRow, GetCellRect(SelectedColumn, SelectedRow), True) then Columns[SelectedColumn].Play.KeyPress(Key); end; if (Key = #13) or (Key = #9) then begin // Key := #0; // causes a problem when closing NxComboBox popup Exit; end; if Columns[SelectedColumn].IsKeyValid(Key) then begin if InputSelected then StartInput(SelectedColumn, Key) else StartEdit(SelectedColumn, SelectedRow, Key); end; if not InputSelected and not(coEditing in Columns[SelectedColumn].Options) then if (GetSearchColumn <> nil) and (RowCount > 0) then begin FSearchTimer.Enabled := False; FSearchTimer.Enabled := True; FSearchBuffer := FSearchBuffer + Key; SearchNext(GetSearchColumn.Index, FSearchBuffer); end; end;
--
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.
#11
Posted 16 December 2014 - 10:06 AM
Hi.
Short test → does not finally work as expected, because TAB-key still „beeps“. As I can see in the code, there was a solution implemented but is commented:
if (Key = #13) or (Key = #9) then begin // Key := #0; // causes a problem when closing NxComboBox popup Exit; end;
This is a little bit useless, because a few lines above #13 is set to #0. Maybe reducing it to #9 and uncomment Key... will work without problems noted in the comment but I have no time to check this.
#12
Posted 16 December 2014 - 06:00 PM
Hi,
Change this code with only #9 checking:
if Key = #9 then begin Key := #0; Exit; end;
--
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