[SOLVED] How to reorder objects in the object-inspector? lazarus / 13-General ---------------------------------------------------------------------- Hartmut · 2018-07-08 11:02 I use Lazarus 1.8.4 on Windows 7. I have > 20 components in the object-inspector and want to reorder them. Keyboard and Mouse seem not to work. Changing the Z-order via context menu works badly, because the changes are not shown in the object-inspector. You must restart Lazarus to see your changes. Is there another (better) way? I found no documentation about that. Thanks in advance. ---------------------------------------------------------------------- Blaazen · 2018-07-08 11:14 What do you mean by "reorder"? Z-order or simply some order how are component sorted in OI? ---------------------------------------------------------------------- Handoko · 2018-07-08 11:15 Quote from: Hartmut on July 08, 2018, 01:02:44 pmChanging the Z-order via context menu works badly, because the changes are not shown in the object-inspector. You must restart Lazarus to see your changes.You don't have to restart Lazarus to see the changes, you just need to switch to other form. Tested on Lazarus 1.8.4 Linux. ---------------------------------------------------------------------- Hartmut · 2018-07-08 11:17 I only want to rearrange the order in which my components are shown in the OI. How can this be done? ---------------------------------------------------------------------- Hartmut · 2018-07-08 11:24 Quote from: Handoko on July 08, 2018, 01:15:47 pmYou don't have to restart Lazarus to see the changes, you just need to switch to other form. Tested on Lazarus 1.8.4 Linux. Yes, this works, as long as you have another Form ;-) Is this a bug? ---------------------------------------------------------------------- Blaazen · 2018-07-08 11:24 IMO the only way is to manually edit *.lfm, i.e. start new project or close Lazarus, edit file and reload your project. But why, OI has filtering, and 20 controls is not so much. ---------------------------------------------------------------------- Handoko · 2018-07-08 11:27 I don't know how others do it. I change the z-order if I want to change the components' order that show on the Object Inspector. But it has a small bug, you can't see the the result unless you restart the Lazarus or switch to other form. ---------------------------------------------------------------------- Blaazen · 2018-07-08 11:27 Changing Z-order and switching form seems to work too. ---------------------------------------------------------------------- Blaazen · 2018-07-08 11:32 I got 960 items on my form and I didn't care much their order ever. But more than 50% are actions, menuitems and grid columns. ---------------------------------------------------------------------- Handoko · 2018-07-08 11:37 Usually we do not need to care about z-order. Z-order is important only when the components overlap visually. Quote from: Hartmut on July 08, 2018, 01:24:01 pmIs this a bug? Yes, definitely is a bug. Please report it to:https://bugs.freepascal.org/view_all_bug_page.php ---------------------------------------------------------------------- Hartmut · 2018-07-08 11:38 Quote from: Blaazen on July 08, 2018, 01:24:14 pmIMO the only way is to manually edit *.lfm I looked in my *-lfm file and saw strange numbers in square brackets, which I have only in a few projects, most projects don't have them: 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 inherited Form1: TForm1  Left = 355  Height = 420  Top = 316  Width = 648  Caption = 'Form1'  ClientHeight = 420  ClientWidth = 648  OnActivate = FormActivate  OnClose = FormClose  OnCreate = FormCreate  OnKeyDown = FormKeyDown  inherited DBGrid1: TDBGrid    Height = 72    Top = 46    Width = 520  end  object Label_fspec: TLabel[1]    Left = 8    Height = 13    Top = 12    Width = 17    Caption = 'DB:'    ParentColor = False  end  object LB1: TListBox[2]    Left = 16    Height = 227    Top = 184    Width = 130    ItemHeight = 0    OnClick = LB1Click    TabOrder = 1  end  object Splitter0: TSplitter[3]    Left = 160    Height = 200    Top = 200    Width = 30    Align = alNone  end... Does anybody know what these numbers mean? They are well ordered from 1 to 23. I'm afraid to brake something if I edit this file manually and don't know what to do with those numbers... ---------------------------------------------------------------------- Blaazen · 2018-07-08 12:08 I didn't ever see this. ---------------------------------------------------------------------- Hartmut · 2018-07-08 14:44 Quote from: Handoko on July 08, 2018, 01:37:42 pmYes, definitely is a bug. Please report it to:https://bugs.freepascal.org/view_all_bug_page.php I reported this bug as #33954. I learned that  - the order of components in the OI is the same than the order in the lfm-files  - you can rearrange the order of components in the OI by changing their Z-order  - there is a bug in Lazarus 1.8.4 and 1.8.0, that these changes are only visible, if you restart Lazarus or switch the OI to another form and back For my question about the square bracket numbers in lfm-files I started a separate Topic http://forum.lazarus.freepascal.org/index.php/topic,41814.0.html Thanks a lot to Blaazen and Handoko for their help. ---------------------------------------------------------------------- Handoko · 2018-07-08 15:42 Quote from: Hartmut on July 08, 2018, 04:44:24 pmI reported this bug as #33954. Thank you for reporting it. I know this bug long ago but always forgot to report it.