Solved

MSFLEX text justify problem vb6

Posted on 2004-04-27
6
406 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 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
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!

 
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

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

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

Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Computer science students often experience many of the same frustrations when going through their engineering courses. This article presents seven tips I found useful when completing a bachelors and masters degree in computing which I believe may he…
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

691 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