Showing posts with label development. Show all posts
Showing posts with label development. Show all posts
Friday, April 8, 2022
Wednesday, July 18, 2018
Monday, July 11, 2011
Paint it black: How to color rows in Table form control
There a lot of answers on how to color grid lines and cells -- for example, this DisplayOption using from DAXGuy. However, my goal is to show how one can paint rows in Table form control. I use the standard tutorial form tutorial_Form_Table from AX2009.
On the table control, we need to change a bit EditControl method where we define in which color the current row will be painted. (Here, I provided you with a link where you can choose RGB colors to paint the hell at your own.)
So, when the user selects another row, all its controls change their color--it's your responsibility to return the correct form control: StringEdit, IntEdit and so on.
The second method where we redraw the form is activeCellChanged.
Coloring can be realized much more complicated with different color scheme, calculated conditions etc.
On the table control, we need to change a bit EditControl method where we define in which color the current row will be painted. (Here, I provided you with a link where you can choose RGB colors to paint the hell at your own.)
// Color the active line in a table FormControl editControl(int column, int row) { #DEFINE.colorDarkTurkoise(112,147,219) // colors at your personal perception of hell #DEFINE.colorNeonBlue(77,77,255) #DEFINE.colorRosyBrown(255,193,193) #DEFINE.colorSaddleBrown(139,69,19) int oldStrColor = WinApi::RGB2int(#colorRosyBrown); // colors for cells not in focus int oldIntColor = WinApi::RGB2int(#colorSaddleBrown); int newIntColor = WinApi::RGB2int(#colorNeonBlue); // colors for the selected line int newStrColor = WinApi::RGB2int(#colorDarkTurkoise); ; // this is columns with int controls if ((column == 2) || (column == 4)) { // not in the header if (row > 1) { // this is in the selected line if (row == table.row()) intEdit.backgroundColor(newIntColor); else intEdit.backgroundColor(oldIntColor); return intEdit; } // this is the header else { if (row == table.row()) editline.backgroundColor(newStrColor); else editline.backgroundColor(oldStrColor); return editline; } } else { if (row == table.row()) editline.backgroundColor(newStrColor); else editline.backgroundColor(oldStrColor); return editline; } }
So, when the user selects another row, all its controls change their color--it's your responsibility to return the correct form control: StringEdit, IntEdit and so on.
The second method where we redraw the form is activeCellChanged.
public void activeCellChanged() { ; super(); // do not forget to repaint the form! element.redraw(); }
Coloring can be realized much more complicated with different color scheme, calculated conditions etc.
Labels:
ax,
ax2009,
color,
coloring,
development,
IntEdit,
method,
rows,
stringedit,
table,
user interface
Monday, May 2, 2011
How to find your object in AOT projects
This is a small but precious tool for AX developing.
Have you ever tried to find in which projects your objects are included? Yes, I have... Not so easy to search and look into each project.
Now, it is just a question of one click: this mighty LC Project Search will make the life easier. And good news, it is free. So, profit and enjoy!
There are three xpo-files with appropriate versions for AX 4.0, 2009, and 2012. (I have tested 2009 one). You can import it, then launch with the menu item, and this is ready to go.

Just type the name of any object you're looking for, optionally, you can choose the type of it, then press Search. Be patient, it takes some time to populate the result table.

Now, all projects contain the object are here.
Take a look at Loncar Technologies company web site: there you can get some more.
Have you ever tried to find in which projects your objects are included? Yes, I have... Not so easy to search and look into each project.
Now, it is just a question of one click: this mighty LC Project Search will make the life easier. And good news, it is free. So, profit and enjoy!
There are three xpo-files with appropriate versions for AX 4.0, 2009, and 2012. (I have tested 2009 one). You can import it, then launch with the menu item, and this is ready to go.

Just type the name of any object you're looking for, optionally, you can choose the type of it, then press Search. Be patient, it takes some time to populate the result table.

Now, all projects contain the object are here.
Take a look at Loncar Technologies company web site: there you can get some more.
Tuesday, March 16, 2010
Form Digger
FormDigger is a very useful tool. It facilitates form development substantially by allowing to search fields either by its name or label, highligt them on the form, take a snapshot of it, and jump directly to AOT.
It should be installed as an XPO project and then called by Alt-~.
Highly recommended!
By the way, this is the second powerful tool I use created by the same AX master - Evgeny Arlionak
It should be installed as an XPO project and then called by Alt-~.
Highly recommended!
By the way, this is the second powerful tool I use created by the same AX master - Evgeny Arlionak
Monday, March 16, 2009
книга Разработка бизнес-приложений в Microsoft Business Solutions - Axapta версии 3.0
С этой книги я начал изучение ERP-системы MS Axapta, во многом благодаря ей я нашёл первую работу в Канаде, и по сей день, она является наиболее востребованной среди прочих книг на моём столе для разработки для всех версий MS Dynamics: 3.0 4.0 и 2009.
Книга написана одновременно и как справочное пособие по архитектуре, среде разработки и языку X++, и параллельное описание реализации конкретного проекта "Управление гостиницей".
На примере последнего и разбираются варианты использования той или иной функциональности.
Вообще, примеры - это самая сильная часть любого руководства разработчика, и данная книга - отличный образец того, как это нужно делать: здесь можно найти не только соответствующие Best Practice стандартные паттерны программирования, которые особенно важно усвоить вначале работы с системой, но и такие приёмы, как, скажем работа с COM - Axapta Business Connector или организация многомерных массивов.
Название третьей главы "Что должен знать эксперт" говорит само за себя.
Мои любимые параграфы те, где речь идёт о создании и вызове сущностей системы, таких как формы, меню, запросы и так далее, напрямую из кода.
Особенно приятно, что она написана русскими ребятами на хорошем русском языке.
В целом, оценивая этот беспрецедентный по охвату материала, стройности и стилю изложения и оригинальности концепции труд, можно сказать, что данная книга является краеугольным камнем в построении карьеры разработчика MS Dynamics.
Subscribe to:
Posts (Atom)



