[flexcoders] Re: Custom ItemRenderer and DataGrid/DataTips - Renderer's Responsibility?
Thanks for the reply! you can display it somehow, maybe by setting a tooltip somewhere - Getting the text isn't the problem, getting it to display is! :) I want the tooltip to display whenever someone mouses over the cell in the custom ItemRenderer's column (just like it works when I don't specify a custom ItemRenderer). Any idea how to accomplish this? Thanks! Mike --- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote: Implement IDropInLIstItemRenderer. The labelData will have a columnIndex where you can get the dataTipFunction and run it (see DataGridItemRenderer.as). Once you have the text, you can display it somehow, maybe by setting a tooltip somewhere From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of mmatczynski Sent: Monday, November 17, 2008 11:53 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Custom ItemRenderer and DataGrid/DataTips - Renderer's Responsibility? I have a DataGrid with a custom ItemRenderer written as an ActionScript class (that extends HBox). I want the DataGrid to display datatips for this column, but no datatips appear! I've found a few bugs filed about this, but apparently this works as designed: https://bugs.adobe.com/jira/browse/SDK-9822 Not a bug. It is the renderer's responsibility to deal with dataTipFunction. This is for performance reasons. So the question is... How does a custom ItemRenderer deal with the dataTipFunction to create / display the datatip? I know the ItemRenderer is responsible, so can someone give me an example of how to fulfill this responsibility? :) Thanks! Mike
[flexcoders] Re: Custom ItemRenderer and DataGrid/DataTips - Renderer's Responsibility?
--- In flexcoders@yahoogroups.com, mmatczynski [EMAIL PROTECTED] wrote: Thanks for the reply! you can display it somehow, maybe by setting a tooltip somewhere - Getting the text isn't the problem, getting it to display is! :) I want the tooltip to display whenever someone mouses over the cell in the custom ItemRenderer's column (just like it works when I don't specify a custom ItemRenderer). Any idea how to accomplish this? Thanks! Mike Many classes have a ToolTip property you can set. For instance, UIComponent. You can even use the ClassFactory approach to specify a ToolTip function to use to make your itemRenderer more reusable. HTH; Amy
RE: [flexcoders] Re: Custom ItemRenderer and DataGrid/DataTips - Renderer's Responsibility?
You should just be able to set the tooltip property. Again, see the code in DataGridItemRenderer.as or ListItemRenderer.as From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of mmatczynski Sent: Tuesday, November 18, 2008 9:25 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Custom ItemRenderer and DataGrid/DataTips - Renderer's Responsibility? Thanks for the reply! you can display it somehow, maybe by setting a tooltip somewhere - Getting the text isn't the problem, getting it to display is! :) I want the tooltip to display whenever someone mouses over the cell in the custom ItemRenderer's column (just like it works when I don't specify a custom ItemRenderer). Any idea how to accomplish this? Thanks! Mike --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote: Implement IDropInLIstItemRenderer. The labelData will have a columnIndex where you can get the dataTipFunction and run it (see DataGridItemRenderer.as). Once you have the text, you can display it somehow, maybe by setting a tooltip somewhere From: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com] On Behalf Of mmatczynski Sent: Monday, November 17, 2008 11:53 AM To: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Custom ItemRenderer and DataGrid/DataTips - Renderer's Responsibility? I have a DataGrid with a custom ItemRenderer written as an ActionScript class (that extends HBox). I want the DataGrid to display datatips for this column, but no datatips appear! I've found a few bugs filed about this, but apparently this works as designed: https://bugs.adobe.com/jira/browse/SDK-9822 Not a bug. It is the renderer's responsibility to deal with dataTipFunction. This is for performance reasons. So the question is... How does a custom ItemRenderer deal with the dataTipFunction to create / display the datatip? I know the ItemRenderer is responsible, so can someone give me an example of how to fulfill this responsibility? :) Thanks! Mike