|
22.03.2007, 21:41 | #1 |
Участник
|
casperkamal: Creating custom Picking list in Dynamics - Part II
Источник: http://casperkamal.spaces.live.com/B...CD63!253.entry
============== This is in continuation to the article that i posted on creating custom Picking List (click to view) The last aritcle was about using the Global::pickList forms and creating a simple custom Pick List form which takes map as an input The custom Picklist's discussed here provide you more options like >Specifying the image to be used >Display either a Map or container in the list There are two ways of creating a complete custom Pick List 'SysPick' form can be used to create custom list with the choice of taking input as Map and displaying standard images like tables, class, fields, You can invoke the "SysPick" form via the classfactory. args = new Args(formstr(SysPick)); args.parm(' 2'); map = Map::create(SysPickList::fillFieldsMap(int2str(tablenum(custTable)))); args.parmObject(map); formRun = classfactory.formRunClass(args); formRun.init(); formRun.run(); formRun.wait(); if (formRun.selection()) { //TODO someAction } Here > The argument for the "args.parm(' 2')" method decides the image type to be displayed. - The argument value is to be based on the following EnumType "SysPickListType" but has to be passed as a string and a blank space before the value is mandatory > SysPickList class has some static function that gives you a map of several repeated lists like fields, table, userdomain, class etc. you can use it to get the list to be passed as shown in the code map = Map::create(SysPickList::fillFieldsMap(int2str(tablenum(TestAdo)))); The other form is "PickList", this accepts any image for display and requires the list input as a container. The follwoing code demonstrates the way using it. Object formRun; #ResAppl ; formRun = classfactory.createPicklist(); formRun.init(); formRun.choices(['option1', 'option2', 'option3'], #ImageArrowUp); formRun.caption("Testing Picklist"); formRun.run(); formRun.wait(); if (formRun.choice()) { //TODO someAction } would result in some thing like this ........................... happy picking !!!!! Источник: http://casperkamal.spaces.live.com/B...CD63!253.entry |
|
|
|