Results 1 to 3 of 3

Thread: Scrollbars

  1. #1

    Thread Starter
    Member
    Join Date
    Sep 2001
    Location
    Montreal
    Posts
    34

    Scrollbars

    Hi all,

    Is there is a way to find out if the vertical scrollbar in a MsFlexGrid is active??

    This is because I want to resize my grid columns so all can be visible.

  2. #2
    PowerPoster beachbum's Avatar
    Join Date
    Jul 2001
    Location
    Wollongong, NSW, Australia
    Posts
    2,274
    Hi
    U can do it by comparing the rowheight to the control height. This code assumes that each row is the same height.
    Regards
    Stuart
    VB Code:
    1. Private Sub Command1_Click()
    2.     With MSFlexGrid1
    3.         .AddItem "test" & vbTab & "test" & vbTab & "test"
    4.         If .Rows * .RowHeight(0) > .Height Then
    5.             .ColWidth(2) = 1000
    6.         End If
    7.     End With
    8. End Sub
    Stuart Laidlaw
    Brightspark Financial Software
    http://www.gstsmartbook.com

  3. #3

    Thread Starter
    Member
    Join Date
    Sep 2001
    Location
    Montreal
    Posts
    34
    Thank you beachbum.

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