CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Sep 1999
    Posts
    102

    flexgrid beginer question

    Hello,
    I want to set active cell in a flexgrid conrol by code and not with a mouse click event.
    I tried to set the col and row properties:
    MSflexgrid1.row = 1
    MSflexgrid1.col = 1
    But this just has no efect.

    Any pointers as well msdn pointers will be welcome.
    Thanks.


  2. #2

    Re: flexgrid beginer question

    I added the following to a form load event:

    With MSFlexGrid1
    .Rows = 4
    .Cols = 4

    .Col = 3
    .Row = 3
    End With

    This made the bottom/right most cell the active cell, as can be seen by the dotted lines around the cell.

    Charlie Zimmerman
    http://www.freevbcode.com


  3. #3
    Join Date
    Sep 1999
    Posts
    102

    Re: flexgrid beginer question

    hmm, well, I have tow questions about what you wrote:
    First in what way is it different from what I wrote - other than the style?
    Second, I tried what you wrote - and it did nothing as well - the cell is not selected with the dotted frame...
    But, when using break point during run time the line in the "with" block gave the next tooltip text:
    .col = <object variable or with block variable not set>
    What am I supposed to set?




  4. #4
    Join Date
    May 1999
    Location
    Omika, Japan
    Posts
    729

    Re: flexgrid beginer question

    Is the FlexGrid properly installed? It should be, because it comes default with VB.

    That code should work, otherwise

    Or is the variable Name (of the Grid) different? "With block not set" means the variable is not pointing to Valid data at the moment.

    RK

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