View Single Post
  #49 (permalink)  
Old 12-30-2009, 10:51 AM
corwin42 corwin42 is offline
Basic4ppc Expert
 
Join Date: Jul 2008
Location: Borchen, Germany
Posts: 571
Send a message via Skype™ to corwin42
Awards Showcase
Beta Tester 
Total Awards: 1
Default 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.

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?
Attached Images
File Type: jpg blistTest.jpg (19.7 KB, 114 views)
Attached Files
File Type: sbp bListTest.sbp (4.3 KB, 71 views)

Last edited by corwin42 : 12-30-2009 at 12:59 PM.
Reply With Quote