[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2394
  • Last Modified:

MS Flex Grid problem, vb6 how to justfiy text (center,left,right) in view.

hello,

How do you justify text in ms flex grid??  working code if possible...  Thanks!
0
bluedragon99
Asked:
bluedragon99
3 Solutions
 
bluedragon99Author Commented:
before data is added not after, to make it easier for ya.
0
 
lenzgeCommented:
Yupp, I face the same problem too. When a string is started with numeric, let says "2 friends", then it will be aligned to right automatically.
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
lttia1Commented:
Try this:

flexigrid.ColAlignment(index) = flexAlignRightCenter

The rest of the ColAlignment Properties can be found here:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/mshflx98/html/vbidxMSFlexGridControlConstants.asp
0
 
bhagyeshtCommented:
the following are the constants and their values for alignment

flexAlignLeftTop 0 The cell content is aligned left, top.
flexAlignLeftCenter 1 The cell content is aligned left, center. This is the default for strings.
flexAlignLeftBottom 2 The cell content is aligned left, bottom.
flexAlignCenterTop 3 The cell content is aligned center, top.
flexAlignCenterCenter 4 The cell content is aligned center, center.
flexAlignCenterBottom 5 The cell content is aligned center, bottom.
flexAlignRightTop 6 The cell content is aligned right, top.
flexAlignRightCenter 7 The cell content is aligned right, center. This is the default for numbers.
flexAlignRightBottom 8 The cell content is aligned right, bottom.
flexAlignGeneral 9 The cell content is of general alignment. This is "left, center" for strings and "right, center" for numbers


and the code that does it
MSFlexGrid1.Col = 0
MSFlexGrid1.Row = 1
MSFlexGrid1.Text = "left"
MSFlexGrid1.CellAlignment = flexAlignLeftBottom
MSFlexGrid1.Col = 1
MSFlexGrid1.Row = 1
MSFlexGrid1.Text = "right"
MSFlexGrid1.CellAlignment = flexAlignRightBottom
MSFlexGrid1.Col = 2
MSFlexGrid1.Row = 1
MSFlexGrid1.Text = "center"
MSFlexGrid1.CellAlignment = flexAlignCenterBottom


you can set the alignment for a whole column too like lttia1 said
0
 
bluedragon99Author Commented:
Thanks great information everyone!!  hope I was fair with the points.
0
 
lenzgeCommented:
Thanks to you all!

? @_@ ?
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now