Posts

Flex AdvancedDataGrid Header bug?

I was building an AdvancedDataGrid today, and the 2nd header was supposed to be a date. Easy enough right? Not so much... I put it as a String, as a Date, as a formatted Date... and every time the last character was begging cut off. No reason why. I tried putting the Date in a String variable... still cut the last character off... but ONLY when it was in the format 5/11/09 or similar... any other string worked fine. I eventually had to use the headerRenderer... all the renderer (extends Text) does is override the updateDisplayList with this.text = data.headerText.toString(); . Works like a charm. What a messed up bug...

Flex - Hide and show tab in tabnavigator

I'm not sure why I didn't think of this myself... http://techmytongue.blogspot.com/2008/11/hide-show-tab-on-tab-navigator.html This becomes very important if you want to hide tabs in a tab navigator but you don't want to remove them from the interface completely. In my situation I wanted to hide tabs in a tab navigator based on what the user had selected in a data grid. If the user selected another row in the grid I may need to show a tab that I had previously hidden. tabNav.getTabAt(1).visible = false; Now to elaborate on Venkatesh's post... To remove the tab stop, also disable it: tabNav.getTabAt(1).enabled = false; Now if you are hiding a tab before another tab (that is not hidden) there will be an empty gap where your tab should be. To fix this: tabNav.getTabAt(1).includeInLayout = false; And one final thing. If you're hiding your default tab (i.e. tab index 0) you will also need to set the selected index of the tabNav or else you will still see the contents of ...

Digital Imaging

Image
What I learned so far in my Digital Imaging course (besides a bunch of theory and PhotoShop shortcuts). Before After This took me maybe a minute and a half to do. I am guessing that after doing it for a while and getting a better eye I could do something like this even faster and make it look even better.

HTML - rounded div corners with CSS (no images)

I am doing an html website and the design I came up with has one rounded corner. I come from way back when we used to use tables and use images to get rounded corners. Although I haven't worked much in HTML in a while, I know the norm now is to use divs instead of tables... so I did some digging and found this: http://www.html.it/articoli/nifty/index.html Using stripes with different margins to get a rounded corner look. So clever! It makes total sense, but I would have never thought to do this. To get my ONE rounded corner I had to make some slight modifications. A code snip is below. <style type="text/css"> body{background-color: #FFF; margin-right:0; padding-right:0; margin-left:0; padding-left:0; font: 100.01% Verdana,Arial,sans-serif} p{margin: 0 10px} div#nifty{ margin-left:300px; margin-top:35px; background: #FF0000;} b.rtop, b.rbottom{display:block;background: #FFF} b.rtop b, b.rbottom b{display:block;height: 1px; overflow: hid...

Flex Column Chart

Image
I need a Column chart that would get both negative and positive numbers, easy enough. The catch is that the negative "columns" are to be red and the positive "columns" are to be green. Well it wasn't too much fuss to get this figured out, but I thought I would post my code in case it would help anyone else out. Who knew that ColumnSeries had itemRenderers! <mx:ColumnSeries xField="Month" yField="Profit" displayName="Profit" itemRenderer="ColorNegativeBarRenderer" /> Here's a sample with view source enabled so you can see the item renderer code. Here's where I found the info I needed: http://www.adobe.com/cfusion/communityengine/index.cfm?event=showdetails&productId=2&postId=2021

Removing column header separator lines (flex)

Image
This took me a while to figure out so I thought I would post it on here just in case someone else is having the same problem. I have an Advanced Data Grid, but I don't want any separator lines between the headers. There are 2 styles and 1 property you need to set in an AdvancedDataGrid to make this happen. The styles are: header-separator-skin header-sort-separator-skin The property is: sortExpertMode I figured setting the styles to "null" would work, but it doesn't. Here is what you need to do: headerSortSeparatorSkin="mx.skins.ProgrammaticSkin" headerSeparatorSkin="mx.skins.ProgrammaticSkin" sortExpertMode="true" Or if you'd rather set the styles in CSS: header-separator-skin: ClassReference("mx.skins.ProgrammaticSkin"); header-sort-separator-skin: ClassReference("mx.skins.ProgrammaticSkin"); Sample with source Thanks to http://theflexguy.com/index.php?option=com_idoblog&task=viewpost&id=104&Itemid=54...

Sixth Sense

Unveiling the "Sixth Sense" http://www.ted.com/index.php/talks/pattie_maes_demos_the_sixth_sense.html Very very cool stuff.