B4J Question [B4X] How can I show a AnotherProgressBar control in xCustomListView Pane/Panel?

hatzisn

Well-Known Member
Licensed User
Longtime User
Hi all,

I use an xCustomlistView with a list of Panes that each of them has a AnotherProgressBar Control (XUI Views) which is hidden. I loop through the Panes and I want on each step to show the AnotherProgressBar of the coressponding step pane. I tried with this code but it does not work :

B4X:
            Dim p As Pane = clv2.GetPanel(iUesh - 1)
            For Each n As B4XView In p.GetAllViewsRecursive
                If n Is Label And n.Visible = False Then
                    n.Visible = True
                End If
                If n Is AnotherProgressBar And n.Visible = False Then
                    n.Visible = True
                    Dim ab As AnotherProgressBar = n
                    ab.Value = 100
                End If
            Next

How can I do it?

P.S. Please note that I set the value to 100. How can I also do it differently?
 

Revisable5987

Member
Licensed User
I tried with this code but it does not work
What doesn't work?

Do you mean the AnotherProgressBar isn't visible?
Try:
B4X:
Dim p As Pane = clv2.GetPanel(iUesh - 1)
            For Each n As B4XView In p.GetAllViewsRecursive
                If n Is Label And n.Visible = False Then
                    n.Visible = True
                End If
                If n Is AnotherProgressBar And n.Visible = False Then
                    'n.Visible = True
                    Dim ab As AnotherProgressBar = n
                    ab.Visible = True
                    ab.Value = 100
                End If
            Next
Also, if you know the index of the AnotherDatePicker you could use:
B4X:
Dim p as B4XView = clv.GetPanel(iUesh - 1)
Dim ab As AnotherDatePicker = p.GetView()
ab.Visible = True
ab.Value = 100
 
Last edited:
Upvote 0

hatzisn

Well-Known Member
Licensed User
Longtime User
I managed to fix it like this:

B4X:
            For Each n As B4XView In p.GetAllViewsRecursive
                If n Is Label And n.Visible = False Then
                    n.Visible = True
                End If
                Try
                    If n.Tag Is AnotherProgressBar And n.Visible = False Then
                        Dim ab As AnotherProgressBar = n.Tag
                        ab.Visible = True
                        ab.Value = 100
                    End If
                Catch
                    Log(LastException)
                End Try
            Next
 
Upvote 0
Top