Can I have a text box, when you click on it once, turns into a combo box (so you can choose something from the database) then when you select something, have it turn back into a text box?
I don't want a page filled with combo boxes is the reason for this.
I'm just looking for a clean looking page but still have the ability to grab things from a database...
If there is a better or easier way to do this please let me know. That's just the way that came to mind...
Thanks,
Patrick
Change from one type box then back?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
There's probably lots of ways to do something with this, but one to try may be:
Put a field on the stack (in this case "fldPseudoCombo"). Put a combo box menu on the stack (in this case "btnPseudoCombo").
Make the sizes the same, and align them on the stack so that they are on top of each other, with the field on top and hiding the combo box. Then when anyone selects the field, hide it, so that the combo box is visible in its place, and when the combo box item is selected, show the field (with its new contents).
In the script of the field, use code such as:In the script of the combo box button, use code such as:
You may want to experiment with locked text and unlocked text in the field, so also have a look at the focusIn and focusOut messages.
HTH
Put a field on the stack (in this case "fldPseudoCombo"). Put a combo box menu on the stack (in this case "btnPseudoCombo").
Make the sizes the same, and align them on the stack so that they are on top of each other, with the field on top and hiding the combo box. Then when anyone selects the field, hide it, so that the combo box is visible in its place, and when the combo box item is selected, show the field (with its new contents).
In the script of the field, use code such as:
Code: Select all
on openField
hide me
end openField
on closeField
-- this handler should really be redundant, as the "show" command will be triggered in the menuPick handler of the combo box
show me
end closeField
Code: Select all
on menuPick pItemName
switch pItemName
-- any processing you want to happen dependent on the menu item selected
end switch
-- then copy the selected item to the field and show it
put pItemName into field "fldPseudoCombo"
show field "fldPseudoCombo"
end menuPick
HTH