?
Solved

MSFLEX text justify problem vb6

Posted on 2004-04-27
6
Medium Priority
?
412 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
[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
  • 5
6 Comments
 
LVL 1

Author Comment

by:bluedragon99
ID: 10933694
anyone?
0
 
LVL 1

Accepted Solution

by:
sam1234594 earned 1500 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
Technology Partners: 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 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
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…
Starting up a Project

649 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