Solved

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

Posted on 2004-04-26
7
2,362 Views
Last Modified: 2007-12-19
hello,

How do you justify text in ms flex grid??  working code if possible...  Thanks!
0
Comment
Question by:bluedragon99
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 1

Author Comment

by:bluedragon99
ID: 10924236
before data is added not after, to make it easier for ya.
0
 

Expert Comment

by:lenzge
ID: 10924889
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
 
LVL 12

Assisted Solution

by:PCableGuy
PCableGuy earned 100 total points
ID: 10924921
0
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!

 
LVL 2

Accepted Solution

by:
lttia1 earned 200 total points
ID: 10924925
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
 
LVL 9

Assisted Solution

by:bhagyesht
bhagyesht earned 200 total points
ID: 10925076
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
 
LVL 1

Author Comment

by:bluedragon99
ID: 10925161
Thanks great information everyone!!  hope I was fair with the points.
0
 

Expert Comment

by:lenzge
ID: 10925955
Thanks to you all!

? @_@ ?
0

Featured Post

Industry Leaders: 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!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A short article about problems I had with the new location API and permissions in Marshmallow
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question