473,387 Members | 1,650 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,387 software developers and data experts.

Regarding Listbox height

Hi ,

I just want to create a listbox, with 100 items in it, but it should not show all items at a time, there should be a vertical scroll in which I can see 10 items at a time and I can scroll this down to see the below items.

thanks in advance.

Regrads,
Prasad
Jun 24 '08 #1
6 3300
acoder
16,027 Expert Mod 8TB
Use the size attribute:
[html]<select ... size="10">[/html]
Jun 24 '08 #2
thanks for your quick response, but what I need is if I am setting an attribute size to 10 it is showing the elements of 10 in a box with scrollbar, but I want actually the listbox followed by the display box having scrolls.

example:
[HTML]<select name="" >
<option>mukti</option>
<option>sssss</option>
<option>ddddd</option>
<option>fffff</option>
<option>wwwww</option>
<option>vvvvv</option>
<option>bbbbb</option>
<option>mmmmm</option>
<option>nnnnn</option>
<option>mukti</option>
<option>sssss</option>
<option>ddddd</option>
<option>fffff</option>
<option>wwwww</option>
<option>vvvvv</option>
<option>bbbbb</option>
<option>mmmmm</option>
<option>nnnnn</option>
<option>mukti</option>
<option>sssss</option>
<option>ddddd</option>
<option>fffff</option>
<option>wwwww</option>
<option>vvvvv</option>
<option>bbbbb</option>
<option>mmmmm</option>
<option>nnnnn</option>
</select>
[/HTML]
if I am giving this on click of the down arrow it is showing all elements, but I need element of 10 and scrollbar. can u help me out.

Regards,
Prasad
Jun 25 '08 #3
gits
5,390 Expert Mod 4TB
hmmm ... so you want to limit the 'popup-area' ... i think for this you have to create your own DHTML-dropdown-list ... similar to an ajax-auto-suggest-widget ...

kind regards
Jun 25 '08 #4
acoder
16,027 Expert Mod 8TB
I'm afraid that's a browser default. In Firefox, it'll scroll after 20, I think, but in IE7, it just displays the whole thing. As gits said, you'll need to create your own DHTML version.

PS. please use code tags when posting code.
Jun 25 '08 #5
Thanks for your response. I think I have to make a customized listbox. Anyway thanks.
Jun 26 '08 #6
acoder
16,027 Expert Mod 8TB
If you have any questions and need help implementing it, ask in the JavaScript forum.
Jun 26 '08 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: R.Wieser | last post by:
Hello All, I'm trying to get a "Virtual Listbox" to work. I've currently got a form, and used CreateWindowExA to create a ListBox with the LBS_OWNERDRAWFIXED and LBS_NODATA flags on it. I've...
1
by: Patty O'Dors | last post by:
Hi I have some code to create an ownerdrawn listbox (derived), and when I add an item to it, the bold text of the first item (the title, 'Collections and Maturities') mysteriously seems to get...
1
by: Dan Bass | last post by:
I'm looking to develop a listbox with in-place editing where as each item is selected, it grows to fit in all the text boxes. When the item is deselected, it shrinks back to its original size. The...
1
by: Edward | last post by:
I am having a terrible time getting anything useful out of a listbox on my web form. I am populating it with the results from Postcode lookup software, and it is showing the results fine. What...
1
by: yamne | last post by:
I have a problem. When I click in edit datagrid button I show two listbox and two button. I use two button to move data between two listbox. My problem is that I can't call the listbox in the...
4
by: Moe Sizlak | last post by:
Hi There, I am trying to return the value of a listbox control that is included as a user control, I can return the name of the control but I can't access the integer value of the selected item,...
4
by: Bob P. | last post by:
Hello, I have a page with: * two side-by-side asp:listboxes and two arrow asp:buttons allowing users to add/remove email addresses between them -- very much like Outlook, where you have the...
0
by: David J | last post by:
Hi, I am strugling with the propertygrid and a listbox. I am using the universaldropdowneditor from the codeproject (code below). However I am populating the listbox via a datasource. The problem...
3
by: Hugh O | last post by:
Hi, There is a ROW property on the Web Listbox control within VB.Net. The description states it is "The number of visible rows to display". I have tried setting this property in many different...
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.