Article ID: 141023
Article Last Modified on 11/18/2003
Simulate the list box with a picture box control. You can store the desired text strings in an array of strings, and use the Print method to write the array entries into the picture box with different ForeColor properties. For example:
picture1.BackColor = QBColor(14) ' 14=Light yellow
picture1.ForeColor = QBColor(4) ' 4=Red
picture1.Print "in living red"
picture1.ForeColor = QBColor(2) ' 2=Green
picture1.Print "in living green"
You can also add a vertical scroll bar next to the picture box. When the scroll bar is scrolled, your code needs to redraw the picture box. The ForeColor property of the picture box controls the current color used by the Print method. The picture box will not let you highlight text. NOTE: The BackColor method erases any pre-existing text on the picture control.
Additional query words: 3.00 4.00 vb4win vb432 listbox
Keywords: kb3rdparty KB141023