in

C1 Community

ComponentOne Community is a free source for developers and help authors to collaborate and communicate.

Problems with a cell too high

Last post 05-04-2008 8:35 AM by Tayab. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 04-24-2008 5:14 AM

    Problems with a cell too high

     Hello,

    We are using VSFlexGrid v7 in a Visual Basic Project. 

    We have a problem about a cell that have too much lines and it seems that is impossible to see the last lines of the cell.

    The problem is the cell that have a lot of lines, and the WordWrap is setted to 'True' and when we execute Autosize method, the cell resize automaticatly and its size is higher than the control vsflexGrid, and we cannot see the last lines of this cell.

    Below there is the example that illustrates this problem that we have explained, and you will see that it's impossible to see the lasts letters of the cell (0,0).

    We are glad to see if anyone can help us about it.

    Thanks.
     

    '******* This is the example ********** 

    Private Sub Form_Load()
        With VSFlexGrid1
            .Height = 1400
            .Width = 2500
            .ScrollBars = flexScrollBarVertical
            .AutoSizeMode = flexAutoSizeRowHeight
            .AutoResize = True
            .WordWrap = True
            .FixedRows = 0
            .FixedCols = 0
            .Editable = flexEDNone
            .Cols = 1
            .Rows = 2
            .TextMatrix(0, 0) = "A" & vbCrLf & _
                                "B" & vbCrLf & _
                                "C" & vbCrLf & _
                                "D" & vbCrLf & _
                                "E" & vbCrLf & _
                                "F" & vbCrLf & _
                                "G" & vbCrLf & _
                                "H" & vbCrLf & _
                                "I" & vbCrLf & _
                                "J" & vbCrLf & _
                                "K" & vbCrLf & _
                                "L" & vbCrLf & _
                                "M" & vbCrLf & _
                                "O" & vbCrLf & _
                                "P" & vbCrLf & _
                                "Q" & vbCrLf & _
                                "R"
            .TextMatrix(1, 0) = "Z"
            .AutoSize 0
        End With
    End Sub

    '************ end of the example

     


     

     

    Filed under:
  • 04-24-2008 5:01 PM In reply to

    Re: Problems with a cell too high

    Hello,
     
    Have you tried commenting out the height portion of the code or tried increasing the height to a different value e.g Height = 5000  ?
     
    Ragards,
    Gary
    <hosppal> wrote in message news:204225@10.0.1.98...

     Hello,

    We are using VSFlexGrid v7 in a Visual Basic Project. 

    We have a problem about a cell that have too much lines and it seems that is impossible to see the last lines of the cell.

    The problem is the cell that have a lot of lines, and the WordWrap is setted to 'True' and when we execute Autosize method, the cell resize automaticatly and its size is higher than the control vsflexGrid, and we cannot see the last lines of this cell.

    Below there is the example that illustrates this problem that we have explained, and you will see that it's impossible to see the lasts letters of the cell (0,0).

    We are glad to see if anyone can help us about it.

    Thanks.
     

    '******* This is the example ********** 

    Private Sub Form_Load()
        With VSFlexGrid1
            .Height = 1400
            .Width = 2500
            .ScrollBars = flexScrollBarVertical
            .AutoSizeMode = flexAutoSizeRowHeight
            .AutoResize = True
            ..WordWrap = True
            .FixedRows = 0
            .FixedCols = 0
            .Editable = flexEDNone
            .Cols = 1
            .Rows = 2
            .TextMatrix(0, 0) = "A" & vbCrLf & _
                                "B" & vbCrLf & _
                                "C" & vbCrLf & _
                                "D" & vbCrLf & _
                                "E" & vbCrLf & _
                                "F" & vbCrLf & _
                                "G" & vbCrLf & _
                                "H" & vbCrLf & _
                                "I" & vbCrLf & _
                                "J" & vbCrLf & _
                                "K" & vbCrLf & _
                                "L" & vbCrLf & _
                                "M" & vbCrLf & _
                                "O" & vbCrLf & _
                                "P" & vbCrLf & _
                                "Q" & vbCrLf & _
                                "R"
            .TextMatrix(1, 0) = "Z"
            .AutoSize 0
        End With
    End Sub

    '************ end of the example

     


     

     



    http://helpcentral.componentone.com/cs/forums/p/75058/204225.aspx#204225

  • 04-25-2008 2:31 AM In reply to

    Re: Problems with a cell too high

    Thanks for your answer, but the problem is the same, that is if you set a value (number) to the height of the row higher than the VSFlexGrid, you are not able to see all the lines in the cell.

    For example, if instead of the code ".Autosize 0"  ".rowheight=3000" or another value much higher it's the same and you cannot see the lasts leters (L  / M / O  / P / R ) of the example I wrote.

    Thanks.

    Best Regards 

    Albert. 

     

     


     

    Filed under:
  • 04-25-2008 6:25 AM In reply to

    Re: Problems with a cell too high

     Hello again,

    The purpose of the example is only illustrate what happen if the size of the text in a cell is higher than  VSFlexGrid, and the impossibility to read the last lines of the text.

    The sizes of the examples are only to force the problem that i have met, obviously you can meet the same problem with a VSFlexGrid higher but with a text much longer (for example with 50 lines or more lines).

    I hope I've clarified my troubles with VSFlexGrid.

    Thanks a lot.

    Best Regards. 

    Albert 


     

     

    Filed under:
  • 04-25-2008 9:16 AM In reply to

    Re: Problems with a cell too high

    Hello Albert,

     

    I have created a sample project using the VSFleXGrid 8.0 and I could see all the letters viz. (L  / M / O  / P / R ) of cell(0,0). I have used the VSFleXGrid1.Height =5000 to get the desired result.

     

    I am attaching the sample project for your review, please note this sample uses version 8.0 for VSFleXGrid

     

    Regards,

    Gary

     

     

    <hosppal> wrote in message news:204267@10.0.1.98...

    Thanks for your answer, but the problem is the same, that is if you set a value (number) to the height of the row higher than the VSFlexGrid, you are not able to see all the lines in the cell.

    For example, if instead of the code ".Autosize 0"  ".rowheight=3000" or another value much higher it's the same and you cannot see the lasts leters (L  / M / O  / P / R ) of the example I wrote.

    Thanks.

    Best Regards 

    Albert. 

     

     


     



    http://helpcentral.componentone.com/cs/forums/p/75058/204267.aspx#204267

  • 05-04-2008 8:35 AM In reply to

    • Tayab
    • Top 500 Contributor
    • Joined on 12-29-2007
    • Posts 17

    Re: Problems with a cell too high

    This behaviour of FlexGrid is by design (Cell top aligns to FlexGrid top). However this problem can be solved in two ways.
    1). In RowColChange event, assign cell contents to ToolTipText property of FlexGrid.
    or
    2). Place a text box beneath FlexGrid control with MultiLine=True, and in RowColChange event, assign cell contents to Text property of TextBox.
    This way, the contents that are not directly visible, can be viewed in another way.
Page 1 of 1 (6 items)
Contact ComponentOne: 1.800.858.2739 ©1987-2008 ComponentOne LLC All Rights Reserved.