CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Thread: MsFlexGrid

  1. #1
    Guest

    MsFlexGrid

    In my application, I need Change the Columns' Width in a MsFlexgrid Control expcept the first fixed column ,but How Can I ? Thanks !


  2. #2
    Join Date
    Jul 1999
    Location
    Athens, Hellas
    Posts
    769

    Re: MsFlexGrid

    Add a module to your programm and add there this code:


    public Sub SetColWidth()
    Dim Counter as Integer
    'MSFlexGrid1
    for Counter = 1 to NumberOfColumns 'replace it with the actual number
    frmName.MSFlexGrid1.ColWidth(Counter) = 808 'play with this number
    frmName.MSFlexGrid1.FixedAlignment(Counter) = 3
    next Counter
    End Sub




    Customize this routine at your suites (eg. change the name of the form)
    Call this routine from your Form_Load event.


    Michael Vlastos
    Company MODUS SA
    Development Department
    Athens, Greece
    Tel: +3-01-9414900

  3. #3
    Guest

    Re: MsFlexGrid

    Dr_Michael:
    Thank you !
    If I want let end-user Change the Columns' Width except the first fixed column at run-time , How Can I ?
    yours daling.


  4. #4
    Join Date
    May 1999
    Location
    Oxford UK
    Posts
    1,459

    Re: MsFlexGrid

    There's an article at http://www.codeguru.com/vb/articles/1721.shtml which detect's a resize event on a flexgrid column/row.

    You could take this code and modify it so that any particular column doesn't get resized.


    Chris Eastwood

    CodeGuru - the website for developers
    http://www.codeguru.com/vb

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured