![]() |
#1 |
Участник
|
Ruslan Goncharov: SysTableBrowser instant field navigator
Источник: http://rusgon.blogspot.com/2009/11/s...navigator.html
============== Without any doubt AX SysTableBrowser is very useful tool which helps to watch on content of exploring table. Unfortunately as for me there is one essential fault. When table contains large number of fields using SysTableBrowser sometimes it's hard to find out a. which column corresponds to particular field; and b. using horizontal scroll bar it's difficult to "catch up" needed field. I must confess that using of scroll bar is inconvenient very match in case when table has a dozen and more fields. ![]() Figure 1 demonstrates lack of information of column's headers (checkbox fields). ![]() Figure 2 illustrates disambiguation between fields RemainSalesPhysical and RemainSalesFinancial (SalesLine Table). The simpliest way is to reach needed field is Tab button. Pressing Tab user may find needed field at the end. But if there is necessity to find another one field user has to repeat Tab-pressing another one time. And another one time. And another one time... Take a look at Axapta Object Tree (AOT) especially at \Data Dictionary\Tables\Table\Fields node. It's easy to watch on full range of fields and move from one field to another, isn't it? Let's combine SysTableBrowser and Table\Fields node into one window. SysTableBrowser tool this is a conjunction of SysTableBrowser Class and SysTableBrowser Form. I decided not to touch SysTableBrowser Class and following modification this is a modification of SysTableBrowser Form only. 1. Open SysTableBrowser Form Design and add FormTreeControl TreeControl like this: ![]() Set Left Property to Right edge. Set Height Property to Column height. ![]() 2. We need to create new fillTree() method: // GRR fields navigator --> void fillTree() { int _i; FormDesign Ctrl = element.design(); FormControl _buildCtrl; FormControl _formControl; TreeItemIdx treeItemIdx; ImageListAppl_Aot ImageListAppl_Aot; FormTreeItem item; DictField dictField; fieldId fieldId; int i,j; int fieldCnt; #DictField #resAppl ImageRes findOverlayImage(Types _type) { ImageRes imageRes; switch(_type) { case Types::STRING, Types::VARSTRING : return #ImageOverlayString; case Types::ENUM: return #ImageOverlayEnum; case Types::REAL: return #ImageOverlayReal; case Types::DATE: return #ImageOverlayDate; case Types::INTEGER: return #ImageOverlayInteger; case Types::DATETIME: return #ImageOverlayTime; case Types::CONTAINER: return #ImageOverlayContainer; default: return 0; } return imageRes; } ; // Find 'Grid' object --> for(_i=1; _i<span class="sy0">
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору. |
|
![]() |
#2 |
Участник
|
интересная мысль.
X++: if (bitTest(dictField.flags(), #DBF_STORE)) { for(j = 1;j <= dictField.arraySize(); j++) { treeItemIdx = SysFormTreeControl::addTreeItem(formTreeControl, dictField.name(), 0, null, imageListAppl_Aot.image(#ImageField)); SysFormTreeControl::setOverlayImage(formTreeControl, treeItemIdx, imageListAppl_Aot.image(findOverlayImage(dictField.baseType()))); itemIdxContainer += treeItemIdx; } } Жаль, что не проверяет права доступа к полям. |
|
![]() |
#3 |
Участник
|
![]()
Что ж наш парсер блогов постоянно теряется при встрече кода?
К основной строке сообщения парсер так и не дошел: Цитата:
Who interested in another modificated SysTableBrowser take a look at Kashperuk's DEV SysTableBrowser
![]() На самом деле, интересное с точки зрения пользователей решение. Более того, оно не требует переоткрытия формы. У меня есть похожий режим в DEV_SysTableBrowser (Custom fields), но он требует переоткрытия формы (так работает TableBrowser). А в АХ 2009 с этим что-то напортачили - я еще не смотрел толком, что сломали. Руслан, спасибо за свежую мыслю. |
|
|
|