Public Sub fillPane(FirstIndex As Int, LastIndex As Int)
If segments.Size=0 Then
Return
End If
Dim ExtraSize As Int
ExtraSize=15
For i = Max(0,FirstIndex-ExtraSize*2) To Min(Main.editorLV.Size - 1,LastIndex+ExtraSize*2)
Dim segmentPane As Pane
segmentPane=Main.editorLV.GetPanel(i)
If i > FirstIndex - ExtraSize And i < LastIndex + ExtraSize Then
'visible+
segmentPane.Enabled=True
If segmentPane.NumberOfNodes = 0 Then
Dim bitext As List
bitext=segments.Get(i)
addTextAreaToSegmentPane(segmentPane,bitext.Get(0),bitext.Get(1))
End If
Else
'not visible
segmentPane.Enabled=False
If segmentPane.NumberOfNodes > 0 Then
segmentPane.RemoveAllNodes '<--- remove the layout
End If
End If
Next
End Sub