Programming for Computing 07 - 08

Chapter: List Boxes

Module Admin   Contents, Index   Schedule  
1: Intro to VB    2: First Program and Projects    3: Variables, assignment, Strings    4: Type Conversion, InputBox, Constants    5:Built-in Functions    6: If - decisions    7: Loops - while, for    Example - find smallest    8: Scopes: local, global    9: Writing Procedures.Parameters, Functions   
10: Objects    11: Design    12: Testing    13: Graphics    14: Controls and events    15: Listboxes    16: Arrays    17: Files    18: The Command Line   

Appendices(links etc)   Additional Lectures    Tutorials (not in printed notes)     Selected solutions (not in printed notes)     Assignments    Additions and Errata   

new

The  schedule page has info on what we will do each week.

Why do we do this...

 


Section 15.0

Most programs process sequences - lists of data. For example:
  • a list of names in a database
  • a list of file names in a folder
  • the list (collection) of bytes in an mp3 file
  • the text of a web page.
Arrays, lists, collections are quite similar. Each of these can support these operations:
  • creating a new list
  • inserting a new item in the list (e.g. insert an item at the end of the list, or insert a new item at position number 37)
  • amending an existing item (e.g. amend item number 32 to "Mike" )
  • deleting an item (e.g. delete item number 24)
  • recalling an item (e.g. store item number 27 into x)

The notes for this section are in listboxes.doc


They use the VB listbox to give a visual representation of a list.

If your list does not need to be displayed on the screen (most of them are not displayed) then you can use the VB array facility. (In a later chapter)

Module Admin   Contents, Index