Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > Beginning VB 6
|
Beginning VB 6 For coders who are new to Visual Basic, working in VB version 6 (not .NET).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning VB 6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 8th, 2004, 01:11 PM
Registered User
 
Join Date: Dec 2003
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default FlexGrid and Left Justifying the Columns

Hi,

I'm using MSFLXGRD in my application. There is a property called StringFormat that it looks like I cna use to set the justification of all the columns in the Grid. For some reason, my Help won't come up when I click on it. So my question is, How can I left justify all the colmns in a FlexGrid? It looks like it left justifies strings and right justifies text. My problem is addresses. Suppose the address it "1234 Main St." Because it thinks it's a number, it right justifies. But because it IS a string, it pads with blanks at the end. So it "looks" like it is center justified. How can I force it to left justify? Thank you.

 
Old January 13th, 2004, 06:02 PM
Registered User
 
Join Date: Dec 2003
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

:( It's been 5 days and no reply. I sure need help with this folks. I tried LSET on the strings, but it just came out blank.

Here is the code I tried.

Addresses.Col = 5
Address = Kansas.GetASCIIRowValue(ADDR, Rows)
LSet Address2 = Address
Addresses.Text = Addresses2
 
Old January 13th, 2004, 08:09 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 627
Thanks: 0
Thanked 0 Times in 0 Posts
Default

This will left justify all your columns:

    With MSFlexGrid1
        Dim k As Long
        For k = 0 To .Cols - 1
            .ColAlignment(k) = flexAlignLeftCenter
        Next
    End With

Marco





Similar Threads
Thread Thread Starter Forum Replies Last Post
LEFT vs LEFT OUTER joxa83 SQL Server 2005 3 September 18th, 2008 03:13 AM
FlexGrid amlesh Beginning VB 6 0 July 26th, 2007 01:31 AM
Vs-flexgrid MathLearner Beginning VB 6 0 June 4th, 2007 01:52 AM
Flexgrid umeshtheone Beginning VB 6 1 May 30th, 2007 06:02 AM
FLEXGRID...HELP!!! apek VB How-To 4 January 20th, 2004 05:19 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.