Programming Forums
User Name Password Register
 

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

Reply
 
Thread Tools Display Modes
Old Oct 28th, 2004, 5:09 PM   #1
Nim52
Newbie
 
Join Date: Oct 2004
Posts: 2
Rep Power: 0 Nim52 is on a distinguished road
Can I make a Combo Box start out with a default selection?

Is there anyway to make the combo box longer?

How do I change something based on the selection I've made in a combo box?
I wrote:

If cboGenConType.Text = "General - Energy" Then
cboGenConUnit1.AddItem = "BTU(international)"
End If
Nim52 is offline   Reply With Quote
Old Oct 28th, 2004, 7:07 PM   #2
tempest
Programming Guru
 
tempest's Avatar
 
Join Date: Oct 2004
Posts: 1,041
Rep Power: 6 tempest is on a distinguished road
Send a message via ICQ to tempest Send a message via AIM to tempest Send a message via Yahoo to tempest
! Make it bigger...
cboGenConUnit1.height = whatever

cboGenConUnit1.index = 1 ! This references the index of the
             ! array of items in the textbox...
             ! 1st(1), 2nd(2), etc...

Hope this helps
__________________

tempest is offline   Reply With Quote
Old Oct 28th, 2004, 7:17 PM   #3
Nim52
Newbie
 
Join Date: Oct 2004
Posts: 2
Rep Power: 0 Nim52 is on a distinguished road
I get an error. It says:

Compile error:

Can't assign to read-only property
Nim52 is offline   Reply With Quote
Old Oct 29th, 2004, 11:34 AM   #4
Pizentios
Programming Guru
 
Pizentios's Avatar
 
Join Date: May 2004
Location: Brandon, Manitoba, Canada
Posts: 2,023
Rep Power: 7 Pizentios is on a distinguished road
Send a message via ICQ to Pizentios Send a message via MSN to Pizentios
Quote:

How do I change something based on the selection I've made in a combo box?
I wrote:
You want to use a on_change or on_click event handler.

For everything else, maybe try reading this: http://msdn.microsoft.com/library/default....objComboBox.asp
__________________
Profanity is the one language that all programmers understand.

Check out my Blog <---updated Nov 30 2007!
Pizentios 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




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

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