Solved

MSFLEX text justify problem vb6

Posted on 2004-04-27
6
398 Views
Last Modified: 2012-06-27
How would I center justify this line this doesn't seem to work:  Alerter.AlertGrid.Centercenter

Alerter.AlertGrid.AddItem "Source IP" & vbTab & FirstField & vbTab & SecondField & vbTab & ThirdField & vbTab & FourthField & vbTab & FifthField & vbTab & SixthField & vbTab & SeventhField & vbTab & EighthField, 1
0
Comment
Question by:bluedragon99
  • 5
6 Comments
 
LVL 1

Author Comment

by:bluedragon99
ID: 10933694
anyone?
0
 
LVL 1

Accepted Solution

by:
sam1234594 earned 500 total points
ID: 10937695
hye blue dragon. simply cut and paste the code and put one commandbutton to see the effect.

Private Sub Command1_Click()
alerter.alertgrid.CellAlignment = vbCenter
firstfield = "207"
secondfield = "208"
thirdfield = "001"
alerter.alertgrid.AddItem "Source IP" & vbTab & firstfield & vbTab & secondfield & vbTab & thirdfield & vbTab & FourthField & vbTab & FifthField & vbTab & SixthField & vbTab & SeventhField & vbTab & EighthField, 1
For i = 0 To alertgrid.Rows - 1
For j = 0 To alertgrid.Cols - 1
alertgrid.Row = i
alertgrid.Col = j
alertgrid.CellAlignment = 4
Next
Next



This will solve your problem and after that you can customize according to your need.
End Sub
0
 
LVL 1

Author Comment

by:bluedragon99
ID: 10941169
This does work but time execution is very critical on this app is there a way to do it without a loop?  tell it to justify everything that way then populate tables?
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 1

Author Comment

by:bluedragon99
ID: 10943580
Yup this is def a problem, I need this to run due to my grid being 2000 lines I can't populate the grid then reformat it it adds to much time even with redraw off.  Help!
0
 
LVL 1

Author Comment

by:bluedragon99
ID: 10943652
can you tell it to be centered before population
0
 
LVL 1

Author Comment

by:bluedragon99
ID: 10943944
nevermind got it with this:

.ColAlignment(i - 1) = flexAlignCenterCenter
        .ColAlignment(i - 2) = flexAlignCenterCenter
        .ColAlignment(i) = flexAlignCenterCenter
        .ColAlignment(i + 1) = flexAlignCenterCenter
        .ColAlignment(i + 2) = flexAlignCenterCenter
        .ColAlignment(i + 3) = flexAlignCenterCenter
        .ColAlignment(i + 4) = flexAlignCenterCenter
        .ColAlignment(i + 5) = flexAlignCenterCenter
        .ColAlignment(i + 6) = flexAlignCenterCenter
        .ColAlignment(i + 7) = flexAlignCenterCenter
        .AddItem FirstField & vbTab & SecondField & vbTab & ThirdField & vbTab & FourthField & vbTab & FifthField & vbTab & SixthField & vbTab & SeventhField & vbTab & EighthField, 1
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

RIA (Rich Internet Application) tools are interactive internet applications which have many of the characteristics of desktop applications. The RIA tools typically deliver output either by the way of a site-specific browser or via browser plug-in. T…
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 …
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
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…

863 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

Need Help in Real-Time?

Connect with top rated Experts

28 Experts available now in Live!

Get 1:1 Help Now