Browsing a DbGrid with Mouse wheel lazarus / 31-LCL ---------------------------------------------------------------------- tintinux · 2012-05-22 18:50 Hi With Lazarus 0.9.30.4 On Linux (and also on Windows or with previous versions...) In a DbGrid when I click on a row, it is (obviously) selected. From this point, if I click on VK_DOWN, the previous row is deselected, and other rows will be selected below. But If I use the mouse roller instead, the initial row remain selected, while other rows are selected... More annoying, the new apparently selected row is not belonging to SelectedRows bookmak list. This occurs only when dgMultiSelect=true, and after I first selected one row by clicking. Not without Multiselect or if I don't initially select a row by clicking. Do you think it is a normal behaviour ?  Do you know about a workaround ? ---------------------------------------------------------------------- jesusr · 2012-05-22 20:46 please post a simple project that reproduce the problem. ---------------------------------------------------------------------- tintinux · 2012-05-23 17:55 Hi I have attached a sample program. You will need ZeosLib to compile. It connects to a hosted database, and the connection information are in the dfm. I hope this will help to find a solution. I have checked this occurs both on Linux and Windows, but not with Delphi 2010. I can enter the issue in the bugtracker, but before I would like an advice. Best regards Tintinux ---------------------------------------------------------------------- jesusr · 2012-05-23 19:03 I think I know what you mean now, we have different expectations about this. For sure is not a bug, it's used to browse up/down looking for more rows to select, when you find one, you do CTRL+CLICK and it's added to the set of selected rows. From your description it looks like mouse wheel should work the same as pressing UP/DOWN arrows on keyboard, if it's so then Delphi can't help you to find additional records to select and it will unselect all previously selected rows?. In summary, in Lazarus using mouse wheel on multiselect grid will scroll while on Delphi it will select, is that right?. If so I think is reasonable to have a compatible behavior turned on by an option, if you want, please submit a bug report with a feature request, and I will try to implement it. ---------------------------------------------------------------------- tintinux · 2012-05-29 17:56 Hi Thanks for your answers. After a more carefully checking, I found that Lazarus works exactly as Delphi, leaving a selected row after the mouse wheel is used in multi- select. There is no bug here, and this is great. But like my users, I do not understand this behaviour. When I roll the wheel, I'm expecting to select one row only, exactly as with key down or key up. For me it is not an issue if rolling the mouse wheel reinitialize the selected rows to the one currently pointed, an better than showing a pointed row, not belonging to SelectedRows. May be, with SHIFT or CTRL pressed while rolling, we could select several rows, but this is not really requested. I will try to catch and process a MouseWheel message, if it exists. If there is anything simpler, let me know. But, first, I must put my hands on my Mouse !!! Best regards Tintinux