PRB: Cannot Set TabStops in ListBox Using SendMessage API (183518)
The information in this article applies to:
- Microsoft Visual Basic Learning Edition for Windows 5.0
- Microsoft Visual Basic Learning Edition for Windows 6.0
- Microsoft Visual Basic Professional Edition for Windows 5.0
- Microsoft Visual Basic Professional Edition for Windows 6.0
- Microsoft Visual Basic Enterprise Edition for Windows 5.0
- Microsoft Visual Basic Enterprise Edition for Windows 6.0
This article was previously published under Q183518 SYMPTOMS
When you use the SendMessage API and the LB_SETTABSTOPS message to define
custom TabStops within a ListBox control to give the appearance of multiple
columns, there is no effect on a ListBox control whose Style property is
set to "1 - Checkbox."
CAUSE
To set the columns in the ListBox, send the ListBox control a
LB_SETTABSTOPS message along with information to define the TabStops. A
list box must be created with the LBS_USETABSTOPS style to respond to this
message. The Visual Basic ListBox with a style set to "1 - Checkbox" is not
created with the LBS_USETABSTOPS style. Therefore, the LB_SETTABSTOPS
message has no effect on the ListBox control.
RESOLUTION
To set custom TabStops within the standard Visual Basic ListBox control,
you must set the style setting to "0 [ASCII 150] Standard." Alternatives include
using controls provided by third-party vendors, or using the Microsoft Grid
or ListView controls to obtain the look and functionality you desire.
STATUS
This behavior is by design.
Modification Type: | Major | Last Reviewed: | 5/13/2003 |
---|
Keywords: | kbGrpDSVB kbprb KB183518 kbAudDeveloper |
---|
|