Change the alignment of a cell in msflexgrid

How do I change the alignment in just a single cell in a MSHFlexGrid?
I use this command but it doesn't change the cell MSHFlexGrid1.CellAlignment = flexAlignLeftBottom.
I'm not sure that it is changing the correct cell. How do I select the proper cell?
I'm doing this in Visaul Basic
Thanks
whiwexAsked:
Who is Participating?
 
ShauliCommented:
You have to define the col and the row, as in:

MSHFlexGrid1.Col =1
MSHFlexGrid1.Row=1
MSHFlexGrid1.CellAlignment = flexAlignLeftBottom

S
0
 
SethiCommented:
As Shauli pointed out, to change the alignment of a single cell, you need to set the focus on that cell first by using the following:
MSHFlexGrid1.Col =1
MSHFlexGrid1.Row=1

Then use the cell alignment property:
MSHFlexGrid1.CellAlignment = flexAlignLeftBottom

In case you need to align the whole column then this is how you do it:
MSHFlexGrid1.ColAlignment(1) = flexAlignLeftCenter

To align Fixed columns:
MSHFlexGrid1.FixedAlignment(1) = flexAlignCenterCenter
0
 
samstarkeyCommented:
Or

MSHFlexGrid1.FixedAlignment(1) = 3

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.