Solved

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

Posted on 2004-04-26
7
2,371 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
Transaction Monitoring Vs. Real User Monitoring

Synthetic Transaction Monitoring Vs. Real User Monitoring: When To Use Each Approach? In this article, we will discuss two major monitoring approaches: Synthetic Transaction and Real User Monitoring.

 
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

Transaction Monitoring Vs. Real User Monitoring

Synthetic Transaction Monitoring Vs. Real User Monitoring: When To Use Each Approach? In this article, we will discuss two major monitoring approaches: Synthetic Transaction and Real User Monitoring.

Question has a verified solution.

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

Displaying an arrayList in a listView using the default adapter is rarely the best solution. To get full control of your display data, and to be able to refresh it after editing, requires the use of a custom adapter.
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Introduction to Processes

696 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