Info

The appearance of the ListBox has now been set. When the user activates the ListBox, she will see only the store names. To return the value of the first column,set the BoundColumn property to 1 .This can be done through the Properties window or through code.This example uses code to maintain the flexibility of returning the store number (see Figure 21.18):

Private Sub lb_StoreName_Click()

lb_StoreName.BoundColumn = 2 lbl_StoreNum.Caption = lb_StoreName

End Sub

Figure 21.18

Use a two-column ListBox to allow the user to select a store name, but return the store number.

Figure 21.18

Use a two-column ListBox to allow the user to select a store name, but return the store number.

0 0

Post a comment