DALB Active Member Licensed User Mar 3, 2020 #1 Hi every brain, I would like to show a listview but putting a twolines format side by side. The idea is to look for folders and files. When files are found in a folder, I wish to show them with a three points prefix like this: Folder A ... File A1 ... File A2 ... File A3 Folder B ... File B1 ... File B2 the firstline of the listview will contain "..." and the second the name of the file "File Xn". Is it possible with the current version of B4A (9.50) and which proprieties to use ? I only want to do this to reduce the code when clicking on a listview line If some eye comes here, thank for giving me a way.
Hi every brain, I would like to show a listview but putting a twolines format side by side. The idea is to look for folders and files. When files are found in a folder, I wish to show them with a three points prefix like this: Folder A ... File A1 ... File A2 ... File A3 Folder B ... File B1 ... File B2 the firstline of the listview will contain "..." and the second the name of the file "File Xn". Is it possible with the current version of B4A (9.50) and which proprieties to use ? I only want to do this to reduce the code when clicking on a listview line If some eye comes here, thank for giving me a way.
DonManfred Expert Licensed User Longtime User Mar 3, 2020 #2 Listview is a limited view. It is suggested to use xCustomListview instead. But you can use for example: Use the OneLineLayout and Twolineslayout and change the properties of these labels. B4X: Dim lbl As Label = ListView1.SingleLineLayout.Label lbl.TextSize = 20 lbl.TextColor = Colors.Green Dim firstlbl As Label = ListView1.TwoLinesLayout.Label Dim secondlbl As Label = ListView1.TwoLinesLayout.SecondLabel You can for example use the SingleLineLayout for Folders and the TwoLinesLayout for the Fileitems. Upvote 0
Listview is a limited view. It is suggested to use xCustomListview instead. But you can use for example: Use the OneLineLayout and Twolineslayout and change the properties of these labels. B4X: Dim lbl As Label = ListView1.SingleLineLayout.Label lbl.TextSize = 20 lbl.TextColor = Colors.Green Dim firstlbl As Label = ListView1.TwoLinesLayout.Label Dim secondlbl As Label = ListView1.TwoLinesLayout.SecondLabel You can for example use the SingleLineLayout for Folders and the TwoLinesLayout for the Fileitems.
DALB Active Member Licensed User Mar 3, 2020 #3 Hello DonManfred, Thanks much for answering so quickly. Your answer is what I supposed, but I didn't see the term 'SecondLabel'. I didn't make care. Your solution seems good, I'll try this. Upvote 0
Hello DonManfred, Thanks much for answering so quickly. Your answer is what I supposed, but I didn't see the term 'SecondLabel'. I didn't make care. Your solution seems good, I'll try this.