Forum > General
[SOLVED] Question about lfm-file format: numbers in square brackets []
(1/1)
Hartmut:
In some of my *.lfm files I see numbers in square brackets, which I have only in a few projects, most projects don't have them.
Does anybody know what these numbers mean?
I use Lazarus 1.8.4 on Windows 7, 32 bit. Thanks in advance.
Here is an example, which contains 23 such numbers:
--- Code: Pascal [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---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 object PageControl1: TPageControl[4] Left = 200 Height = 227 Top = 184 Width = 350 ActivePage = Tab_Browse TabIndex = 0 TabOrder = 3 OnChange = PageControl1Change object Tab_Browse: TTabSheet Caption = '&Browse' ClientHeight = 201 ClientWidth = 342 object SG0: TStringGrid Left = 16 Height = 172 Top = 12 Width = 315 ColCount = 4 TabOrder = 0 OnHeaderClick = SG0HeaderClick OnPrepareCanvas = SG0PrepareCanvas end end object Tab_SQL1: TTabSheet Caption = 'SQL&1' ClientHeight = 201 ClientWidth = 342 object Button_exec1: TButton Left = 47 Height = 25 Top = 5 Width = 75 Caption = '&Ausführen' OnClick = Button_exec_Click TabOrder = 0 end object Memo1: TMemo Left = 12 Height = 40 Top = 36 Width = 316 Lines.Strings = ( 'Memo1' ) TabOrder = 1 end object Splitter1: TSplitter Left = 24 Height = 14 Top = 88 Width = 274 Align = alNone end object SG1: TStringGrid Left = 15 Height = 86 Top = 111 Width = 313 ColCount = 4 RowCount = 4 TabOrder = 3 end end object Tab_SQL2: TTabSheet Caption = 'SQL&2' ClientHeight = 201 ClientWidth = 342 object Button_exec2: TButton Left = 47 Height = 25 Top = 5 Width = 75 Caption = '&Ausführen' OnClick = Button_exec_Click TabOrder = 0 end object Memo2: TMemo Left = 12 Height = 40 Top = 36 Width = 316 Lines.Strings = ( 'Memo1' ) TabOrder = 1 end object Splitter2: TSplitter Left = 24 Height = 14 Top = 88 Width = 274 Align = alNone end object SG2: TStringGrid Left = 15 Height = 86 Top = 111 Width = 313 ColCount = 4 RowCount = 4 TabOrder = 3 end end object Tab_SQL3: TTabSheet Caption = 'SQL&3' ClientHeight = 201 ClientWidth = 342 object Button_exec3: TButton Left = 47 Height = 25 Top = 5 Width = 75 Caption = '&Ausführen' OnClick = Button_exec_Click TabOrder = 0 end object Memo3: TMemo Left = 12 Height = 40 Top = 36 Width = 316 Lines.Strings = ( 'Memo1' ) TabOrder = 1 end object Splitter3: TSplitter Left = 24 Height = 14 Top = 88 Width = 274 Align = alNone end object SG3: TStringGrid Left = 15 Height = 86 Top = 111 Width = 313 ColCount = 4 RowCount = 4 TabOrder = 3 end end object Tab_SQL4: TTabSheet Caption = 'SQL&4' ClientHeight = 201 ClientWidth = 342 object Button_exec4: TButton Left = 47 Height = 25 Top = 5 Width = 75 Caption = '&Ausführen' OnClick = Button_exec_Click TabOrder = 0 end object Memo4: TMemo Left = 12 Height = 40 Top = 36 Width = 316 Lines.Strings = ( 'Memo1' ) TabOrder = 1 end object Splitter4: TSplitter Left = 24 Height = 14 Top = 88 Width = 274 Align = alNone end object SG4: TStringGrid Left = 15 Height = 86 Top = 111 Width = 313 ColCount = 4 RowCount = 4 TabOrder = 3 end end end object ComboBox_fspec: TComboBox[5] Left = 32 Height = 21 Top = 8 Width = 100 ItemHeight = 13 OnEditingDone = ComboBox_fspecEditingDone OnKeyDown = ComboBox_fspecKeyDown TabOrder = 4 Text = 'ComboBox_fspec' end object Button_fspec: TButton[6] Left = 140 Height = 25 Top = 8 Width = 32 Caption = '...' OnClick = Button_fspecClick TabOrder = 5 end object Button_Close: TButton[7] Left = 560 Height = 25 Top = 128 Width = 75 Caption = '&Close' OnClick = Button_CloseClick TabOrder = 6 end object Button_Refresh: TButton[8] Left = 184 Height = 25 Top = 8 Width = 75 Caption = '&Refresh' OnClick = Button_RefreshClick TabOrder = 7 end object CheckBox_max: TCheckBox[9] Left = 267 Height = 17 Top = 12 Width = 90 Caption = 'Max. Records:' OnChange = CheckBox_maxChange TabOrder = 8 end object SpinEdit_max: TSpinEditEx[10] Left = 360 Height = 21 Top = 12 Width = 70 MaxLength = 0 TabOrder = 9 OnEditingDone = SpinEdit_maxEditingDone NullValue = 0 end object Label_von: TLabel[11] Left = 439 Height = 13 Top = 15 Width = 22 Caption = 'von:' ParentColor = False end object StatusBar_anz: TStatusBar[12] Left = 469 Height = 20 Top = 12 Width = 72 Align = alNone Panels = <> end object Button_Tables: TButton[13] Left = 560 Height = 25 Top = 48 Width = 75 Caption = '&Tables' OnClick = Button_TablesClick TabOrder = 11 end object Button_Help: TButton[14] Left = 560 Height = 25 Top = 87 Width = 75 Caption = '&Help' OnClick = Button_HelpClick TabOrder = 12 end object CheckBox_auto: TCheckBox[15] Left = 554 Height = 17 Top = 14 Width = 93 Caption = 'Spalten autom.' OnChange = CheckBox_autoChange TabOrder = 13 end inherited DBConnection: TSQLite3Connection[16] end inherited SQLTransaction1: TSQLTransaction[17] end inherited SQLQuery1: TSQLQuery[18] end inherited DataSource1: TDataSource[19] end object OpenDialog1: TOpenDialog[20] left = 336 top = 129 end object IniPropStorage1: TIniPropStorage[21] StoredValues = <> left = 416 top = 129 end object PopupMenu_LB: TPopupMenu[22] left = 64 top = 288 object popTabname: TMenuItem Caption = 'markierten Tabellennamen in Zwischenablage' OnClick = popTabnameClick end end object pop_SG: TPopupMenu[23] left = 368 top = 311 object popFeldname: TMenuItem Caption = 'Spaltenname der roten Zelle in Zwischenablage' OnClick = Kontextmenu_SG end object MenuItem1: TMenuItem Caption = '-' end object popZelle: TMenuItem Caption = 'rote Zelle in Zwischenablage' OnClick = Kontextmenu_SG end object popZeile: TMenuItem Caption = 'rote Zeile in Zwischenablage' OnClick = Kontextmenu_SG end object popSpalte: TMenuItem Caption = 'rote Spalte in Zwischenablage' OnClick = Kontextmenu_SG end object MenuItem3: TMenuItem Caption = '-' end object popTabelle: TMenuItem Caption = 'ganze Tabelle in Zwischenablage' OnClick = Kontextmenu_SG end object popSelection: TMenuItem Caption = 'blau markierten Bereich in Zwischenablage' OnClick = Kontextmenu_SG end object MenuItem2: TMenuItem Caption = '-' end object popMemo: TMenuItem Caption = 'rote Zelle in Memofeld anzeigen' OnClick = Kontextmenu_SG end endend
Blaazen:
I found the delphi video answer: https://www.youtube.com/watch?v=_DLbTpIujYQ&feature=youtu.be
Hartmut:
Thanks a lot to Blaazen for your reply.
The video refers to a stackoverflow question, which handles this numbers very detailed:
https://stackoverflow.com/questions/10916294/strange-numbers-in-delphi-dfm-files-origin-and-necessity
The best answers (I think) are the 2 answers from "hvd", although (for me) very hard to understand. As far as I understood (not sure):
a) For TWinControls and their descendants this numbers are the Z-order.
b) For Non-windowed controls (say, TLabel) this number is a component index (lower than any windowed control in the same parent) which is mostly unused. But e.g. menus can use the component index to specify the order of their menu items (top to bottom). Toolbar controls can use the component index to specify the order of the toolbar buttons, even when those toolbar buttons aren't themselves controls.
As far as I understood the video covers only a)
Navigation
[0] Message Index