bList v0.9 (beta) released

Erel

B4X founder
Staff member
Licensed User
Longtime User
I'm very excited to release the first beta version our new complex list control 'bList'.
Allow me to quote Ariel description from the help manual:
bList is a modern UI element used as a basic list viewer. bList is intended to help creating user interface for touch screens and is specifically suited for Basic4ppc. bList allows finger-based operation and is intended to be used for multi-choice elements, list, and the like.

Moving the list is done by dragging the finger (or a stylus) over the screen. The faster dragged the faster the list moves. Lifting the finger will cause the list to reduce speed to a full stop. Clicking an item fires an event and the programmer can handle it in code.
blist.png


This is a beta version and I'm sure that there are still some improvements required. Also note that some of the method signatures may change in the stable release.
Any feedback about this new control will be highly appreciated.

Setup instructions:
- Download the attached file.
- Copy bList.dll and bList.chm to the libraries folder. By default:
c:\Program Files\Anywhere Software\Basic4ppc Desktop\Libraries

The zip file also includes several examples.

I want to thank Ariel for writing this cool new library :icon_clap:.
Edit: v0.93 is attaches. bListItem.CreateNew2 second parameter can be an empty string for items without an image.
Edit: v0.92 is attached. Improves the 'click' sensitivity on VGA devices.
Edit: v0.91 is attached with some minor bug fixes and corrections to the help manual.
Edit: Example file was fixed.
 

Attachments

  • bList.zip
    87.9 KB · Views: 369

giannimaione

Well-Known Member
Licensed User
Longtime User
:sign0060: wow :sign0060: wow
:sign0098: :sign0098: :sign0098:
 

Zenerdiode

Active Member
Licensed User
He erm, he didn't answer... :rolleyes:

Erel & Ariel, you're distracting me from the work I should be doing with libraries like this :)

I'm already thinking of a photo viewer where there will be a thumbnail on the left and Exif data on the right; clicking the thumbnail to give you a full screen of your picture and tapping it again to close...

I think a lot of people will be able to do a lot with this library. :sign0098:
 

Attachments

  • Calling....jpg
    Calling....jpg
    11 KB · Views: 98

derez

Expert
Licensed User
Longtime User
I join to Zenerdiode's comlaint.
I now have to upgrade my already finalized programs with this fantastic list.

Thanks a lot Erel & Ariel !

question: I saw that two list can be located side by side, and run independently. Is there possibility to tie them so that they will scroll together, like a table ?
 

Ariel_Z

Active Member
Licensed User
It's an interesting feature: I haven't thought about it. I will add it as a consideration for next versions. In the meantime, you can only set a timer that will check list1.IndexFirstShown and then will set list2.IndexFirstShow = x. I must say I did not check if this works and depending on the timer interval and the CPU, I might be a bit awkward and jumpy. It works only in multiplications of "integer items" - that is, it will not scroll them smoothly. You might consider, in the meantime, adjusting the right place for an image that will define a vertical separation bar and set the text so that it's around it. It's a bit awkward programming as well but will give better results for the user.
 

derez

Expert
Licensed User
Longtime User
Thanks Ariel, it is not crucial for me. the simple workaround is to combine the two cells to one text string and show them as on list item.
So, don't break your back for this feature , unless you also think of uses for it.
 

Byak@

Active Member
Licensed User
good work Ariel!Big thanks!
and what about a programmble scroll?
 

Ariel_Z

Active Member
Licensed User
Do you mean a scroll bar to the right of the list or the ability to scroll the list programmaticaly? To scroll it in code use IndexFirstShown (this actually jumps. Do you need it specifically to scroll to the right item?).
 

manu

Active Member
Licensed User
Longtime User
excellent library.

You can take the data from a table sqlite?

Latimer is a run with only 6.80 will need to update

:sign0188: :sign0098:


Google Traductor
 

derez

Expert
Licensed User
Longtime User
Text alignment in blist

Erel and Ariel
Is it possible to add text alignment to the item properties ?

I am using text padding to do it but alignment would be much nicer :

B4X:
item.TextPadding = (2*form4.Width/3 - StrLength(item.Text) * 7) / 2

Thanks
 

Attachments

  • blist.jpg
    blist.jpg
    51.5 KB · Views: 115

Ariel_Z

Active Member
Licensed User
We thought about it, but then, what would the exact preferences be? Suppose I align left (right in your case...), than should the list attach the text to pixel x=0? Same goes with top - I guess nobody wants to attach the text right to the very top of the item. So you must allow some padding. It got too coplicated at a certain point, so I preferred letting the programmer the absolute freedom. What do you think? I may be wrong. What I can do, anyhow, is to add TextCeneredPadding method that will return the x position for centring the text on a given default. You will have to recalc when you change the font/text, but that's usually rare. I would be glad to have suggestions.
 

derez

Expert
Licensed User
Longtime User
I think it should work in the same way as in textbox (in which I don't know how it is implemented ), so you shouls allow for 2-3 pixels on each side , or half the font width, something like that.

I didn't think about vertical alignment - I believe ther the padding is enough.

Another problem:

The clicking on the device for activating an item requires a very hard tick. is it possible to play with the sensitivity of it ? I guess you control the difference between a click and a touch for moving the list.
Edit: I checked again and found that the click on the device just needs to stay a little bit longer on the item in order to activate it smoothly. No need to change anything.:)
 
Last edited:

Ariel_Z

Active Member
Licensed User
As for the Click event you mentioned: I agree there is a fine tuning required there. There is actually a threshold for the minimal amount of time without movement that differentiates between a tick and the initial touch of a movement. If it's too short every touch raises the tick. I agree it's a bit too long now.
 

derez

Expert
Licensed User
Longtime User
Erel & Ariel
Thank you both for the info and advice.

I was not aware of the stringwidth function, but I don't think I need to be so exact.

Here is how I use the list with images in my family tree program. I like this library :D
 

Attachments

  • blist.jpg
    blist.jpg
    44.2 KB · Views: 133
Top