rraswisak Active Member Licensed User Longtime User Aug 3, 2019 #1 Hi all, I have a xCustomListView with three items, it has 200dip height each. I want to resize height (expand/collaps) at the item when arrow icon was click. Code: Sub lblArrow_Click Dim itm As CLVItem Dim lbl As Label = Sender Dim idx As Int = clvTable.GetItemFromView(lbl) itm = clvTable.GetRawListItem(idx) itm.Panel.Height = 350dip 'new size, resize height from 200 to 350 dip End Sub The above code does not work, any idea ? note: - been looking Expandable List and CLVExpandable before, but it's to complex as for my current needed
Hi all, I have a xCustomListView with three items, it has 200dip height each. I want to resize height (expand/collaps) at the item when arrow icon was click. Code: Sub lblArrow_Click Dim itm As CLVItem Dim lbl As Label = Sender Dim idx As Int = clvTable.GetItemFromView(lbl) itm = clvTable.GetRawListItem(idx) itm.Panel.Height = 350dip 'new size, resize height from 200 to 350 dip End Sub The above code does not work, any idea ? note: - been looking Expandable List and CLVExpandable before, but it's to complex as for my current needed
mangojack Expert Licensed User Longtime User Aug 4, 2019 #2 try ... Code: Sub lblArrow_Click Dim index As Int = clvTable.GetItemFromView(Sender) Dim height As Int = clvTable.GetPanel(index).Height If height = 200 Then height = 350dip Else height = 200dip End If clvTable.ResizeItem(index, height) End Sub Upvote 0
try ... Code: Sub lblArrow_Click Dim index As Int = clvTable.GetItemFromView(Sender) Dim height As Int = clvTable.GetPanel(index).Height If height = 200 Then height = 350dip Else height = 200dip End If clvTable.ResizeItem(index, height) End Sub
Erel B4X founder Staff member Licensed User Longtime User Aug 4, 2019 #3 Play with CLVExpandable. It is quite simple and it is built exactly for this use case. Upvote 0
rraswisak Active Member Licensed User Longtime User Aug 5, 2019 #4 @mangojack Thank you for your snippet code, i did not mention that xCustomListView has ResizeItem method which is that what i need. now after some modification i can get it work as expected. @Erel CLVExpandable act exacly what i want to do, but in my case i only use one panel with rounding corner in the layout, so if i use CLVExpandable there will be 2 rounded panel while expand Upvote 0
@mangojack Thank you for your snippet code, i did not mention that xCustomListView has ResizeItem method which is that what i need. now after some modification i can get it work as expected. @Erel CLVExpandable act exacly what i want to do, but in my case i only use one panel with rounding corner in the layout, so if i use CLVExpandable there will be 2 rounded panel while expand
ibs06t Member Licensed User Longtime User Sep 8, 2022 #5 hi rraswisak any possible to fix default row fit in listview Upvote 0