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.
Comments:
<< Home
i tried the above suggestions, but the flickering remained; however, i may have misunderstood the steps i needed to take. at any rate, in case anyone else is wondering about this problem, here's what i found:
in my experience, setting the width of the listbox does not cause the listbox to flicker, but setting the height in any way (by pixel, percentage, or em), would cause flickering. i found that rather than dealing with any height attributes on listboxes or the containing elements thereof, setting only the "Rows" attribute on the listbox will prevent this flickering problem *and* still allow the listbox's height to be manipulated.
cheers!
in my experience, setting the width of the listbox does not cause the listbox to flicker, but setting the height in any way (by pixel, percentage, or em), would cause flickering. i found that rather than dealing with any height attributes on listboxes or the containing elements thereof, setting only the "Rows" attribute on the listbox will prevent this flickering problem *and* still allow the listbox's height to be manipulated.
cheers!
To resolve this issue i have added the following two properties in the asp listbox tag.
1) SkinId="FreeDDL"
2) Rows="43".
It works perfectly for me.
Post a Comment
1) SkinId="FreeDDL"
2) Rows="43".
It works perfectly for me.
<< Home
Subscribe to Posts [Atom]
