Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic TextAlignment of TableNode caption? (Read 1458 times)
chris
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 57
Joined: Feb 1st, 2008
TextAlignment of TableNode caption?
Jul 19th, 2010 at 5:34pm
Print Post  
Hi Stoyo,

I have a question about how to set the text alignment property of the TableNode's caption.

I want to center the caption and keep the other rows left alignment. It is the default setting for the old version.

I tried the following code:
        TableNode tableNode = new TableNode(diagram);

        tableNode .Shape = TableShape.RoundedRectangle;
        StringFormat format = new StringFormat();
        format.Alignment = StringAlignment.Center;
        tableNode .CaptionFormat = format;

The problem is all the texts in the rows get centered.

Could you please tell me how to do it?

Thanks a lot!
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: TextAlignment of TableNode caption?
Reply #1 - Jul 19th, 2010 at 6:02pm
Print Post  
Hi Chris,

Table cells inherit their TextAlignment value from the corresponding table property, for which CaptionFormat is now just a compatibility wrapper. You can assign local TextAlignment values to the cells to left-align them. It seems we should add a separate CellAlignment property to TableNode and make the cells inherit from it, so that the caption alignment can be changed independently from the cells.

Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint