Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Wrapping text in a datagrid's column header

Status
Not open for further replies.

ChewDoggie

Programmer
Joined
Mar 14, 2005
Messages
604
Location
US
g'morning all!

I have a datagrid that has some column headers coded as so:

With ResultGrid
.Columns(1).Caption = "Grid" & vbLf & "Position" 'pos
.Columns(2).Caption = "Name" 'fullname
.Columns(3).Caption = "Competition" & vbCrLf & "Number" 'comp
.Columns(4).Caption = "Bike" & vbCrLf & "Size" 'bikesize
.Columns(5).Caption = "Finish" & vbLf & "Position" 'runfpos
.Columns(6).Caption = "Status" 'dns

....additional code

end with

I'm trying to wrap the text within the column's header, so that the text appears as:

Competition
Number

instead of:

Competition Number

I've tried using the "wraptext" property. It doesn't work (even when used in conjunction with the rowheight property). As my code testifies, I also tried vbCrLf, and vbLf as well as chr(10) and chr(13) but nothing works. If anyone has any ideas, I'd really appreciate it.

AMACycle
 
You should set HeadLines property instead
 
Thank you. That did it!

AMACycle
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top