Показать сообщение отдельно
Старый 01.10.2009, 08:55   #4  
DSPIC is offline
DSPIC
Боец
 
1,077 / 1243 (44) ++++++++
Регистрация: 11.04.2008
Вот такой вот метод за кружкой чая накидал.
Не идеальный, но условно работает
X++:
//DSPIC
static void showControlProperties(FormControl _formControl)
{
    TreeNodePath    treeNodePath = "\\System Documentation\\Classes\\";
    TreeNode        treeNode;
    SysDictClass    dictClass;
    str             allPropertiesStr, methodName;
    ;

    if (!_formControl)
        return;

    dictClass = new SysDictClass(classIdGet(_formControl));

    if (dictClass)
    {
        treeNodePath += dictClass.name();
        treeNode      = TreeNode::findNode(treeNodePath);
    }

    if (!treeNode)
        return;

    treeNode = treeNode.AOTfirstChild();
    while (treeNode)
    {
        if (treeNode.AOTbitmapId() == 866) //check, is property method?
        {
            methodName = treeNode.treeNodeName();

            try
            {
                if (dictClass.hasObjectMethod(methodName) &&
                    methodName != "width"   &&
                    methodName != "height"  &&
                    methodName != "left"    &&
                    methodName != "top")
                {
                    allPropertiesStr += strFmt("%1: %2\n", methodName, dictClass.callObject(methodName, _formControl));
                }
            }
            catch{}
        }

        treeNode = treeNode.AOTnextSibling();
    }

    info (allPropertiesStr);
}
За это сообщение автора поблагодарили: Logger (5).