[SOLVED] shift key doesn't work??? lazarus / 9-Editor ---------------------------------------------------------------------- majid.ebru · 2018-03-08 11:07 Hi i updated lazarus 1.8. in old version(lazrus 1.6) , in object inspector i select first object then hold down shift key then i select last object. with shift key i select many objects. but in lazarus1.8 shift key doesn't work?!? can anyone help or guide me?!?! thank you ---------------------------------------------------------------------- Handoko · 2018-03-08 12:28 It Ctrl key works correctly here on my Lazarus 1.8.0 64-bit Linux Gtk2. But Shift key does not work. ---------------------------------------------------------------------- Thaddy · 2018-03-08 12:32 Platform? ---------------------------------------------------------------------- rvk · 2018-03-08 12:39 Here on Windows with trunk it also doesn't work (if I understand the problem correctly). With holding CTRL you can select multiple objects in the object inspector individually (not sequential). With holding SHIFT you should be able to select a range. Select one (holding SHIFT) and then select the last (still holding SHIFT). This last selection process doesn't work in Windows Lazarus trunk. ---------------------------------------------------------------------- Thaddy · 2018-03-08 12:42 Rik, can you post a minimal example? ---------------------------------------------------------------------- rvk · 2018-03-08 12:46 It's in the Object inspector of Lazarus itself (so I can't make an example). Open Lazarus with a new project. But several buttons on a new form. At the left you see the buttons in the Onject Inspector. Now SHIFT click the first. and SHIFT click the last. As I understand it, all in between should be selected. Is that correct? Just like in the Windows Explorer? I haven't got Lazarus 1.6.4 here anymore so I can't check if it worked there. ---------------------------------------------------------------------- rvk · 2018-03-08 12:54 I just installed 1.6.4 and indeed, there the SHIFT click works as expected/described. I'll look into mantis to see if it's already there and otherwise add it. ---------------------------------------------------------------------- rvk · 2018-03-08 13:05 And, O wow. It's not an IDE issue. It's a TTreeView issue. Create a simple TTreeView in an empty project an add a few items to it. Set the tvoAllowMultiSelect in the options to true. On Lazarus 1.6.4 you could SHIFT click a range and in Lazarus 1.8.0 it doesn't work anymore. This is on Windows. Can anybody confirm on other platforms? ---------------------------------------------------------------------- Handoko · 2018-03-08 13:14 Sorry, my mistake. The Ctrl key works correctly on my test but the Shift key doesn't work on Lazarus 1.8.0 64-bit Linux Gtk2. ---------------------------------------------------------------------- rvk · 2018-03-08 13:19 Yes, I found the problem. In Lazarus 1.6.4 and above there is also a MultiSelectStyle in which msShiftSelect can be set. But the default is only [msControlSelect]. Lazarus 1.6.4 didn't do anything with that value but from 1.8 onward it is used. So you can set [msControlSelect, msShiftSelect] and it works as expected again. But Lazarus IDE doesn't set that (and is [msControlSelect] as default. I'll create a bug-entry for the IDE. (Note that selecting is different too now. Now with msShiftSelect items from multiple levels can be selected. In 1.6.4 this was not possible.) ---------------------------------------------------------------------- Windsurfer · 2018-03-08 13:40 Thanks, you just debugged one of my problems. ---------------------------------------------------------------------- rvk · 2018-03-08 13:50 Bugtrack and patch added. https://bugs.freepascal.org/view.php?id=33383 majid.ebru, if you want to fix this in your 1.8 version you can do the following. Open lazarus\components\ideintf\componenttreeview.pasSearch for tvoAllowMultiselectYou'll find TComponentTreeView.Create()Add the highlighted line below to the sourceClose the FileNow in Lazarus, choose Tools > Build Lazarus with Profile: Normal IDE and click YesLazarus will rebuild and restartProblem solved Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i constructor TComponentTreeView.Create(TheOwner: TComponent);begin  inherited Create(TheOwner);  DragMode := dmAutomatic;  FComponentList:=TBackupComponentList.Create;  Options := Options + [tvoAllowMultiselect, tvoAutoItemHeight, tvoKeepCollapsedNodes, tvoReadOnly];  MultiSelectStyle := MultiSelectStyle + [msShiftSelect];  FImageList := TImageList.Create(nil);  FImageList.Width := TIDEImages.ScaledSize; ---------------------------------------------------------------------- majid.ebru · 2018-03-08 16:01 @rvk  Thank you veru much it worked