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

Thread: Automatically Displaying a FlexGrid's Middle Column

  1. #1
    Join Date
    Mar 2000
    Posts
    292

    Automatically Displaying a FlexGrid's Middle Column

    I have a form containing a flexgrid with 3 fixed columns and 29 scrollable columns, for a total of 32 (numbered 0-31). The scrollable columns look like a monthly calendar but the dates/days shown vary depending upon the current date. The current date always falls on the 17th column. Since the entire flexgrid doesn't fit on screen, and the grid is populated row-wise, only the first left-hand columns are displayed. But the more important columns, located on the right-hand side of the flexgrid, are hidden. Therefore, after the form is loaded, the user has to scroll to the right to see the rest of the flexgrid. How can I show my form with the first 3 fixed columns intact, then the 4th-16th columns hidden (less important columns), and the more important ones, starting at the 17th column, automatically shown when the form is first loaded? In effect, the flexgrid seems like it is automatically horizontally scrolled to display the 17th to the end columns, saving the user from manual scrolling.

  2. #2
    Join Date
    Apr 2000
    Location
    Southampton, UK
    Posts
    329
    Just use this when you load the grid:

    MSFlexGrid1.LeftCol = 17

    This will set the first visible column to 17, the preceeding ones can be viewed by scrolling left if required.
    TimCottee
    I know a little about a lot of things and a lot about very little.

    Brainbench MVP For Visual Basic
    http://www.brainbench.com

    MCP, MCSD, MCDBA, CPIM

  3. #3
    Join Date
    Mar 2000
    Posts
    292
    Thanks a lot! This is just what I needed!

Posting Permissions

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


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)