I added a combo box to a grid which is displaying a list of items. What I need to do is to select the item from the combo, hide the combo box, and place the selected item on the same cell where the combo box is.
Place the combo and an ordinary textbox in the same column of the grid. In the combo's InteractiveChange, set a form property to say that an item has been selected.
In the grid column's Init, set the column's DynamicCurrentControl property to an IIF() expression. The expression should say that if the form property is true, make the textbox the current control, otherwise make the combo box current. See the Help for DynamicCurrentControl for more details.
The above is just an outline, but is should get you started.
I'm not sure how you plan to reveal the combo box again.
Mike
__________________________________
Mike Lewis (Edinburgh, Scotland)
I presume you deleted the textbox from the grid when you added the combo box. If you'd left the textbox in place then you could have used DynamicCurrentControl to decide whether the combo or the text box was visible.
A form property is a property that you add to the form. To do so, go to the Form menu (in the Form designer) and select New Property.
The point about a form property is that it's available to all the code in the form -- a sort of semi-public variable. To reference it in your code, you need to precede its name with THISFORM.
I suggest you spend a bit of time reading the Help file re properties and scope before you go much further.
Mike
__________________________________
Mike Lewis (Edinburgh, Scotland)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.