473,543 Members | 2,061 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

List Box issue

6 New Member

I am using a listBox which has 31 items.

Expand|Select|Wrap|Line Numbers
  3. <SELECT NAME=lst_id size=1>
  4.   <OPTION> 1 </OPTION> 
  5.   <OPTION> 2 </OPTION> 
  6.   <OPTION> 3 </OPTION> 
  7.   <OPTION> 4 </OPTION> 
  8.   <OPTION> 5 </OPTION> 
  9.   <OPTION> 6 </OPTION> 
  10.   <OPTION> 7 </OPTION> 
  11.   <OPTION> 8 </OPTION> 
  12.   <OPTION> 9 </OPTION> 
  13.   <OPTION> 10 </OPTION> 
  14.   <OPTION> 11 </OPTION> 
  15.   <OPTION> 12 </OPTION> 
  16.   <OPTION> 13 </OPTION> 
  17.   <OPTION> 14 </OPTION> 
  18.   <OPTION> 15 </OPTION> 
  19.   <OPTION> 16 </OPTION> 
  20.   <OPTION> 17 </OPTION> 
  21.   <OPTION> 18 </OPTION> 
  22.   <OPTION> 19 </OPTION> 
  23.   <OPTION> 20 </OPTION> 
  24.   <OPTION> 21 </OPTION> 
  25.   <OPTION> 22 </OPTION> 
  26.   <OPTION> 23 </OPTION> 
  27.   <OPTION> 24 </OPTION> 
  28.   <OPTION> 25 </OPTION> 
  29.   <OPTION> 26 </OPTION> 
  30.   <OPTION> 27 </OPTION> 
  31.   <OPTION> 28 </OPTION> 
  32.   <OPTION> 29 </OPTION> 
  33.   <OPTION> 30 </OPTION> 
  34.   <OPTION> 31 </OPTION> 
  35.  </SELECT>
I get a scroll if the items are more than 30.This is the default scroll.
If i have less than 30 items i dont get a scroll.

Is it possible to set the count value for which the scroll must appear. i.e say can i get a scroll after my number of items are more than10.

But i dont want to use "multiple" tag and my "size" attribute must be fixed as 1.
=>With these conditions, how can i make it possible.

Nov 23 '07 #1
4 1494
7,435 Recognized Expert Expert
It's not possible. That's what the size attribute is for.
Nov 23 '07 #2
4 New Member

You need to do like this

1. <html>
2. <head>
3. <style type="text/css">
4. .select_size
5. {
6. font-size: 50;
7. }
8. </style>
9. </head>
10. <body>
11.<SELECT NAME="lst_id" CLASS="select_s ize">
12. <OPTION> 1 </OPTION>
13. <OPTION> 2 </OPTION>
14. <OPTION> 3 </OPTION>
15. <OPTION> 4 </OPTION>
16. <OPTION> 5 </OPTION>
17. <OPTION> 6 </OPTION>
18. <OPTION> 7 </OPTION>
19. <OPTION> 8 </OPTION>
20. <OPTION> 9 </OPTION>
21. <OPTION> 10 </OPTION>
22. <OPTION> 11 </OPTION>
23. <OPTION> 12 </OPTION>
24. <OPTION> 13 </OPTION>
25. <OPTION> 14 </OPTION>
26. <OPTION> 15 </OPTION>
27. <OPTION> 16 </OPTION>
28. <OPTION> 17 </OPTION>
29. <OPTION> 18 </OPTION>
30. <OPTION> 19 </OPTION>
31. <OPTION> 20 </OPTION>
32. <OPTION> 21 </OPTION>
33. <OPTION> 22 </OPTION>
34. <OPTION> 23 </OPTION>
35. <OPTION> 24 </OPTION>
36. <OPTION> 25 </OPTION>
37. <OPTION> 26 </OPTION>
38. <OPTION> 27 </OPTION>
39. <OPTION> 28 </OPTION>
40. <OPTION> 29 </OPTION>
41. <OPTION> 30 </OPTION>
42. <OPTION> 31 </OPTION>
43. </SELECT>
44. </body>
Nov 27 '07 #3
7,435 Recognized Expert Expert
That is not what he is trying to accomplish and the markup is invalid.
Nov 27 '07 #4
Death Slaught
1,137 Top Contributor
nirchuck please use proper CODE tags around your code.

Also there's no need to capitalize your tags like (this goes to the origonal poster aswell).

Thanks, Death
Nov 27 '07 #5

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

Similar topics

by: Guy Hocking | last post by:
Hi there, I am having a few problems compiling a list box that is conditional on what is selected in another list box. What i need is a List box (lstArea) that displays one thing when the List Box (lstRegion) is selected East or West. Basically the areas will change when East or West is selected in lstRegion. The data comes from an SQL...
by: google | last post by:
Hello everyone, I am having an issue using the "Multi Select" option in a list box in MS Access 2003. I am making a form that users can fill out to add an issue to the database. Each issue can be associated with multiple categories. I have an "Issue," "IssueCategory," and "Category" in the database (among other tables). The form has a...
by: Xarky | last post by:
Hi, I am writing a linked list in the following way. struct list { struct list *next; char *mybuff; };
by: Tripper | last post by:
Which is the better way to go and why? //trivial example List<string> strings = GetStrings(); foreach (string s in strings) { // some operation; } strings.ForEach(
by: Steven Watanabe | last post by:
I know that the standard idioms for clearing a list are: (1) mylist = (2) del mylist I guess I'm not in the "slicing frame of mind", as someone put it, but can someone explain what the difference is between these and: (3) mylist =
by: gamehack | last post by:
Hello all again, Sorry for troubling you with my problems. I've tried to implement simple double linked lists, here's my structure: struct DResult { double val; char* title; struct DResult* next; struct DResult* prev; };
by: Chris Brat | last post by:
Hi, Is there a better way to replace/remove characters (specifically ' and " characters in my case, but it could be anything) in strings in a list, than this example to replace 'a' with 'b': x =
by: Paul Hadfield | last post by:
I'm looking for thoughts on the "correct" design for this problem (DotNet 2.0 - in winforms, but that's not so important). I've got two combo boxes (combo1 and combo2), both are populating via database calls (using a separate DB handler class). "combo1" contains a list of countries and is fairly static, it can be added to but no other...
by: phcmi | last post by:
I have a PropertyGrid question. My task is to replace a legacy dialog box presentation with a modern one. The dialog itself allows the user to set configuration settings in our application, so it seems to me that a PropertyGrid is a perfect modern replacement. I won't bore you with the details with all the controls on the dialog since I'm...
by: Zytan | last post by:
This returns the following error: "Cannot modify the return value of 'System.Collections.Generic.List<MyStruct>.this' because it is not a variable" and I have no idea why! Do lists return copies of their elements? Why can't I change the element itself? class Program { private struct MyStruct
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.