DBGrid Tabbing questions lazarus / 16-Databases ---------------------------------------------------------------------- daveinhull · 2018-12-23 08:41 Hi, I don't want to be able to tab within a DBGrid across fields, but I do want to be able to tab from one DBGrid to another. So I set the tab advance to aaNone and left the TabStop True with the TabOrder 9 on the first DBGrid and the same for the second with a TabOrder of 1. However, it doesn't work, the tab key does nothing. Is there a way to do this without reverting to coding key movements to switch focus between them? Thanks Dave ---------------------------------------------------------------------- dsiders · 2018-12-23 09:30 Quote from: daveinhull on December 23, 2018, 09:41:28 amHi, I don't want to be able to tab within a DBGrid across fields, but I do want to be able to tab from one DBGrid to another. So I set the tab advance to aaNone and left the TabStop True with the TabOrder 9 on the first DBGrid and the same for the second with a TabOrder of 1. However, it doesn't work, the tab key does nothing. Is there a way to do this without reverting to coding key movements to switch focus between them? Make sure the TDBGrid.Options property does NOT include the value goTabs in both grids. ---------------------------------------------------------------------- daveinhull · 2018-12-23 10:31 Hi dsiders, I assume you mean dgTabs, but when I do not include (ie False unset) it still doesn't work - do I also need to set something with TabAdvance? Thanks ---------------------------------------------------------------------- dsiders · 2018-12-23 10:53 Quote from: daveinhull on December 23, 2018, 11:31:06 amI assume you mean dgTabs, but when I do not include (ie False unset) it still doesn't work - do I also need to set something with TabAdvance? You're correct of course... it is dgTabs That's what I get for looking at the documentation. There are a lot of other things that could affect TDBGrid. Does it have an active/opened dataset in DataSource. Is it ReadOnly? AutoAdvance, AutoEdit, TabAdvance, TabStop of course. ---------------------------------------------------------------------- daveinhull · 2018-12-23 11:00 Hi dsiders, Yes it has an active opened dataset in Datasource (but not sure if this would affect it), no not read only, autoadvance = aaRightDown (haven't touched this), TabAdvance (Tried all options), TabStop  True, TabOrder set to a value. Any other thoughts? Thanks for you help Dave ---------------------------------------------------------------------- dsiders · 2018-12-23 11:30 Quote from: daveinhull on December 23, 2018, 12:00:04 pmYes it has an active opened dataset in Datasource (but not sure if this would affect it), no not read only, autoadvance = aaRightDown (haven't touched this), TabAdvance (Tried all options), TabStop  True, TabOrder set to a value. I built a demo just to see if it works. It does, Here's the form that I created. It'll demonstrate the values that worked for me. Code: [Select]                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             ---------------------------------------------------------------------- daveinhull · 2018-12-23 15:26 Hi dsiders, OK, thanks for helping. I looked at your code and found that the differences were: Autoadvance was aaNone hereas I had aaRightDown AutoEdit was False whereas I had True TabAdvance was aaDown whereas I had (tried multiple settings) So I set my setting to the same as your and all I got was the grid moving down a row on tab. I still cannot get it to tab across from one grid to another. Anu other thoughts? Dave