B4J Question Sidebar Menu

Chris Guanzon

Active Member
Licensed User
Longtime User
Hello, is there a Sidebar Menu available for desktop app, like this?

1597980902164.png


The only Sidebar Menu i know is a web app created in b4j.
 
You can use B4XDrawer with xCLV + CLVExpandable.

Hello sir, I've already done making your suggestion, but my problem is the pnlExpanded, it is not auto resize. I want to resize it depends on the count of the item in customlistview. See attached image:

1598012334061.png


In Item #3 there are more than 1 SubItem and in Item #4 there is only 1 SubItem. How can i resize the pnlExpanded height to match the number of item in customlistview so i can show all the subitems (so that there's no scroll bar in Item #3) and remove the white (excess space in Item #4) in customlistview?

I attached the sample i made.
 

Attachments

Upvote 0
an alternative is to use:


 
Upvote 0
 
Upvote 0
b4i.

 
Upvote 0
pnlExpanded and CustomListView1 should be anchored correctly. This means that they should be vertically anchored to BOTH and fill all the available area:

1598165137994.png


code:
Code:
For i = 1 To 20
        Dim NumberOfItems As Int = Rnd(1, 20)
        Dim p As B4XView = CreateItem(Rnd(0xFF000000, 0xFFFFFFFF), "Item #" & i, NumberOfItems * 52dip + 60dip + 2dip)
        clvSidebar.Add(p, expandable.CreateValue(p, "some value"))
        For j = 1 To NumberOfItems
            CustomListView1.AddTextItem("Subitem #" & j, j)
        Next
    Next
 
Upvote 0
Back
Top