Components for Delphi and C++ Builder.

Go to Russian forum
Go to EhLib.com
It is currently 28 Mar 2024, 14:47

All times are UTC




Post new topic Reply to topic  [ 8 posts ] 
Author Message
PostPosted: 18 Sep 2018, 18:37 
Offline

Joined: 31 Aug 2018, 19:06
Posts: 92
Hi, I select column with checkbox active, but keyboard not work(space key),
first must select cell with mouse then can change checkbox state with keyboard
I use SelectedIndex for select column


Top
 Profile  
 
PostPosted: 20 Sep 2018, 07:43 
Offline

Joined: 08 May 2014, 18:06
Posts: 660
Hello

You can write TDBGridEh.OnKeyPress event like this

Code:
procedure TForm1.DBGridEh1KeyPress(Sender: TObject; var Key: Char);
begin
  DBGridEh1.SelectedRows.CurrentRowSelected := not DBGridEh1.SelectedRows.CurrentRowSelected;
end;


May be also remove dghClearSelection from OptionsEh

_________________
Best regards
EhLib Support Team


Top
 Profile  
 
PostPosted: 25 Sep 2018, 08:07 
Offline

Joined: 31 Aug 2018, 19:06
Posts: 92
your code not work & Not relevant to my question.
after change field(column) with SelectedIndex to boolean field(checkbox), selected field changed but focus not change(Caret cursor) & must click with mouse, then you can change with keyboard checkbox state(with space key)


Top
 Profile  
 
PostPosted: 26 Sep 2018, 01:21 
Offline

Joined: 08 May 2014, 18:06
Posts: 660
Hello

Do you put focus on the grid

Code:
  DBGridEh1.SelectedIndex := 5;
  DBGridEh1.SetFocus;

_________________
Best regards
EhLib Support Team


Top
 Profile  
 
PostPosted: 26 Sep 2018, 04:28 
Offline

Joined: 31 Aug 2018, 19:06
Posts: 92
No, Grid Has focused,
my question is about column, i change selected column by "SelectedIndex ", but about column with checkbox capability, Real focus not change from one column to this column,
you should click by mouse then you can change checkbox state(in column) with keyboard(space key)


Attachments:
Sample.png
Sample.png [ 793 Bytes | Viewed 1441 times ]
Top
 Profile  
 
PostPosted: 26 Sep 2018, 11:53 
Offline

Joined: 08 May 2014, 18:06
Posts: 660
Hello

We can't reproduce the problem.
Could you send your dfm+pas file here or to the support@ehlib.com.
Or can you reproduce the problem in one of standard EhLib Demos.

_________________
Best regards
EhLib Support Team


Top
 Profile  
 
PostPosted: 26 Sep 2018, 13:12 
Offline

Joined: 31 Aug 2018, 19:06
Posts: 92
Hi,
Yes,
In MainDemo--->FrameMainGrid:
plz change in OptionsEh: remove dghRowHighlight & Select dghEnterAsTab
Now, move on column by enter, after select "Preferred", try checked checkbox by keyboard(space key)
you can not change state key, until click by mouse on this column, After this you can change checkbox state by keyboard(space key)


Top
 Profile  
 
PostPosted: 01 Oct 2018, 21:17 
Offline

Joined: 08 May 2014, 18:06
Posts: 660
Hello

MainDemo--->FrameMainGrid is not a good example because the Grid have dghPreferIncSearch in OptionsEh.
It try to search char that you press on the keyboard rather than perform Edit operation (Lake open Editor or change CheckBox state).
Then you click on checkbox by mouse you put Grid into edit mode. IncSearch is disabled in Edit mode.

_________________
Best regards
EhLib Support Team


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 59 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group