B4A Library [Class] CheckList

LucaMs

Expert
Licensed User
Longtime User
Hello, Informatix,

I think that I can not see an elephant!

I used your great class adding items using AddCustomItem, which needs the parameter pnlHeight. ALL IT'S OK.

Right now I'm using the command easier AddItem.
It seems to me that, in this case, I am "forced" to calculate the height of the inner panel of ScrollView "host" (I tried to use ResizePanel but the inner panel.height remains 0).
Now I get the right height, but the panel is empty.

I am attaching the project: show me the elephant, please

Many thanks.

(I added a method to your class - RemoveAllItems - because I could not find a similar one)
 

Attachments

  • LM_FileManager.zip
    22.8 KB · Views: 297

elbelli2013

Member
Licensed User
Longtime User
Hi,
I make a List2 from List2=lst.CheckedList()

Then I've List2 with all element cheked.

Now I need auto check element in another ClsCheckList using List2.

Anybody Can Help me?


thanks in advance.
 

LucaMs

Expert
Licensed User
Longtime User


I like to help and get a "Thanks", even without "alot", without a "Like" and completely free of charge, of course.

So, Sytek, you can find many of my answers to help, on site, none of these ... short as that!
 

Informatix

Expert
Licensed User
Longtime User
Hi,
I make a List2 from List2=lst.CheckedList()

Then I've List2 with all element cheked.

Now I need auto check element in another ClsCheckList using List2.

Anybody Can Help me?

thanks in advance.
You browse all items of your list in a loop and you set the checked state of each corresponding item in your second ClsCheckList. There's no function to do that automatically.
If you have no idea of how to change the state of a checkbox, you can see the code of the CheckAllBoxes function of the class.
 

elbelli2013

Member
Licensed User
Longtime User
Hello, Informatix, I added a extra function into your class.



Public Sub GetSecondText(ID As Object) As String
Dim pnl As Panel
Log(sv.Panel.NumberOfViews)


For i = 0 To sv.Panel.NumberOfViews-1
pnl = sv.Panel.GetView(i)

If pnl.Tag = Null Then Continue
If pnl.Tag = ID Then
For p = 0 To pnl.NumberOfViews
If IsLabel(pnl.GetView(p)) Then

Log(pnl.GetView(p))
Log(pnl.GetView(p+1))
Log(pnl.GetView(p+2))
' Dim lbl As Label
Dim lbl1 As Label
' lbl = pnl.GetView(p)
lbl1 = pnl.GetView(p+1)
Return lbl1.Text
End If
Next
Exit
End If
Next
Return ""
End Sub




regards.
 

Sytek

Active Member
Licensed User
Longtime User
I like to help and get a "Thanks", even without "alot", without a "Like" and completely free of charge, of course.

So, Sytek, you can find many of my answers to help, on site, none of these ... short as that!

That was for Informatix, not for you
 

Binary01

Active Member
Licensed User
Longtime User
Hi, Infomatix

This post is long time but is amazing and useful for me. I want to know that
how to get item position that user clicked in checklist?
can I change the color of item that user clicked in checklist?

Thanks
 

maleche

Active Member
Licensed User
Longtime User
I read through the blog and might have missed it.
I would like to build a "DropDown" object using a ListView and Spinner.
When selecting the Category "Dog", I would like a dropdown (Spinner?) to show the subcategories from which to choose.
I have made a quick drawing example of what I need.
Any code direction is greatly appreciated!
See attached photo.

Thanks in advanced!
 

Attachments

  • DropDown.png
    53.5 KB · Views: 306

LucaMs

Expert
Licensed User
Longtime User


Your design is better than mine (probably ).

I demand even more, here.

But I have seen in the examples that something like this is already part of the class.

 
Last edited:

Touch

Active Member
Licensed User
Longtime User
Hi Informatix,
How can I get the values entered in a EditText?
 
Last edited:

hookshy

Well-Known Member
Licensed User
Longtime User
Any idea how to change the orange color that is describing the press action of items ?
Hope I made myself understood !

I did played with colors found as process variables with no luck.
Thank you
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…