in

C1 Community

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

Simple question, Table Alignment

Last post 05-21-2008 3:04 PM by C1_Dima. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 05-15-2008 2:58 PM

    Simple question, Table Alignment

    So, I want to right justify a small table. The table is a child of a Render Area.

     

    I set the render area TextHorzAlign to right, add the small table (RenderTable).

    Small table width could be 100px for this example. Parent Render Area Container is set to 100%.

     

    Why won't the child table align right?

  • 05-15-2008 3:29 PM In reply to

    Re: Simple question, Table Alignment

    Attached is an example.

  • 05-21-2008 3:04 PM In reply to

    Re: Simple question, Table Alignment

    Use Style.FlowAlign or Style.FlowAlignChildren, in your sample use either of those lines:

      rt1.Style.FlowAlign = FlowAlignEnum.Far

    or

      parentRenderContainer.Style.FlowAlignChildren = FlowAlignEnum.Far 

    Setting TextAlignHorz only affects text within its own space - i.e. in a situation like this:

      dim rt as New RenderText("text")
      rt.Style.TextAlignHorz = AlignHorzEnum.Right
      rt.Width = "10cm"

    the text will align to the right of the 10cm wide RenderText object, but it won't affect the alignment of one render object within another (as you tried to do in your code).

    Hope this makes sense.
     

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