MSflexgrid question

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • rv daffin

    MSflexgrid question

    I need to clear the grid between updates without clearing the header row.
    What is the speediest way to do this?
    Thanks for your time.

    --
    Dink - There are 10 kinds of people in the world... those that know binary
    and those that don't.


  • Rick Rothstein

    #2
    Re: MSflexgrid question

    > I need to clear the grid between updates without clearing[color=blue]
    > the header row. What is the speediest way to do this?[/color]

    What about a subroutine along these lines?

    Sub ClearAllExceptH eaderRow()
    Dim CurrentRow As Long
    Dim CurrentCol As Long
    Dim CurrentRepeatSt yle As Long
    With MSFlexGrid1
    CurrentRow = .Row
    CurrentCol = .Col
    CurrentRepeatSt yle = .FillStyle
    .FillStyle = flexFillRepeat
    .Row = 1
    .Col = 0
    .RowSel = .Rows - 1
    .ColSel = .Cols - 1
    .Text = ""
    .Row = CurrentRow
    .Col = CurrentCol
    .FillStyle = CurrentRepeatSt yle
    .SetFocus
    End With
    End Sub

    Rick - MVP

    Comment

    • John

      #3
      Re: MSflexgrid question

      If you need to refill the grid with the Grid1.AddItem method, just set the
      grid1.rows = 1

      greets John

      "rv daffin" <dink@daffin.ne t> schreef in bericht
      news:gNwrd.9916 $NU3.7096@newsr ead1.news.pas.e arthlink.net...[color=blue]
      > I need to clear the grid between updates without clearing the header row.
      > What is the speediest way to do this?
      > Thanks for your time.
      >
      > --
      > Dink - There are 10 kinds of people in the world... those that know[/color]
      binary[color=blue]
      > and those that don't.
      >
      >[/color]


      Comment

      • rv daffin

        #4
        Re: MSflexgrid question

        Rick - thanks this clears the text fine, however I have 2 cols that also
        include a picture. What method will clear the pics as well.
        thanks once again.

        --
        Dink - There are 10 kinds of people in the world... those that know binary
        and those that don't.
        "Rick Rothstein" <rickNOSPAMnews @NOSPAMcomcast. net> wrote in message
        news:3pqdnXaLCN xtADPcRVn-qw@comcast.com. ..[color=blue][color=green]
        > > I need to clear the grid between updates without clearing
        > > the header row. What is the speediest way to do this?[/color]
        >
        > What about a subroutine along these lines?
        >
        > Sub ClearAllExceptH eaderRow()
        > Dim CurrentRow As Long
        > Dim CurrentCol As Long
        > Dim CurrentRepeatSt yle As Long
        > With MSFlexGrid1
        > CurrentRow = .Row
        > CurrentCol = .Col
        > CurrentRepeatSt yle = .FillStyle
        > .FillStyle = flexFillRepeat
        > .Row = 1
        > .Col = 0
        > .RowSel = .Rows - 1
        > .ColSel = .Cols - 1
        > .Text = ""
        > .Row = CurrentRow
        > .Col = CurrentCol
        > .FillStyle = CurrentRepeatSt yle
        > .SetFocus
        > End With
        > End Sub
        >
        > Rick - MVP[/color]


        Comment

        • Rick Rothstein

          #5
          Re: MSflexgrid question

          Interesting question... I don't use the MSFlexGrid myself, so I don't
          know off the top of my head. How did you put the pictures into the
          cells?

          Rick - MVP


          "rv daffin" <dink@daffin.ne t> wrote in message
          news:DDGrd.1024 2$NU3.9247@news read1.news.pas. earthlink.net.. .[color=blue]
          > Rick - thanks this clears the text fine, however I have 2 cols that[/color]
          also[color=blue]
          > include a picture. What method will clear the pics as well.
          > thanks once again.
          >
          > --
          > Dink - There are 10 kinds of people in the world... those that know[/color]
          binary[color=blue]
          > and those that don't.
          > "Rick Rothstein" <rickNOSPAMnews @NOSPAMcomcast. net> wrote in message
          > news:3pqdnXaLCN xtADPcRVn-qw@comcast.com. ..[color=green][color=darkred]
          > > > I need to clear the grid between updates without clearing
          > > > the header row. What is the speediest way to do this?[/color]
          > >
          > > What about a subroutine along these lines?
          > >
          > > Sub ClearAllExceptH eaderRow()
          > > Dim CurrentRow As Long
          > > Dim CurrentCol As Long
          > > Dim CurrentRepeatSt yle As Long
          > > With MSFlexGrid1
          > > CurrentRow = .Row
          > > CurrentCol = .Col
          > > CurrentRepeatSt yle = .FillStyle
          > > .FillStyle = flexFillRepeat
          > > .Row = 1
          > > .Col = 0
          > > .RowSel = .Rows - 1
          > > .ColSel = .Cols - 1
          > > .Text = ""
          > > .Row = CurrentRow
          > > .Col = CurrentCol
          > > .FillStyle = CurrentRepeatSt yle
          > > .SetFocus
          > > End With
          > > End Sub
          > >
          > > Rick - MVP[/color]
          >
          >[/color]

          Comment

          • rv daffin

            #6
            Re: MSflexgrid question

            I used "set grid1.cellpictu re = img1.picture
            I've found the fastest way to clear the grid totally is by using -
            grid1.clear and then re-doing the header routine.
            thanks again
            --
            Dink - There are 10 kinds of people in the world... those that know binary
            and those that don't.
            "Rick Rothstein" <rickNOSPAMnews @NOSPAMcomcast. net> wrote in message
            news:1K6dnTwIAt Na1jLcRVn-2A@comcast.com. ..[color=blue]
            > Interesting question... I don't use the MSFlexGrid myself, so I don't
            > know off the top of my head. How did you put the pictures into the
            > cells?
            >
            > Rick - MVP
            >
            >
            > "rv daffin" <dink@daffin.ne t> wrote in message
            > news:DDGrd.1024 2$NU3.9247@news read1.news.pas. earthlink.net.. .[color=green]
            > > Rick - thanks this clears the text fine, however I have 2 cols that[/color]
            > also[color=green]
            > > include a picture. What method will clear the pics as well.
            > > thanks once again.
            > >
            > > --
            > > Dink - There are 10 kinds of people in the world... those that know[/color]
            > binary[color=green]
            > > and those that don't.
            > > "Rick Rothstein" <rickNOSPAMnews @NOSPAMcomcast. net> wrote in message
            > > news:3pqdnXaLCN xtADPcRVn-qw@comcast.com. ..[color=darkred]
            > > > > I need to clear the grid between updates without clearing
            > > > > the header row. What is the speediest way to do this?
            > > >
            > > > What about a subroutine along these lines?
            > > >
            > > > Sub ClearAllExceptH eaderRow()
            > > > Dim CurrentRow As Long
            > > > Dim CurrentCol As Long
            > > > Dim CurrentRepeatSt yle As Long
            > > > With MSFlexGrid1
            > > > CurrentRow = .Row
            > > > CurrentCol = .Col
            > > > CurrentRepeatSt yle = .FillStyle
            > > > .FillStyle = flexFillRepeat
            > > > .Row = 1
            > > > .Col = 0
            > > > .RowSel = .Rows - 1
            > > > .ColSel = .Cols - 1
            > > > .Text = ""
            > > > .Row = CurrentRow
            > > > .Col = CurrentCol
            > > > .FillStyle = CurrentRepeatSt yle
            > > > .SetFocus
            > > > End With
            > > > End Sub
            > > >
            > > > Rick - MVP[/color]
            > >
            > >[/color]
            >[/color]


            Comment

            • John

              #7
              Re: MSflexgrid question

              set grid1.cellpictu re = nothing

              greets John

              "rv daffin" <dink@daffin.ne t> schreef in bericht
              news:yjJrd.6191 $u81.2214@newsr ead3.news.pas.e arthlink.net...[color=blue]
              > I used "set grid1.cellpictu re = img1.picture
              > I've found the fastest way to clear the grid totally is by using -
              > grid1.clear and then re-doing the header routine.
              > thanks again
              > --
              > Dink - There are 10 kinds of people in the world... those that know[/color]
              binary[color=blue]
              > and those that don't.
              > "Rick Rothstein" <rickNOSPAMnews @NOSPAMcomcast. net> wrote in message
              > news:1K6dnTwIAt Na1jLcRVn-2A@comcast.com. ..[color=green]
              > > Interesting question... I don't use the MSFlexGrid myself, so I don't
              > > know off the top of my head. How did you put the pictures into the
              > > cells?
              > >
              > > Rick - MVP
              > >
              > >
              > > "rv daffin" <dink@daffin.ne t> wrote in message
              > > news:DDGrd.1024 2$NU3.9247@news read1.news.pas. earthlink.net.. .[color=darkred]
              > > > Rick - thanks this clears the text fine, however I have 2 cols that[/color]
              > > also[color=darkred]
              > > > include a picture. What method will clear the pics as well.
              > > > thanks once again.
              > > >
              > > > --
              > > > Dink - There are 10 kinds of people in the world... those that know[/color]
              > > binary[color=darkred]
              > > > and those that don't.
              > > > "Rick Rothstein" <rickNOSPAMnews @NOSPAMcomcast. net> wrote in message
              > > > news:3pqdnXaLCN xtADPcRVn-qw@comcast.com. ..
              > > > > > I need to clear the grid between updates without clearing
              > > > > > the header row. What is the speediest way to do this?
              > > > >
              > > > > What about a subroutine along these lines?
              > > > >
              > > > > Sub ClearAllExceptH eaderRow()
              > > > > Dim CurrentRow As Long
              > > > > Dim CurrentCol As Long
              > > > > Dim CurrentRepeatSt yle As Long
              > > > > With MSFlexGrid1
              > > > > CurrentRow = .Row
              > > > > CurrentCol = .Col
              > > > > CurrentRepeatSt yle = .FillStyle
              > > > > .FillStyle = flexFillRepeat
              > > > > .Row = 1
              > > > > .Col = 0
              > > > > .RowSel = .Rows - 1
              > > > > .ColSel = .Cols - 1
              > > > > .Text = ""
              > > > > .Row = CurrentRow
              > > > > .Col = CurrentCol
              > > > > .FillStyle = CurrentRepeatSt yle
              > > > > .SetFocus
              > > > > End With
              > > > > End Sub
              > > > >
              > > > > Rick - MVP
              > > >
              > > >[/color]
              > >[/color]
              >
              >[/color]


              Comment

              Working...