[Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 702
  • Last Modified:

Change ComboBox to TextBox

I have a Windows.Forms.ComboBox that I would like to change to a TextBox.
What is the easiest way to do this?
0
allelopath
Asked:
allelopath
  • 2
  • 2
2 Solutions
 
Kyle AbrahamsSenior .Net DeveloperCommented:
Delete the combo box
Add a textbox

Update the code for any selecteditems/values.
0
 
allelopathAuthor Commented:
I guess what I'm asking is there a way to refactor it using the GUI editor.
0
 
AndyAinscowCommented:
You could manually edit the .cs file - replace ComboBox with TextBox.
0
 
AndyAinscowCommented:
ps.  Not possible in the GUI editor to change a control type.
0
 
allelopathAuthor Commented:
AndyAinscow:
This is what I had done, simply change the class and fix the fallout from there. Not all that bad, but again, was just wondering if there was a better way.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now