Print Page | Close Window

FlowGraph Node sizing

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Chart Control
Forum Description: Topics Related to Codejock Chart Control
URL: http://forum.codejock.com/forum_posts.asp?TID=21848
Printed Date: 05 May 2024 at 2:36am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: FlowGraph Node sizing
Posted By: Algae
Subject: FlowGraph Node sizing
Date Posted: 09 August 2013 at 4:42pm
Version 16.2.3

Node sizing doesn't work quite right.

1. Font Specific! CalcMinSize width may be short when constructing a node. This results in the last character of the node heading being truncated. Problem appears to be here:

if (pNodeCaption)
{
          iMinWidth = pNodeCaption->GetActualSize().cx + 40; // 40 is 20 left and right
}

2. UserSize seems problematic.

2.1 - Adding a node from xml where the UserSize is less than MinSize results in a node display that is smaller than MinSize. I believe that my particular problem originated from a previous version of FlowGraph which didn't automatically adjust to MinSize if the UserSize was invalid.

2.2 - User added nodes don't seem to initialize size properly unless you go through some extra steps to make sure UserSize is up-to-date. Note the following:

    m_pNode->RecalLayout();

    CSize userSize = m_pNode->GetUserSize();
    CSize minSize = m_pNode->GetMinSize();

    if (userSize.cx != minSize.cx)
        userSize.cx = minSize.cx;
    if (userSize.cy != minSize.cy)
        userSize.cy = minSize.cy;

    m_pNode->SetSize(userSize);




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net