AXForum  
Вернуться   AXForum > Microsoft Dynamics AX > DAX Blogs
All
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 25.09.2008, 15:05   #1  
Blog bot is offline
Blog bot
Участник
 
25,493 / 847 (79) +++++++
Регистрация: 28.10.2006
palleagermark: ImageListAppl classes
Источник: http://palleagermark.blogspot.com/20...l-classes.html
==============

The idea with the ImageListAppl classes is that you load and cache a list of images once in for example a form. For each record where you want to show an image, through a display method you just lookup the image in the cached list.

However I often see code where the image list is loaded in the display method itself, putting some overhead on the display method.

Steps to use an ImageListClass
First of all, create a form window control to hold the images. These would be appropriate properties if you place this control in a grid:
PropertyValueAutoDeclarationYesAllowEditNoWidth14Height14EnabledNoSkipYesAlignControlNoImageModeSize to fitShowLabelNoDataSourceYour controlling datasourceDataMethodYour method to select the right image
In the ClassDeclaration of the form declared your ImageListAppl class:
ImageListAppl_MyImageList imageListAppl;



In the init method of the form, initialize your ImageListAppl object:

imageListAppl = new ImageListAppl_MyImageList();


And still in the init method pass the list of images to your window control:
myWindowControl.imageList(imageListAppl.imageList());


Implement your display method driving which image to show:
//BP Deviation Documented
display ImageRes myDisplayMethod(MyRecord _myRecord)
{
ImageRes res = -1;
#resAppl;
if (_myRecord.someConditioin())
{
res = imageListAppl.image(#MyImage);
}
return res;
}


That's it...

Источник: http://palleagermark.blogspot.com/20...l-classes.html
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
Теги
image

 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
Как выполнять дефрагментирование RecID mazzy DAX: База знаний и проекты 174 05.10.2017 12:59
palleagermark: Possible upgrade bug in \Classes\ReleaseUpdateDB41_Administration\renumberEPParametersKey Blog bot DAX Blogs 0 11.02.2009 23:05
Передача функции в качестве параметра lemchey_white DAX: Программирование 20 21.01.2008 22:51
axStart: don't extend AX foundation classes, you lose performance Blog bot DAX Blogs 6 09.01.2008 13:21
Dynamics AX: CCADO Classes in Dynamics AX 4.0 Blog bot DAX Blogs 0 03.11.2006 22:54

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 22:13.
Powered by vBulletin® v3.8.5. Перевод: zCarot
Контактная информация, Реклама.