FileView: Selection property now does return file names without any rich text formatting.

[GB.FORM]
* BUG: FileView: Selection property now does return file names without any rich text formatting.
This commit is contained in:
gambas 2021-06-21 19:16:02 +02:00
parent 68ecfe8d0f
commit e3ee5a4139
4 changed files with 16 additions and 4 deletions

View file

@ -1,6 +1,6 @@
# Gambas Project File 3.0
Title=More controls for graphical components
Startup=FTestTabPanel
Startup=FTestFileView
Icon=.hidden/icon.png
Version=3.16.90
VersionFile=1

View file

@ -887,7 +887,7 @@ Private Function Selection_Read() As String[]
hView.MoveFirst
While hView.Available
If hView.Item.Selected Then
aSel.Add(hView.Item.Text)
aSel.Add(Mid$(hView.Item.Key, 2))
Endif
hView.MoveNext
Wend

View file

@ -1,2 +1,8 @@
' Gambas class file
Public Sub Button1_Click()
Print FileView1.Selection.Join("\n")
End

View file

@ -2,12 +2,18 @@
{ Form Form
MoveScaled(0,0,64,64)
Arrangement = Arrange.Fill
Arrangement = Arrange.Vertical
Margin = True
{ FileView1 FileView
MoveScaled(2,5,58,53)
MoveScaled(2,2,58,53)
Expand = True
Mode = Select.Multiple
ShowDetailed = True
ShowHidden = True
ShowDirectory = True
}
{ Button1 Button
MoveScaled(14,57,16,4)
Text = ("Selection")
}
}