in

C1 Community

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

formatting indivual cells

Last post 02-11-2008 2:15 PM by C1_GaryB. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 02-10-2008 2:49 PM

    formatting indivual cells

     

     I'm trying to format a set of cells example (row(10),col(2))=textaligment.center or width or hight.  Does anybody knows how can I proceed with this.

    I only know how to format a col or row.

     

    Thanks in advanced.

  • 02-11-2008 1:31 PM In reply to

    • C1_GregL
    • Top 10 Contributor
    • Joined on 06-11-2007
    • Pittsburgh PA
    • Posts 500

    Re: formatting indivual cells

    Yes you can use the CellRange object to select a range of cells (or just 1 cell).

    1. Dim rng As C1.Win.C1FlexGrid.CellRange
    2. rng = C1FlexGrid1.GetCellRange(3, 3, 7, 7)  //row 3, col 3 to row 7, col 7
    3. rng.StyleNew.TextAlign = TextAlignEnum.CenterCenter

    Hope this helps,
    Greg

    Filed under: ,
  • 02-11-2008 2:15 PM In reply to

    Re: formatting indivual cells

    Hi,
     
    Yes you can align a range of cells. This is the code for the same .....
     
    Dim cellrangeUS As C1.Win.C1FlexGrid.CellRange
    Dim cellStyleUS As C1.Win.C1FlexGrid.CellStyle
                        cellStyleUS.TextAlign = C1.Win.C1FlexGrid.TextAlignEnum.LeftCenter            
                        cellrangeUS.Style = cellStyleUS
     
    I have also attached an application to demonstrate the same.
     
    Thanks,
    Gary.
     

     

     I'm trying to format a set of cells example (row(10),col(2))=textaligment.center or width or hight.  Does anybody knows how can I proceed with this.

    I only know how to format a col or row.

     

    Thanks in advanced.



    http://helpcentral.componentone.com/cs/forums/p/74264/201793.aspx#201793

Page 1 of 1 (3 items)
Contact ComponentOne: 1.800.858.2739 ©1987-2008 ComponentOne LLC All Rights Reserved.