473,383 Members | 1,716 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

Render scrollbar in listbox by CSS

How do I render the scrollbars by CSS in a listbox?

I have understood that an asp listbox gets rendered as a select element.

So I tried first by adding a style element:
..TA {scrollbar-3dlight-color:aqua;

scrollbar-arrow-color:fuchsia;

scrollbar-base-color:fuchsia;

scrollbar-darkshadow-color:;

scrollbar-face-color:blue;

scrollbar-highlight-color:chartreuse;

scrollbar-shadow-color:lightsalmon}

And then an html select:

<select size="4" name="LBox1" id="LBox1" class="TA" style="width: 213px;
height: 51px">

<option value="sune">une</option>

<option value="sune">une</option>

<option value="sune">une</option>

<option value="sune">une</option>

<option value="sune">une</option>

<option value="sune">une</option>

<option value="sune">une</option>

<option value="sune">une</option>

</select>

By this the scrollbar gets rendered colored in the IDE, but not in the
browser (IE6.0).

Then I try adding the TA class as cssclass for the listbox:

<asp:ListBox ID="ListBox1" runat="server" CssClass="TA"></asp:ListBox>

By this the scrollbar does not gets rendered colored in the IDE, and not in
the browser (IE6.0).

An asp textbox gets rendered correctly.

Why not a listbox?

/k
Oct 6 '06 #1
2 10631
Not sure, but overflow is the way to do it in a DIV tag.

style="overflow:scroll;"
--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
http://gregorybeamer.spaces.live.com

*************************************************
Think outside of the box!
*************************************************
"kurt sune" <ap*@apa.comwrote in message
news:OY**************@TK2MSFTNGP05.phx.gbl...
How do I render the scrollbars by CSS in a listbox?

I have understood that an asp listbox gets rendered as a select element.

So I tried first by adding a style element:
.TA {scrollbar-3dlight-color:aqua;

scrollbar-arrow-color:fuchsia;

scrollbar-base-color:fuchsia;

scrollbar-darkshadow-color:;

scrollbar-face-color:blue;

scrollbar-highlight-color:chartreuse;

scrollbar-shadow-color:lightsalmon}

And then an html select:

<select size="4" name="LBox1" id="LBox1" class="TA" style="width: 213px;
height: 51px">

<option value="sune">une</option>

<option value="sune">une</option>

<option value="sune">une</option>

<option value="sune">une</option>

<option value="sune">une</option>

<option value="sune">une</option>

<option value="sune">une</option>

<option value="sune">une</option>

</select>

By this the scrollbar gets rendered colored in the IDE, but not in the
browser (IE6.0).

Then I try adding the TA class as cssclass for the listbox:

<asp:ListBox ID="ListBox1" runat="server" CssClass="TA"></asp:ListBox>

By this the scrollbar does not gets rendered colored in the IDE, and not
in
the browser (IE6.0).

An asp textbox gets rendered correctly.

Why not a listbox?

/k


Oct 6 '06 #2
Cowboy (Gregory A. Beamer) napisał(a):
Not sure, but overflow is the way to do it in a DIV tag.

style="overflow:scroll;"
The "select" html element is very specific and you're not able to apply
css rules to it.
Styling scrollbars is generally bad idea, because it's not a part of css
specification and works in IE only.
--
PP
Oct 6 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Alan Lane | last post by:
Hello world: I have a Parent form with a combobox, where the user selects a Contract or Estimate number. Then, on a subform, I have a listbox that gets filled with the details of the selected...
2
by: carmen | last post by:
I need to have in a form a listbox with a big scrollbar (I'm working for a touchscreen). As the scrollbar that the listbox has is small, I put a listbox withou scroll and a scrollbar independent....
0
by: Lundy | last post by:
greetings, The listbox control on my aspx page has a vertical scrollbar. But some of the text extends beyond the right limit of the listbox. I don't see a horizontal scrollbar, and I don't...
7
by: Pachydermitis | last post by:
Hi all you Experts, I need to scroll a listbox horizontally. For the life of me I cannot get it to move. I can successfully scroll it vertically. I have the handle for the listbox and the scroll...
2
by: Paul_Madden via DotNetMonster.com | last post by:
I am handling the Listbox DrawItem event to enable the listbox strings to be displayed in different colours for easy reading. Have set ScrollAlwaysVisible and HorizontalScrollbar to true. I...
0
by: Mark Smith | last post by:
hi i use an ownerdraw method for coloring some items in the list different then the others. code: private void ListBoxDrawItem(object sender, DrawItemEventArgs e) { ListBox lst =...
0
by: rn5a | last post by:
How do I make a ListBox display the horizontal scrollbar if the text of any of the items in the ListBox exceeds the width of the ListBox? Unlike the vertical scrollbar which gets displayed...
2
by: Appu2008 | last post by:
Hi, Iam using Python 2.5 and developing an application using Tkinter. I want a listbox with scrollbar. I tried to combine both but it gets filled in the entire screen. Here is the code.. ...
2
by: Appu2008 | last post by:
HI, Iam creating a python application using Tkinter. Ia trying to attach a scrollbar to a listbox. Please tell me how can i set the height of the scrollbar to that of the listbox. Beacuse in...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.