Monday, November 21, 2005
ASP.NET ListBox Flicker
I never noticed before but the ASP.NET ListBox can be prone to annoying flickering. I used a new ASP.NET 2.0 Web Menu, had a couple ListBoxes below them and they would flicker as the menu was perused. What causes this? Settings the Height and Width property for the ListBoxes or 's they might be in. To set the width add a row above the row containing the ListBox and set the width for each cell in that row. Then, in the containing each of the ListBoxes set the Width to 100%. Percentage widths and heights are no problem. You can use a similar trick or the number of rows to display to fix the height. Voila! The flicker is gone.
Tuesday, November 15, 2005
Bacon Grease on the Brain and Union in C#
Bibble, Babble, Dribble, Drabble.
That's what most of this blog is, like bacon grease for the brain. Some people see clogged arteries, messy grease, and other people like me think, hey, this stuff (bacon grease) would make a great salad dressing.
So out of shame or guilt I thought I'd write something technical and shamelessly plug my upcoming book "C# Express for the Professional Programmer".
Did you know you can implement the C/C++ union construct in C#. To do so define a struct with the StructLayoutAttribute(LayoutKind.Explicit) and tag each field with the FieldPositionAttribute(0) value. The result is that such tagged fields have the same memory space. For instance, given a struct with and int i and char c, assigning 65 to i will implicitly assign 'A' to the char. (Didn't know that 65 is ASCII 'A'? Yikes! I am getting old.)
Occasionally union is useful. Peter Norton did some neat things with his File Allocation Table defragmenter programs in the early 90s. (Don't know what a FAT is? ~sigh~)
That's what most of this blog is, like bacon grease for the brain. Some people see clogged arteries, messy grease, and other people like me think, hey, this stuff (bacon grease) would make a great salad dressing.
So out of shame or guilt I thought I'd write something technical and shamelessly plug my upcoming book "C# Express for the Professional Programmer".
Did you know you can implement the C/C++ union construct in C#. To do so define a struct with the StructLayoutAttribute(LayoutKind.Explicit) and tag each field with the FieldPositionAttribute(0) value. The result is that such tagged fields have the same memory space. For instance, given a struct with and int i and char c, assigning 65 to i will implicitly assign 'A' to the char. (Didn't know that 65 is ASCII 'A'? Yikes! I am getting old.)
Occasionally union is useful. Peter Norton did some neat things with his File Allocation Table defragmenter programs in the early 90s. (Don't know what a FAT is? ~sigh~)
Subscribe to Posts [Atom]