Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Sep 10th, 2006, 8:59 PM   #1
crawforddavid2006
Expert Programmer
 
crawforddavid2006's Avatar
 
Join Date: Apr 2005
Location: Not sure yet
Posts: 582
Rep Power: 0 crawforddavid2006 is an unknown quantity at this point
Send a message via AIM to crawforddavid2006 Send a message via MSN to crawforddavid2006
Combo Box

I can't figure out how to keep the text in the box from being edited
__________________
Quote:
Originally Posted by DaWei View Post
Well, it's better than Pen Islands url....;)

crawforddavid2006 is offline   Reply With Quote
Old Sep 10th, 2006, 9:03 PM   #2
King
Professional Programmer
 
King's Avatar
 
Join Date: Jan 2006
Location: Ontario, Canada
Posts: 376
Rep Power: 0 King is an unknown quantity at this point
Try changing the DropDownStyle property to DropDownList. This can either be done through the designer or via code.
__________________
I am Addicted to Linux!
King is offline   Reply With Quote
Old Sep 10th, 2006, 9:06 PM   #3
crawforddavid2006
Expert Programmer
 
crawforddavid2006's Avatar
 
Join Date: Apr 2005
Location: Not sure yet
Posts: 582
Rep Power: 0 crawforddavid2006 is an unknown quantity at this point
Send a message via AIM to crawforddavid2006 Send a message via MSN to crawforddavid2006
Thanks.
__________________
Quote:
Originally Posted by DaWei View Post
Well, it's better than Pen Islands url....;)

crawforddavid2006 is offline   Reply With Quote
Old Sep 10th, 2006, 9:30 PM   #4
King
Professional Programmer
 
King's Avatar
 
Join Date: Jan 2006
Location: Ontario, Canada
Posts: 376
Rep Power: 0 King is an unknown quantity at this point
No problem, I came accoss the same problem a couple months ago
__________________
I am Addicted to Linux!
King is offline   Reply With Quote
Old Sep 10th, 2006, 10:50 PM   #5
crawforddavid2006
Expert Programmer
 
crawforddavid2006's Avatar
 
Join Date: Apr 2005
Location: Not sure yet
Posts: 582
Rep Power: 0 crawforddavid2006 is an unknown quantity at this point
Send a message via AIM to crawforddavid2006 Send a message via MSN to crawforddavid2006
I've searched for this and can't find any help. I am trying to make a text box equal something if a certain item is choosen. I don't know if that makes sense but if it does could you help me?
__________________
Quote:
Originally Posted by DaWei View Post
Well, it's better than Pen Islands url....;)

crawforddavid2006 is offline   Reply With Quote
Old Sep 10th, 2006, 11:07 PM   #6
King
Professional Programmer
 
King's Avatar
 
Join Date: Jan 2006
Location: Ontario, Canada
Posts: 376
Rep Power: 0 King is an unknown quantity at this point
Open up your form designer where your combo box is located and double click the combo box and it will create and event. This event will be triggered every time there is a new option selected in the combo box, so now you can put an if statement in that event that checks what has been selected, and then you can set your text box if it meets the right criteria. I think this is what you are looking for, if not please provide a bit more info.
__________________
I am Addicted to Linux!
King is offline   Reply With Quote
Old Sep 10th, 2006, 11:19 PM   #7
crawforddavid2006
Expert Programmer
 
crawforddavid2006's Avatar
 
Join Date: Apr 2005
Location: Not sure yet
Posts: 582
Rep Power: 0 crawforddavid2006 is an unknown quantity at this point
Send a message via AIM to crawforddavid2006 Send a message via MSN to crawforddavid2006
yeah thats what i mean but when i try this if statement
[php]
if(this.Equals("COMPUTERS"))
displaybox.Text = "computers";
[/php]

it does not display in the text box
__________________
Quote:
Originally Posted by DaWei View Post
Well, it's better than Pen Islands url....;)

crawforddavid2006 is offline   Reply With Quote
Old Sep 10th, 2006, 11:44 PM   #8
King
Professional Programmer
 
King's Avatar
 
Join Date: Jan 2006
Location: Ontario, Canada
Posts: 376
Rep Power: 0 King is an unknown quantity at this point
Don't go "this.Equals", "this" means the form you are on; use the name of your combobox.

if(comboBox.Text == "COMPUTERS")
    displaybox.Text = "computers";
__________________
I am Addicted to Linux!
King is offline   Reply With Quote
Old Sep 11th, 2006, 12:29 PM   #9
crawforddavid2006
Expert Programmer
 
crawforddavid2006's Avatar
 
Join Date: Apr 2005
Location: Not sure yet
Posts: 582
Rep Power: 0 crawforddavid2006 is an unknown quantity at this point
Send a message via AIM to crawforddavid2006 Send a message via MSN to crawforddavid2006
Thanks again
__________________
Quote:
Originally Posted by DaWei View Post
Well, it's better than Pen Islands url....;)

crawforddavid2006 is offline   Reply With Quote
Old Sep 11th, 2006, 12:57 PM   #10
crawforddavid2006
Expert Programmer
 
crawforddavid2006's Avatar
 
Join Date: Apr 2005
Location: Not sure yet
Posts: 582
Rep Power: 0 crawforddavid2006 is an unknown quantity at this point
Send a message via AIM to crawforddavid2006 Send a message via MSN to crawforddavid2006
Maybe its just me but finding any info on combo boxes is really hard. I would like to add a text file to combo boxes collection and i can, but it is just one really long line. How can i get it to have a new line for each new line in the text file?
__________________
Quote:
Originally Posted by DaWei View Post
Well, it's better than Pen Islands url....;)

crawforddavid2006 is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
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 On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
3 language combo. Nebula Coder's Corner Lounge 9 Dec 19th, 2005 1:34 PM
anoying problem with a combo box cloud- Visual Basic 12 May 28th, 2005 1:20 PM
Java Combo Boxes Vengeance Java 0 May 4th, 2005 9:02 AM
What are advantages of Data Combo and data list over simple combo and list box? sham Visual Basic 1 Apr 12th, 2005 4:11 AM
combo box in form.. cloud- HTML / XHTML / CSS 5 Mar 15th, 2005 3:21 PM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 1:55 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC