Skip to main content

Posts

Showing posts from 2011

Flex: ToolTip on Spark DataGrid Rows

We can use Spark DataGrid's showDataTips and dataTipFunction properties to show customized tool tips on the rows. An example showing this: <?xml version="1.0" encoding="utf-8"?> <s:Application initialize="onInitialize()" xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark"> <fx:Script> <![CDATA[ import mx.collections.ArrayCollection; import mx.utils.StringUtil; private static function fnDataTip(item:Object, column:GridColumn):String { var toolTip:String = item[column.dataTipField != null ? column.dataTipField : column.dataField]; if (toolTip == null || StringUtil.trim(toolTip) == "") toolTip = ""; if (item.hasOwnProperty("toolTipComment") && item.toolTipComment != null && item.toolTipComment....

Insert code snippets in Blogger using Prettyfy

If you want to insert code snippets with syntax-highlighting in your blogs on Blogger.com, then you can use google-code-prettify . There are other syntax highlighting solutions out there, but this allows to do this very simply. The steps are: Click on "Theme" (in LHS of blogger home page) or "Design" (in upper RHS corner). Click on "Edit HTML" button. Search for <head> tag in the html. Insert following line after meta tags in head tag: <script src='https://cdn.rawgit.com/google/code-prettify/master/loader/run_prettify.js?lang=scala&amp;lang=yaml&amp;lang=bash&amp;lang=xml&amp;lang=sql&amp;skin=sons-of-obsidian' type='text/javascript'></script> For me it is just before <title> tag. Add onload property to <body> tag: <body class='container' onload='prettyPrint()'> Here I have used " Sons-Of-Obsidian " style, you can use any of the available themes . ...