0

I have a form with a combo box. Currently It displays the available values from the database. But for a particular scenario, I wants it dynamically change to a text box so that the user can manually enter the value. Can I do it in the same form. If I use a second form,I can solve this problem. But I want to do it with little code changes. Can someone provide some ideas?

2 Answers 2

1

You can set DropDownStyle to DropDown. My bad. Indeed, in vb6 the style property can't be changed during runtime.

  1. You can hide/show desired control.
  2. Try using Locked property.
2
  • thanks. I tried to change the style property for the combo box in vb6 during runtime. But It seems like it is read only.
    – ShivShambo
    Jun 11, 2013 at 7:19
  • I think Przeszczep meant using two controls, hiding/showing them at the need.
    – Arvo
    Jun 11, 2013 at 7:51
0

I used a combo array(combobox(0),combobox(1)) with two different styles(simple combo and dropdowncombo) and made it visible and disable at runtime using the Visible property

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.