24.05.2008, 00:08 | #1 |
Участник
|
Ruslan Goncharov: From Microsoft Dynamics AX Programming newsgroup tricks
Источник: http://rusgon.blogspot.com/2008/05/f...ogramming.html
============== TreeNode Alternative for FormControls I want to create a Control on a Form just like I would with a TreeNode in AX 3.0. But the TreeNode.AOTAdd doesn't work for FOrmControls. Is there an Alternative how I can create a Control? These Fields should notbe temporary like in the Tutorial_Form_AddControl. They should be in the AOT after being created. TreeNode formlist; Form formNode; FormBuildDesign formDesign; ; formlist = infolog.findNode('Forms'); formNode = formlist.AOTfindChild('Form1'); formDesign = formNode.design(); formDesign.addControl(FormControlType::String, 'StringEdit'); formNode.save(); Saved form settings When we import new objects, the user defined form settings are lost. It's possible to prevent that from happening? static void JobSettingsStoringAndRestoring(Args _args) { syslastvalue sysLastValue; container dataContainer; BinData binData; container blobContainer; ContainerClass containerClass; str settingsFileName = "c:\settings.txt"; ; // Store settings --> dataContainer = xSysLastValue::getValue( curExt(), curUserId(), UtilElementType::Usersetup, 'AddressCheck', 'myDesign'); containerClass = new ContainerClass(dataContainer); blobContainer = containerClass.toBlob(); binData = new BinData(); binData.setData(blobContainer); binData.saveFile(settingsFileName); // Store settings /* binData = new BinData(); binData.loadFile(settingsFileName); dataContainer = containerClass::blob2Container(binData.getData()); xSysLastValue::putValue(dataContainer, curExt(), curUserId(), UtilElementType::Usersetup, 'AddressCheck', 'myDesign');*/ <span class="co1">// Restore settings
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору. |
|
|
Опции темы | Поиск в этой теме |
Опции просмотра | |
|