Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Layout issue with composite node (Read 1375 times)
jf2020
Junior Member
**
Offline


I love FlowChart!

Posts: 63
Joined: Feb 23rd, 2006
Layout issue with composite node
Jun 9th, 2012 at 8:36pm
Print Post  
Hi,

I have created a composite node with a grid that contains an image and a text. After being loaded the size of each part is not correct. I have tried to call Invalidate() and to set the image width to float.NaN but no change see attachment 1. However as soon as the node is moved, the layout is correct (see attachment 2).

Here's the xml of the node:


Code (C++)
Select All
            string content =
            @"<SimplePanel>
                  <Shape Name=""Shape"" Shape=""RoundRect"" />
                  <Border >
                    <GridPanel>
                      <GridPanel.Columns>
                        <GridColumn />
                      </GridPanel.Columns>
                      <GridPanel.Rows>
                        <GridRow Height=""8"" />
                        <GridRow Height=""0.1"" />
                        <GridRow />
                        <GridRow Height=""0.1"" />
                        <GridRow Height=""7"" />
                      </GridPanel.Rows>
                      <StackPanel Orientation=""Horizontal"" GridRow=""0"" Spacing=""1""
                      HorizontalAlignment=""Center"">
                        <Image Name=""Icon"" ImageAlign=""Fit""  />
                        <Text Name=""Header"" HorizontalAlignment=""Center""  VerticalAlignment=""Center"" Text=""Top"" />
                      </StackPanel>

                      <Shape Name=""Shape2"" Shape=""Rectangle"" GridRow=""1"" />
                      <StackPanel Orientation=""Horizontal"" GridRow=""2"" Spacing=""1""
                      HorizontalAlignment=""Center"">
                        <Image Name=""Img"" ImageAlign=""Fit""  />
                        <Shape Name=""Shape3"" Shape=""Rectangle"" GridRow=""2"" />
                        <Text Name=""Description"" HorizontalAlignment=""Center"" Text=""Right"" />
                      </StackPanel>
                      <Shape Name=""Shape4"" Shape=""Rectangle"" GridRow=""3"" />
                      <Text Name=""Footer"" HorizontalAlignment=""Center"" Text=""Bottom""  GridRow=""4"" />
                    </GridPanel>
                  </Border>
                </SimplePanel>"; 

  

After_loading.PNG (Attachment deleted)
after_move.PNG (Attachment deleted)
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: Layout issue with composite node
Reply #1 - Jun 11th, 2012 at 9:32am
Print Post  
Hi,

Try replacing the stack panel with a grid:

Code
Select All
...
<GridPanel GridRow=""2"">
  <GridPanel.Rows>
    <GridRow />
  </GridPanel.Rows>
  <GridPanel.Columns>
    <GridColumn />
    <GridColumn Width=""0.1"" />
    <GridColumn />
  </GridPanel.Columns>
  <Image Name=""Img"" ImageAlign=""Fit"" />
  <Shape Name=""Shape3"" Shape=""Rectangle"" GridColumn=""1"" />
  <Text Name=""Description"" HorizontalAlignment=""Center"" Text=""Right"" GridColumn=""2"" />
</GridPanel>
... 


I hope this helps.

Regards,
Meppy
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint