Jump to content


Photo

ctrl + tab activates OnSelectCell event


  • Please log in to reply
9 replies to this topic

#1 emailaya

emailaya

    Master Member

  • Members
  • PipPipPipPipPip
  • 984 posts

Posted 13 November 2008 - 12:15 AM

hi

when the user presses ctrl+tab keys combination, OnSelectCell event is triggered, why?
dbgrid is multiselect
doBufferRecords is true

tab alone moves the focus to a different component as it should
but ctrl+tab seems to go to procedure TNxCustomGrid.KeyDown(var Key: Word; Shift: TShiftState); event that calls eventually to selectcell

#2 Boki (Berg)

Boki (Berg)

    Boki (Berg)

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

Posted 13 November 2008 - 04:53 PM

Hello Emailaya,

When you press CTRL + TAB, new (previous) cell is selected and this is why OnSelectCell must occur.

Try to set flag aoInficateSelectedCell in AppearanceOptions property and you will notice how it works.

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 emailaya

emailaya

    Master Member

  • Members
  • PipPipPipPipPip
  • 984 posts

Posted 13 November 2008 - 04:59 PM

and how can i prevent this from happening?
i have fullrow mode
moving between cells is irrelevant to me

#4 Boki (Berg)

Boki (Berg)

    Boki (Berg)

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

Posted 13 November 2008 - 08:46 PM

Hello Emailaya,

Try to set workaround and do code in OnSelectCell when row is changed.

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 emailaya

emailaya

    Master Member

  • Members
  • PipPipPipPipPip
  • 984 posts

Posted 13 November 2008 - 09:15 PM

i have a code in OnSelectCell that i need to execute and it does
but i dont want it to be executed when the user presses ctrl+tab
the problem is i dont know what exactly triggered this event

#6 emailaya

emailaya

    Master Member

  • Members
  • PipPipPipPipPip
  • 984 posts

Posted 15 November 2008 - 11:09 AM

mmm.... any idea?

#7 Boki (Berg)

Boki (Berg)

    Boki (Berg)

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

Posted 15 November 2008 - 04:48 PM

Hello Emailaya,

Unfortunatelly not. OnSelectCell occurs when SelectCell method is called, by keyboard, by mouse.

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.

#8 emailaya

emailaya

    Master Member

  • Members
  • PipPipPipPipPip
  • 984 posts

Posted 15 November 2008 - 11:38 PM

no problem with that but still i dont understand why ctrl+tab selects a cell?
there is no relation between the combination and selecting anything

#9 emailaya

emailaya

    Master Member

  • Members
  • PipPipPipPipPip
  • 984 posts

Posted 18 November 2008 - 11:55 PM

QUOTE (Boki (Berg) @ Nov 15 2008, 05:48 PM) <{POST_SNAPBACK}>
Hello Emailaya,

Unfortunatelly not. OnSelectCell occurs when SelectCell method is called, by keyboard, by mouse.

Best regards


i did the following in nxCustomGrid.pas: procedure TNxCustomGrid.KeyDown(var Key: Word; Shift: TShiftState);

VK_TAB: if not (goSelectFullRow in Self.Options) then //if selectfullrow is true, moving inside cells is not relevant
begin
if (ssShift in Shift) then MoveToPrevCell else MoveToNextCell(True);
end;

plz approve or comment this change

#10 Boki (Berg)

Boki (Berg)

    Boki (Berg)

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

Posted 19 November 2008 - 12:52 PM

Hello Emailaya,

I will test it and see if it may fit in official release.

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