index > Visual C# General > combox.text

combox.text

when assigning text to combobox.text="ddddd" it is not displaying while runing program




swathi
lumakar_challa
Check your ComboBox's DropDownStyle property. If it is set to DropDownList then the Text property is readonly, hence you can't change the value from it.

Regards,

-chris


Mark the best replies as Answers! | Blog: http://community.devpinoy.org/blogs/cvega
Chris Vega

Hi

I think you need to add string "ddddd" as an Item into your comboBox comboBox.Items.Add("ddddd");

Hope this helps




Bulldog.NET (South Africa)
Sibusiso
You need to add your string text and select is:


public void SelectText( string text )
{
// Find the index of the specified string.
int index = comboBox.FindString( text );

// When the string was not found; add it.
if( index == -1 )
{
index = comboBox.Items.Add( text );
}

// Select the string item.
comboBox.SelectedIndex = index;
}





** Microsoft Community Moderator ** http://born2code.net **
PJ. van de Sande
we have to add the item using comboBox.Items.Add("dddd");
.netguy
reply 5

You can use google to search for other answers

 

More Articles

• file tree view using network
• print File
• Exception Assistant not showing
• The label 'case 11004:' already occurs in this switch statement
• <appSettings> before <configSections> bug?
• Deleting IE Cache
• Command shell in console app.
• How to use SNMP in C#
• Installation - keeps asking for vcssetup.msi when I run Excel
• First C# Project - Can I attach an Imagelist to a Menustrip?
Bookmark and Share
Welcome to Bokebb   New Update  
 

New Articles

• Request for New C# forum
• How can include component list in Class
• C# Code not Working in Win 2000
• System.Drawing namespace
• Incorporate C# Code
• API Problem
• How to interact between user control and
• StringDictionary DesignTimeEditor
• Login Control problem
• Get Ticket-Granting Ticket (TGT) from me
• Access denied when reading the TotalProc
• Windows Forms application works fine on
• Connect to database on another computer
• How to access Sybase database from MS SQL
• Disable close box in Title Bar ?

Hot Articles

• LPT1 CONTROL
• Bring Another app to front
• Form Count
• Encrypting (Appended) text file
• Image processing: question!
• how to associate a filetype with a windo
• RowEdit EventHandler
• form
• Loading MDIChild into MDI Wndow from a D
• string resources and GUI in VS 2005
• Windows Service - Need to clean up class
• integrating c# and unmanaged c++ class l
• Inserting Image in my Report (ReportView
• Reading from App.Config c# 2.0 console a
• Process

Recommend Articles

• Windows Forms application works fine on
• RMO WEB SYNCHRONISATION
• How do I select Images from my External
• Socket IP Filter with wildcard/range
• What's wrong with this code?
• how to endure only one object instance e
• finetuning .NET 2.0 tracing
• InvalidCastException , Exception from HR
• Should I pass an object to a class using
• How do I create a simple table in C#
• Running Windows Commands interactively i
• Send e-mail by proxy
• Create webBrowser control in external wi
• treeview_AfterSelect fires after Validat
• No PUIDs in csproj files