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!

MSHFLEXGRID header alignment

Status
Not open for further replies.

hlachica

Programmer
Joined
May 15, 2007
Messages
4
Location
MX
How can I align the headers of the MSHFLEXGRID, I´m using this but is not working, any ideas??

With Me.grd_AD
.FormatString = "*|^PART|^TOTAL|^ENERO|^FEBRERO"

.AllowUserResizing = flexResizeColumns

.ColWidth(0) = 200: '*
.ColWidth(1) = 800: 'partida
.ColWidth(2) = 1200: 'total
.ColWidth(3) = 1000: 'enero
.ColWidth(4) = 1100: 'febrero
 


Would that help?
Code:
With grd_AD
    .FormatString = "*|^PART|^TOTAL|^ENERO|^FEBRERO"
       
    .AllowUserResizing = flexResizeColumns
    [blue]
    .Row = 0
    .Col = 1
    .CellAlignment = flexAlignRightCenter
    .Col = 2
    .CellAlignment = flexAlignLeftCenter
    .Col = 3
    .CellAlignment = flexAlignCenterCenter
    [/blue]
    .ColWidth(0) = 200:     '*
    .ColWidth(1) = 800:     'partida
    .ColWidth(2) = 1200:    'total
    .ColWidth(3) = 1000:    'enero
    .ColWidth(4) = 1100:     'febrero
End With

Have fun.

---- Andy
 
works great!!! thanks!

but I thought that these simbols |^ did the same thing,
any comments about that??

 
For the formatstring property the pipe charater creates a new column. The carat('^') is an alignment character, here are the others.

'<' - left align (flexAlignLeftCenter)
'^' - center align (flexAlignCenterCenter)
'>' - right align (flexAlignRightCenter)

Your format string could read,
.FormatString = "*|>PART|<TOTAL|^ENERO|<FEBRERO"



zemp
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top