gleznov
asked on
Combo Box - change other boxes when value manually entered
Hi,
I have a windows app with a combo box. The user selects a set number and then the set type displays in a disabled text box beside it. This works fine if the user selects it in the combo box, using the selected_index_changed method. But if someone types in a valid set number, while it repositions the combo box onto that set number, the text box doesn't update. I've tried using the same code in the Enter, selected_Value_change, and changecommitted methods but those don't work either. Is there a way to catch when someone types in the set number in the box and then tabs or clicks out of the box?
JP
I have a windows app with a combo box. The user selects a set number and then the set type displays in a disabled text box beside it. This works fine if the user selects it in the combo box, using the selected_index_changed method. But if someone types in a valid set number, while it repositions the combo box onto that set number, the text box doesn't update. I've tried using the same code in the Enter, selected_Value_change, and changecommitted methods but those don't work either. Is there a way to catch when someone types in the set number in the box and then tabs or clicks out of the box?
JP
ASKER
OK sorry to change the question up but how can I just make the combo box so that they can't type into it? I know I've done this before but I've been working with web apps so long now I can't remember, and I can't find the property. I'm getting errors when I try to trap the leave event, so I'd rather just cut that ability altogether.
JP
JP
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Couldn't get it working, just set them to dropdownlist. Thanks!
JP
JP
You could trap the "Leave" event. Or the "Validating" or "Validated" events.
Look in your help for the ComboBox class events, and look at Leave - it contains a nice explanation of which events are fired, in which order.
Hope this helps,
Nikki