[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

combobox item

Posted on 2006-11-13
4
Medium Priority
?
324 Views
Last Modified: 2010-04-23
Hey guys

Is there anyway to change the text in a combobox  item when selected?  
ex.

Current combobox items
                                      Dog
                                      Cat
                                      xwife
when selected
                                      * Dog
                                      * Cat
                                      * xwife
Thanks
0
Comment
Question by:stephenz43
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 13

Expert Comment

by:newyuppie
ID: 17935602
did you try handling it in the selecteditemchange() event of the combobox?
other questions: do you need the current selected item have an * or do you need the whole list to have *s? when do you need this to happen, right after you changed your selection, or when the combobox has input focus?
0
 

Author Comment

by:stephenz43
ID: 17935607
note...just adding a asterick(*) to the item when selected
0
 

Author Comment

by:stephenz43
ID: 17935614
it need to happen conditionaly.....depending on a series of calculations
0
 
LVL 6

Accepted Solution

by:
manch earned 2000 total points
ID: 17935771

Try the following code it will surely work for u :

     
        'Inserting a New Item (with * preceeded in the text) in the Combo Box at the Index at which the item was selected
        ComboBox1.Items.Insert(ComboBox1.Items.IndexOf(ComboBox1.SelectedItem), "*" & ComboBox1.GetItemText(ComboBox1.SelectedItem))
       
        'Removing the Item Without *
        ComboBox1.Items.RemoveAt(ComboBox1.Items.IndexOf(ComboBox1.SelectedItem))

Try It
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: jpaulino
XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String (http://msdn.microsoft.com/en-us/library/system.string.aspx) Literal, only instead of starting and ending with w…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question