Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > C# and C > C# 1.0 > C#
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
C# Programming questions specific to the Microsoft C# language. See also the forum Beginning Visual C# to discuss that specific Wrox book and code.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old April 2nd, 2008, 09:01 PM
Registered User
 
Join Date: Jan 2008
Location: , , .
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default comobox contain multi value

hi,

i have two comobox one for hour and second for min

//hour
contain value frm 0,1 ,2, 3,...22,23

min
contain value frm 1,2,3....58,59,60


instead of using two comobox i using a single como which
contain val like that

1:0
1:1
1:2
..
..
..
23:0
23:1
23:2

someone give me idea how i perform this task .
thanks

Reply With Quote
  #2 (permalink)  
Old April 2nd, 2008, 09:25 PM
planoie's Avatar
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

I'm not entirely sure I understand what you are asking. Are you looking to create a single combo box with all times from 0:00 thru 23:59 (that's 1440 items)?

-Peter
peterlanoie.blog
Reply With Quote
  #3 (permalink)  
Old April 2nd, 2008, 09:48 PM
Registered User
 
Join Date: Jan 2008
Location: , , .
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

yes i want to make a clock in comobox

Reply With Quote
  #4 (permalink)  
Old April 2nd, 2008, 11:00 PM
planoie's Avatar
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Probably easiest to create a nested loop that creates new items for the combo box. Outer loop will be 0-23 and inner loop will be 0-59.

-Peter
peterlanoie.blog
Reply With Quote
  #5 (permalink)  
Old April 3rd, 2008, 12:55 AM
Friend of Wrox
 
Join Date: Mar 2007
Location: Hampshire, United Kingdom.
Posts: 432
Thanks: 0
Thanked 1 Time in 1 Post
Default

Hi Capri,

Are you sure you want to do this? Thats a heck of a big ComboBox, would it not be better to have something like half-hour blocks in there?

If you really do, then Peter is right, create two loops. Just the idea seems kinda anti-user! :)

Rob
The Developing Developer
Currently Working Towards: MCAD C#
My Blog: http://www.robzyc.spaces.live.com
<center>"Nothing can stop the man with the right mental attitude from achieving his goal;
nothing on earth can help the man with the wrong mental attitude".

Thomas Jefferson</center>
Reply With Quote
  #6 (permalink)  
Old April 3rd, 2008, 08:46 AM
planoie's Avatar
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

What's wrong with 2 drop down lists, one for hour, one for minutes? I've never seen a birthday selector that lists every single day of every month of every year in a single drop down. They are always in 3.

-Peter
peterlanoie.blog
Reply With Quote
  #7 (permalink)  
Old April 3rd, 2008, 09:05 AM
Friend of Wrox
 
Join Date: Mar 2007
Location: Hampshire, United Kingdom.
Posts: 432
Thanks: 0
Thanked 1 Time in 1 Post
Default

You can even just lump the two together as a UserControl and totally encapsulate all the functionality, so as far as you are concerned, it IS one control? ;)

Rob
The Developing Developer
Currently Working Towards: MCAD C#
My Blog: http://www.robzyc.spaces.live.com
<center>"Nothing can stop the man with the right mental attitude from achieving his goal;
nothing on earth can help the man with the wrong mental attitude".

Thomas Jefferson</center>
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
multi threading rashid.shaban@gmail.com BOOK: ASP.NET Website Programming Problem-Design-Solution 1 February 26th, 2007 11:48 PM
Multi Report ...! anukagni Access 2 June 21st, 2006 01:35 AM
multi-multi-multiple Insert with subquery??? jmjyiannis SQL Server 2000 1 May 5th, 2006 02:20 PM
Multi Parameters jcwc888 BOOK: Professional SQL Server Reporting Services ISBN: 0-7645-6878-7 1 March 16th, 2006 12:57 PM
Multi-language Lofa ASP.NET 1.0 and 1.1 Basics 2 October 25th, 2005 04:10 AM



All times are GMT -4. The time now is 09:48 PM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.