Add pbvList to FF3?

Started by Pat Dooley, February 05, 2010, 08:50:07 AM

Previous topic - Next topic

Pat Dooley

Is there any chance of adding pbvList to the FF3 custom controls?

Paul Squires

Sure - It used to be part of the FF2 custom controls. It is a pretty simple control. I just need to get some new bitmaps designed for it to display in the ToolBox, etc...

Paul Squires
PlanetSquires Software

Jean-pierre Leroy

Pat,

Can you explain what is a pbvList ? what are the advantages compared to a listview ?

Thanks,
Jean-Pierre

Paul Squires

It is just a virtual listbox. Nothing fancy. Here is the text from Borje's source:

Quote
' Basic version, for instant display of array of any size in one column,
'                vertical scroll bar only. Modify if you have other needs.
'
' Advantages:    Lean and mean. Uses existing data and only visible items
'                are drawn, which makes it very fast and lean on memory.
'                Good for viewing huge arrays.
'
' Disadvantages: Only works with global arrays.
'                No direct editing of Listbox items, but via PB's ARRAY
'                functions, this is easily solved. Sample code shows how.
'
' File(s)        PBVLIST.INC, include file for the Virtual ListBox
'                PBVLIST.BAS, example program for the Virtual ListBox
'
' This Virtual Listbox sort of works like a "Visual Array", so the
' array to be shown must be global. Any changes to list items must be
' done by working directly with the array and then use %VLB_SETARRAY
' and %VLB_REFRESH messages to refresh the list. See sample code in
' PBVLIST.BAS. PowerBasic has some excellent tools for working with
' arrays via ARRAY SORT, ARRAY SCAN, ARRAY DELETE and ARRAY INSERT.
'
' Selection is drawn with default colors when control has focus and grayed
' when it loses focus, for a better view of which control that has focus.
' Code for this is in WM_PAINT, if you prefer standard behaviour instead.
'
' Control sends %WM_CTLCOLORLISTBOX in %WM_PAINT to parent, to get handle
' of background color brush (if the message is handled by parent dialog).
'
' Creation can be made either DDT or SDK way, in CreateVirtualList(..)
'
' On font change, control resizes itself to to avoid partial lines (see WM_SETFONT).
'
' Additional notification messages added for easier handling of
' Enter, Space bar and Delete keys.
'
' Tip: Items are drawn in WM_PAINT. You can easily change things there to
'      suit you own needs. For columns, you can use TabbedTextOut, or parse
'      each item and use multiple TextOut's with x set to proper values for
'      each column. Using SetTextColor, you can even set different colors to
'      each column or word, etc. Instead of using an array, one could also
'      connect it to a database file, where visible items are read directly
'      from the file, in WM_PAINT. With only a few changes and the addition
'      of a caret, you can even turn it into an edit control.. :-)
Paul Squires
PlanetSquires Software