Форум Flasher.ru

Форум Flasher.ru (http://www.flasher.ru/forum/index.php)
-   ActionScript 1.0/2.0 (http://www.flasher.ru/forum/forumdisplay.php?f=93)
-   -   добавление элементов в datagrig (http://www.flasher.ru/forum/showthread.php?t=125999)

hromoyDron 07.06.2009 15:21

добавление элементов в datagrig
 
можно ли в datagrid добавить каринку или кнопку?

Kuruki 07.06.2009 16:40

Да, см. DataGridColumn.cellRenderer

hromoyDron 08.06.2009 01:20

А можно поподробней с кодом, если не трудно. Примеров куча но все они немного не о том.

zurkis 08.06.2009 01:31

в хелпе есть пример с картинкой

hromoyDron 08.06.2009 01:54

спс, посмотрю

breebree 09.06.2009 14:42

меня тоже этот вопрос интересует, смотрел в хелпе но не нашёл, может копипастнете?

hromoyDron 11.06.2009 13:36

реально, там нету примера,есть только на комбо и чек бокс, кто видел и знает киньте код плз

Kuruki 11.06.2009 17:15

Цитата:

Methods to implement for the CellRenderer API
You must write a class with the following methods so that the List, DataGrid, Tree, or Menu component can communicate with the cell.

CellRenderer.getPreferredHeight()
Returns the preferred height of a cell.

CellRenderer.getPreferredWidth()
The preferred width of a cell.

CellRenderer.setSize()
Sets the width and height of a cell.

CellRenderer.setValue()
Sets the content to be displayed in the cell.


Methods provided by the CellRenderer API
The List, DataGrid, Tree, and Menu components give the following methods to the cell when it is created within the component. You do not need to implement these methods.

CellRenderer.getCellIndex()
Returns an object with two fields, columnIndex and itemIndex, that indicate the position of the cell.

CellRenderer.getDataLabel()
Returns a string containing the name of the cell renderer's data field.


Properties provided by the CellRenderer API
The List, DataGrid, Tree, and Menu component give the following properties to the cell when it is created within the component. You do not need to implement these properties.

CellRenderer.listOwner
A reference to the List component that contains the cell.

CellRenderer.owner
A reference to the row that contains the cell.

Более подробное описание ищите в хелпе оп запросу CellRenderer. Вот сделал пример именно по вашему случаю, если что непонятно - спрашивайте, но сначала прочтите хелп

KiL33 12.06.2009 06:52

Kuruki, а почему при наведении картинка моргает?
Вроде загружается один раз)..там перерисовка какая-то идёт?

hromoyDron 12.06.2009 13:37

Kuruki, спасибо большое, без вас бы не разобрался.
Тоже интересует вопрос, почему картинка моргает, нельзя ли этого збежать, в visual studio есть такое свойство, как doublebuffering для уличшение отображения динамической графики, нет ли такого во флеше?


Часовой пояс GMT +4, время: 19:45.

Copyright © 1999-2008 Flasher.ru. All rights reserved.
Работает на vBulletin®. Copyright ©2000 - 2026, Jelsoft Enterprises Ltd. Перевод: zCarot
Администрация сайта не несёт ответственности за любую предоставленную посетителями информацию. Подробнее см. Правила.