Re: Merge Cell in MSHFlexgrid

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Rajesh Birelly (Rajesh.Birelly_at_ameriteck.net)
Date: 07/30/04


Date: Fri, 30 Jul 2004 17:20:04 +0530

hi
    Either you merge the Rows or the Columns Not both at the same time.Try
with this one.
    Private Sub MergeGrid()
    Grid.MergeCells = flexMergeFree

    For irow = 1 To 3
        For jcol = 1 To 3
            Grid.MergeCol(jcol) = True
' Grid.MergeRow(irow) = True
            Grid.TextMatrix(irow, jcol) = "Test"
        Next 'jRow
    Next 'iRow
End Sub

Regards
Rajesh

"Pedro Matos" <ppmatos@antenalatina7.com> wrote in message
news:expgiFRdEHA.644@tk2msftngp13.phx.gbl...
> Hi, Guys,
>
> I need to know how to merge multiple rows and columns into one single
cell.
> Example of my MSHFlexgrid:
>
>
> Before Merge Desire Result
> Col0 Col1 Col2 Col0
> Row0 Test Test Test Row0 Test
> Row1 Test Test Test
> Row2 Test Test Test
> Row3 Test Test Test
>
>
> This is part of my code for merging, but without success.
>
> ' The MSHFlexgrid Name = Grid
>
> Private Sub MergeGrid()
> For iRow = 0 to 3
> For jCol = 0 to 2
> Grid.TextMatrix(iRow, jCol) = "Test"
> Next 'jRow
> Next 'iRow
>
> Grid.MergeCol(0) = True
> Grid.MergeCol(1) = True
> Grid.MergeCol(2) = True
>
> Grid.MergeRow(0) = True
> Grid.MergeRow(1) = True
> Grid.MergeRow(2) = True
> Grid.MergeRow(3) = True
>
> Grid.MergeCells = flexMergeFree
> End Sub
>
> I'll appreciate any help.
>
> thanks in advanced.
>
>



Relevant Pages

  • Re: Commodore rises from the dead
    ... A gang of C64 zombies attacked the ... software displays at a California Wal-Mart today. ... Best regards, ... test test test ...
    (comp.sys.cbm)
  • Processing and adding numbers from lines.
    ... Is there an easy way to automate the processing of adding the following ... test test test description ... Regards, ... Prev by Date: ...
    (comp.lang.php)