Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Chart Control
  New Posts New Posts RSS Feed - FlowGraph Node sizing
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

FlowGraph Node sizing

 Post Reply Post Reply
Author
Message
Algae View Drop Down
Senior Member
Senior Member
Avatar

Joined: 08 January 2007
Location: United States
Status: Offline
Points: 217
Post Options Post Options   Thanks (0) Thanks(0)   Quote Algae Quote  Post ReplyReply Direct Link To This Post Topic: FlowGraph Node sizing
    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);

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.141 seconds.