bList v0.9 (beta) released

derez

Expert
Licensed User
Longtime User
To those who suffer from memory problems when showing a long list - see my TMUNA application. I'm using the jpeg library and get many thumbnails of 40*40 with no memory problems.
 
D

Deleted member 103

Guest
Hi Erel,
I have a problem with the new dll and that no longer works with Visual Basic 2008. With the release of 20.09.2009 it has worked very well.

The error is thrown in this line:

Private WithEvents list As blist
list = New bControls.bList (pnlPanel, 2, 2, pnlPanel.Width - 4, pnlPanel.Height - 4)

Error= NullReferenceException

What is different with the new version?


Ciao,
Filippo
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
Hi Erel,
I have a problem with the new dll and that no longer works with Visual Basic 2008. With the release of 20.09.2009 it has worked very well.

The error is thrown in this line:

Private WithEvents list As blist
list = New bControls.bList (pnlPanel, 2, 2, pnlPanel.Width - 4, pnlPanel.Height - 4)

Error= NullReferenceException

What is different with the new version?


Ciao,
Filippo

Please send me an email to [email protected] with this issue.
 

kohle

Active Member
Licensed User
Longtime User
When I remove an item with a pic from a list. I can´t delete the pic file with FileDel.
The error message says that the file is still in use by blist
 

corwin42

Expert
Licensed User
Longtime User
Custom Layout for list items

This control is really great!

I am planning to write a portfolio manager and thought about using bList for the list of shares. At first I thought I will get problems because I want to display additional information like the current value of the share in the list.

After sleeping a night about it I found the solution and I now present you the completely customizable bListItem layout engine :) and it is really easy to do it. :sign0060:

The trick is to use a bitmap that has exactly the size of one bListItem. Then write a custom drawing function that just draws on this bitmap and then assign this bitmap to the bList item.

It is even possible to select an item. Just get the bitmap back from the bListItem and redraw it in selected state.

See the little example for details. (Needs ImageLibEx.dll and of course bList.dll)

The only limitation I can see on this is that you need a fullsize bitmap for every bListItem so you need some memory for very large lists.

I have two questions:
1. Will you provide the .cs file in the future so we can merge the dll into the executable?
2. Would it be possible to display something like a position indicator at the right of the list so the user can see if he can scroll up or down any more?
 

Attachments

  • bListTest.sbp
    4.3 KB · Views: 77
  • blistTest.jpg
    blistTest.jpg
    19.7 KB · Views: 121
Last edited:

corwin42

Expert
Licensed User
Longtime User
Good idea ! But don´t work with compile autoscale yet

Thats only because the simple example code doesn't handle it. Here is the version wich is autoscalable. (additionally needs ControlExDevice.dll for FixX and FixY variables)
 

Attachments

  • bListTest.sbp
    4.5 KB · Views: 60

Joosttt

Member
Licensed User
Great tool!
And together with Corwin42's solution for custom layout this is just what i needed!

:sign0098:
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
I have two questions:
1. Will you provide the .cs file in the future so we can merge the dll into the executable?
2. Would it be possible to display something like a position indicator at the right of the list so the user can see if he can scroll up or down any more?

1. Yes. It will probably be available in together with the next version of Basic4ppc.
2. Good idea. Will add it to the features list.
 

Zaam

Member
Licensed User
This library provides the exact features I was missing, I feel that a finger friendly interface it's definitely a must these days. Thanks everyone for your work!
@Zaam - could this do the trick for you?
As I told you in private, yes it will most likely do! So thanks cornwin too :)
 

schimanski

Well-Known Member
Licensed User
Longtime User
bList Gradient???

Hello!

I want to create a blist with gradient items, but there is no gradient..:BangHead:

B4X:
blistGPS.New2("Hauptschirm",0,90,120,159) 
blistGPS.BackColor = cGray
blistGPS.ItemHeight=40
blistGPS.AddFromString("Test1", cBlack, cWhite)
blistGPS.AddFromString("Test2", cBlack, cWhite)
blistGPS.AddFromString("Test3", cBlack, cWhite)
blistGPS.Visible=False
   
blistitem.New1
blistitem.CreateNe
blistitem.BackColor2 = cBlack
blistitem.BackColor1 = cWhite
blistitem.isFillGradient=True

Sub menu_click
   blistGPS.visible=true
end sub

I dont' know how????

Thanks for help
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
Here is an example (code is also attached):
B4X:
Sub Globals
    'Declare the global variables here.

End Sub

Sub App_Start
    Form1.Show
    bList.New2("form1", 0, 90, 120, 159)
    blist.ItemHeight = 40
    bList.BackColor = cGray
    bListItem.New1
    AddItem("Test1")
    AddItem("Test2")
    AddItem("Test3")
End Sub

Sub AddItem(text)
    bListItem.Value = bList.AddFromString(text, cBlack, cWhite) 'catch the newly created item
    bListItem.isFillGradient = True
End Sub
 

Attachments

  • 1.sbp
    785 bytes · Views: 16

dlfallen

Active Member
Licensed User
Longtime User
list.getitem()?

Question regarding bList:

I am (for my own use) modifying the Contacts example to us a list of nearly 300 Names/Phone Numbers.

I have added a listbox containing the letters A - Z and when a letter is selected, I want the list to scroll to the first item that begins with that letter. However, I cannot find the item because as I cycle through i = 0 to list.count -1, list.GetItem(i) always returns an empty string.

What am I doing wrong?
 
Top