Solved

MSFLEX text justify problem vb6

Posted on 2004-04-27
6
393 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
How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

 
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
A short article about problems I had with the new location API and permissions in Marshmallow
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 …
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 …

762 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

21 Experts available now in Live!

Get 1:1 Help Now