Solved

MSFLEX text justify problem vb6

Posted on 2004-04-27
6
399 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
Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

 
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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
groupSumClump challenge 9 115
Program to display an alert on Windows Toolbar 2 76
how to send memory stream from ics Client To ics server ? 11 105
SQL Insert parts by customer 12 31
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.
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…
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

813 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

17 Experts available now in Live!

Get 1:1 Help Now