Espero que esto te ayude.
Ejecute este código en un nuevo programa gráfico.
El 'Filtro' usa el comando
Instr así que no uses "*". Buscando
bash encontrará
.bash_history,
.bash_logout y
.bashrc
Código:
' Gambas class file
Splitter1 As Splitter
DirChooser1 As DirChooser
VBox1 As VBox
TextBoxFilter As TextBox
ScrollView1 As ScrollView
Panel1 As Panel
Textlabel1 As TextLabel
PictureBox1 As PictureBox
Public Sub DirChooser1_Change()
Dim sDir As String[] = Dir(DirChooser1.SelectedPath, "*", gb.File)
Dim iLoop As Integer
Dim oObj As Object
For Each oObj In ScrollView1.Children
oObj.Delete
Next
If Trim(TextBoxFilter.Text) <> "" Then
For iLoop = sDir.max To 0 Step -1
If InStr(UCase(sDir[iLoop]), UCase(TextBoxFilter.Text)) = 0 Then sDir.Delete(iLoop, 1)
Next
End If
For iLoop = 0 To sDir.Max
With Panel1 = New Panel(ScrollView1)
.Width = 150
.Height = 100
.Arrangement = Arrange.Vertical
End With
With PictureBox1 = New PictureBox(Panel1)
.Width = 100
.Height = 60
.Expand = True
.Mode = PictureBox.Contain
.Alignment = Align.Center
.Picture = Picture["icon:/32/file"]
End With
With Textlabel1 = New TextLabel(Panel1)
.Height = 20
.Width = 100
.AutoResize = True
.Text = sDir[iLoop]
.Alignment = Align.Center
.Wrap = True
.Padding = 5
End With
Next
End
Public Sub TextBoxFilter_Change()
DirChooser1_Change()
End
Public Sub Form_Open()
With Me
.Width = 1000
.Height = 675
.Arrangement = Arrange.Vertical
.Padding = 5
End With
With Splitter1 = New Splitter(Me)
.Expand = True
.Spacing = True
.Arrangement = Arrange.Horizontal
End With
DirChooser1 = New DirChooser(Splitter1) As "DirChooser1"
DirChooser1.Expand = True
VBox1 = New VBox(Splitter1)
VBox1.Expand = True
With TextBoxFilter = New TextBox(VBox1) As "TextBoxFilter"
.Height = 25
.Width = 20
.Placeholder = "Enter filter here"
End With
With Panel1 = New Panel(VBox1)
.Height = 7
.Width = 20
End With
With ScrollView1 = New ScrollView(VBox1)
.Expand = True
.Arrangement = Arrange.Row
End With
Splitter1.Layout = [20, 80]
DirChooser1_Change
TextBoxFilter.SetFocus
End