Sergey_New Well-Known Member Licensed User Longtime User Jan 16, 2022 #1 Couldn't find any example of sharing. I'm wondering how to change the height of the expandable row for any CLV entry.
Couldn't find any example of sharing. I'm wondering how to change the height of the expandable row for any CLV entry.
Erel B4X founder Staff member Licensed User Longtime User Jan 17, 2022 #2 Don't combine them. There are very few cases where PCLV is really required and it adds all kinds of restrictions. Use simple lazy loading instead. Upvote 0
Don't combine them. There are very few cases where PCLV is really required and it adds all kinds of restrictions. Use simple lazy loading instead.
Sergey_New Well-Known Member Licensed User Longtime User Jan 17, 2022 #3 Erel, thanks for the clarification! Please help with B4J example of lazy loading ExpandableList. Upvote 0
TILogistic Expert Licensed User Longtime User Jan 17, 2022 #4 ? Huawei P20 and ExpandableCLV Hi guys, It's been a while… trying to pass the time in these troublesome times, I decided to restart a few projects, and got back into development. I have an Huawei P20 and a very simple layout consisting of a "Title" panel (with a label, a textfield, 2 checkboxes and a button) and a... www.b4x.com Upvote 0
? Huawei P20 and ExpandableCLV Hi guys, It's been a while… trying to pass the time in these troublesome times, I decided to restart a few projects, and got back into development. I have an Huawei P20 and a very simple layout consisting of a "Title" panel (with a label, a textfield, 2 checkboxes and a button) and a... www.b4x.com
Sergey_New Well-Known Member Licensed User Longtime User Jan 17, 2022 #5 oparra, thanks for the link! Alas, loading 1000 records takes more than 5 seconds. This option doesn't work for me. With PreoptimizedCLV, loading times are short, and there is no way to set the height of expandable rows. Upvote 0
oparra, thanks for the link! Alas, loading 1000 records takes more than 5 seconds. This option doesn't work for me. With PreoptimizedCLV, loading times are short, and there is no way to set the height of expandable rows.
M Mahares Expert Licensed User Longtime User Jan 17, 2022 #6 Sergey_New said: loading 1000 records takes more than 5 seconds Click to expand... Why don't you upload your project to the forum. Perhaps some one will get hold of it and help you with it if they experienced similar situation. Upvote 0
Sergey_New said: loading 1000 records takes more than 5 seconds Click to expand... Why don't you upload your project to the forum. Perhaps some one will get hold of it and help you with it if they experienced similar situation.
Sergey_New Well-Known Member Licensed User Longtime User Jan 17, 2022 #7 Mahares, I am attaching the project. Loading 10,000 records is fast, but I need to set a different ExpandedHeight depending on the parent row. Attachments B4J_ExpandableList.zip B4J_ExpandableList.zip 6 KB · Views: 347 Upvote 0
Mahares, I am attaching the project. Loading 10,000 records is fast, but I need to set a different ExpandedHeight depending on the parent row.
M Mahares Expert Licensed User Longtime User Jan 17, 2022 #8 Sergey_New said: but I need to set a different ExpandedHeight depending on the parent row. Click to expand... Are you saying you want to display items under any given panel when expanded, then auto close it when another panel is clicked. See image below. If that is the case I can upload a B4J project to illustrate that to give you ideas for your real project, using Lazy Loading in xCLV ( not PCLV which not essential as Erel said). If you are thinking differently, then wait till someone else tackles your problem. Upvote 0
Sergey_New said: but I need to set a different ExpandedHeight depending on the parent row. Click to expand... Are you saying you want to display items under any given panel when expanded, then auto close it when another panel is clicked. See image below. If that is the case I can upload a B4J project to illustrate that to give you ideas for your real project, using Lazy Loading in xCLV ( not PCLV which not essential as Erel said). If you are thinking differently, then wait till someone else tackles your problem.
TILogistic Expert Licensed User Longtime User Jan 18, 2022 #9 but I need to set a different ExpandedHeight depending on the parent row. Click to expand... I do not understand what you want to say Attachments 1.gif 212.9 KB · Views: 505 Upvote 0
but I need to set a different ExpandedHeight depending on the parent row. Click to expand... I do not understand what you want to say
Sergey_New Well-Known Member Licensed User Longtime User Jan 18, 2022 #10 Mahares said: Are you saying you want to display items under any given panel when expanded, then auto close it when another panel is clicked. Click to expand... Yes, but the time for 10000 entries should be comparable to my example. oparra said: I do not understand what you want to say Click to expand... I want that in my example, for each record, it would be possible to display several elements in height in the drop-down field (for example, Label). Their number depends on the parent row. Upvote 0
Mahares said: Are you saying you want to display items under any given panel when expanded, then auto close it when another panel is clicked. Click to expand... Yes, but the time for 10000 entries should be comparable to my example. oparra said: I do not understand what you want to say Click to expand... I want that in my example, for each record, it would be possible to display several elements in height in the drop-down field (for example, Label). Their number depends on the parent row.
Erel B4X founder Staff member Licensed User Longtime User Jan 18, 2022 #11 If it is fast enough, and make sure to test it in release mode, then start without lazy loading. Upvote 0
M Mahares Expert Licensed User Longtime User Jan 18, 2022 #12 Sergey_New said: I want that in my example, for each record, it would be possible to display several elements in height in the drop-down field Click to expand... I have created a B4J project based on yours with 10000 records and takes 10 ms to load all. It has PCLV and lazy loading. I also added a list of items where each list item is loaded onto a label to make the child views for each panel clicked. I am using the same list for each record. When you click a panel title, the pane expands and displays the 11 items in the list. See screenshot. It needs some tweaking. Other than that it works. If you want to play with it, I can post it. If not, good luck. Last edited: Jan 18, 2022 Upvote 0
Sergey_New said: I want that in my example, for each record, it would be possible to display several elements in height in the drop-down field Click to expand... I have created a B4J project based on yours with 10000 records and takes 10 ms to load all. It has PCLV and lazy loading. I also added a list of items where each list item is loaded onto a label to make the child views for each panel clicked. I am using the same list for each record. When you click a panel title, the pane expands and displays the 11 items in the list. See screenshot. It needs some tweaking. Other than that it works. If you want to play with it, I can post it. If not, good luck.
Sergey_New Well-Known Member Licensed User Longtime User Jan 18, 2022 #13 Mahares said: Other than that it works. If you want to play with it, I can post it. Click to expand... Of course I want! Publish please! Upvote 0
Mahares said: Other than that it works. If you want to play with it, I can post it. Click to expand... Of course I want! Publish please!
M Mahares Expert Licensed User Longtime User Jan 18, 2022 #14 Sergey_New said: Of course I want! Publish please! Click to expand... Here it is. I hope it helps some. If you improve it, which you certainly will, share the code with the rest. If it does not help, just toss it. If you ask and I do not answer, then it means I have no answer and someone else may possibly help. Attachments B4J_ExpandableListModifiedByMaharesPCLVAndLL.zip B4J_ExpandableListModifiedByMaharesPCLVAndLL.zip 7.5 KB · Views: 310 Upvote 0
Sergey_New said: Of course I want! Publish please! Click to expand... Here it is. I hope it helps some. If you improve it, which you certainly will, share the code with the rest. If it does not help, just toss it. If you ask and I do not answer, then it means I have no answer and someone else may possibly help.
Sergey_New Well-Known Member Licensed User Longtime User Jan 18, 2022 #15 Maharis, thank you so much! An example is almost what I needed. I explain: Imagine that Item #1, Item #2, and so on, are the owners of the animals on your list. Each of them may be different. One has only a dog, another has a cat, the third has everything. So I want to see what animals each owner has? Upvote 0
Maharis, thank you so much! An example is almost what I needed. I explain: Imagine that Item #1, Item #2, and so on, are the owners of the animals on your list. Each of them may be different. One has only a dog, another has a cat, the third has everything. So I want to see what animals each owner has?
M Mahares Expert Licensed User Longtime User Jan 18, 2022 #16 Sergey_New said: Maharis, thank you so much! An example is almost what I needed. I explain: Imagine that Item #1, Item #2, and so on, are the owners of the animals on your list. Each of them may be different. One has only a dog, another has a cat, the third has everything. So I want to see what animals each owner has? Click to expand... Just somethink real quick. Of course to do it the proper way is to have a database table that you extract the distinct owners and use a query to select each owner's animals from another query. Requires a little work on your part. Code: Private DataMain As List 'in globals , use DataMain instead of Data Change thie below line from Code: Data.AddAll(Array As String("Dog", "Cat", "Giraffe", "Bird", "Lion", "Hippopotamus", "Camel", "Tiger", "Elephant" _ , "Gazelle", "Cheetah")) To: Code: DataMain.AddAll(Array As String("Dog", "Cat", "Giraffe", "Bird", "Lion", "Hippopotamus", "Camel", "Tiger", "Elephant" _ , "Gazelle", "Cheetah")) Add these few lines to the top of Private Sub clv1_VisibleRangeC Code: Private Sub clv1_VisibleRangeChanged (FirstIndex As Int, LastIndex As Int) Dim Data As List Data.Initialize Dim x As Int = Rnd(0, DataMain.Size) 'use a different number of animals for every title. For k=x To DataMain.Size-1 Data.Add(DataMain.Get(k)) Next Upvote 0
Sergey_New said: Maharis, thank you so much! An example is almost what I needed. I explain: Imagine that Item #1, Item #2, and so on, are the owners of the animals on your list. Each of them may be different. One has only a dog, another has a cat, the third has everything. So I want to see what animals each owner has? Click to expand... Just somethink real quick. Of course to do it the proper way is to have a database table that you extract the distinct owners and use a query to select each owner's animals from another query. Requires a little work on your part. Code: Private DataMain As List 'in globals , use DataMain instead of Data Change thie below line from Code: Data.AddAll(Array As String("Dog", "Cat", "Giraffe", "Bird", "Lion", "Hippopotamus", "Camel", "Tiger", "Elephant" _ , "Gazelle", "Cheetah")) To: Code: DataMain.AddAll(Array As String("Dog", "Cat", "Giraffe", "Bird", "Lion", "Hippopotamus", "Camel", "Tiger", "Elephant" _ , "Gazelle", "Cheetah")) Add these few lines to the top of Private Sub clv1_VisibleRangeC Code: Private Sub clv1_VisibleRangeChanged (FirstIndex As Int, LastIndex As Int) Dim Data As List Data.Initialize Dim x As Int = Rnd(0, DataMain.Size) 'use a different number of animals for every title. For k=x To DataMain.Size-1 Data.Add(DataMain.Get(k)) Next
Sergey_New Well-Known Member Licensed User Longtime User Jan 18, 2022 #17 Maharis, unfortunately, the height of the expanded panel does not change according to the number of animals. Upvote 0
Maharis, unfortunately, the height of the expanded panel does not change according to the number of animals.
TILogistic Expert Licensed User Longtime User Jan 18, 2022 #18 Maharis, unfortunately, the height of the expanded panel does not change according to the number of animals. Click to expand... see: PreoptimizedCLV Item Resize Hi everyone I congratulate @Erel for the PreoptimizedCLV library. It has an excellent performance. Does anyone know if it is possible to resize an item containing a variable height label? Could CLV.ResizeItem() be used? Does anyone have an example? Thanks www.b4x.com Upvote 0
Maharis, unfortunately, the height of the expanded panel does not change according to the number of animals. Click to expand... see: PreoptimizedCLV Item Resize Hi everyone I congratulate @Erel for the PreoptimizedCLV library. It has an excellent performance. Does anyone know if it is possible to resize an item containing a variable height label? Could CLV.ResizeItem() be used? Does anyone have an example? Thanks www.b4x.com
Sergey_New Well-Known Member Licensed User Longtime User Jan 18, 2022 #19 oparra said: see: Click to expand... I have read this before. Mahares offered to help with a possible solution. I have already spoken about the need to change the height of the expanded panel. Upvote 0
oparra said: see: Click to expand... I have read this before. Mahares offered to help with a possible solution. I have already spoken about the need to change the height of the expanded panel.
M Mahares Expert Licensed User Longtime User Jan 19, 2022 #20 Well @oparra clarified it for you. If you are really serious about building an app that uses xCLV with CLVExpandable, lazy loading and do all you want done with it, you really need a bonafide database that has all the necessary columns to make it work, not just having data coming from: For i=0 to 10000. You are not going to give it justice by using a 0 to 10000 loop that is very abstract. Upvote 0
Well @oparra clarified it for you. If you are really serious about building an app that uses xCLV with CLVExpandable, lazy loading and do all you want done with it, you really need a bonafide database that has all the necessary columns to make it work, not just having data coming from: For i=0 to 10000. You are not going to give it justice by using a 0 to 10000 loop that is very abstract.