Reuben and Seb,
Thank you both for your input.
I have to agree with Seb about using a CONSTRUCT for INPUT. That was the exact concern I had while reading Reuben's suggestion.
It is a fair point that Seb raised but I think I can count on one hand the number of COMBOBOX that were being for a datatype other than CHAR or STRING.
I've seen more CHAR(1)...COMBOBOX... ITEMS(("Y","Yes"),("N","No")) than SMALLINT ... ITEMS(("1","Yes"),("0","No")).
Also if you were allowing a user to edit a combobox, you couldn't have the (code,value) itemslist, it could only be a list of values.
If you have an EDITABLE COMBOBOX it would be quite plausible (but not very wise) for the user to enter >ABC or A*, and that would be the value you have to store in the field. (thats another feature I'd like to see is something that only allows A-Z0-9 and a few other characters into an EDIT field).
The different semantic that would effect you is that a CONSTRUCT won't limit the number of characters you can type into the field. Anyway you asked if there is a way, and that may give you a way until the functionality is potentially added in a future version.
...
Reuben,
Do you have any samples of how to "use presentation styles to control the position and appearance"?
I don't recall seeing any in the documention or online tutorials.
(But I will go look again just to be certain.)
I'll collect a few examples together and put a working example somewhere but in the interim add the styles below as a starting point. So when the user clicks on a buttonedit (use IMAGE="combo" on your BUTTONEDIT) and your zoom window opens (and hopefully it consists of just one table) then you get a list and not much else.
<Style name="Window.naked2">
<StyleAttribute name="windowType" value="modal" />
<StyleAttribute name="position" value="field" />
<StyleAttribute name="border" value="none" />
<StyleAttribute name="windowSystemsMenu" value="no" />
<StyleAttribute name="windowOptionClose" value="no" />
<StyleAttribute name="windowOptionMinimize" value="no" />
<StyleAttribute name="windowOptionMaximize" value="no" />
<StyleAttribute name="sizable" value="no" />
<StyleAttribute name="actionPanelPosition" value="none" />
<StyleAttribute name="ringMenuPosition" value="none" />
<StyleAttribute name="toolBarPosition" value="none" />
<StyleAttribute name="statusBarType" value="none" />
</Style>
<Style name="Table.naked2">
<StyleAttribute name="headerHidden" value="yes" />
</Style>
The other technique I would consider is to have...
COMBOBOX f01 = formonly.field1, ITEMS=(<enter your own items>);
BUTTON x: additem, IMAGE="plus";
and your ON ACTION additem consists of
PROMPT "Enter new value" FOR new_value
...
CALL cb.addItem(new_value, new_value)
LET field1 = new_value -- or DISPLAY new_value TO field1
to allow the user to enter a value, and then use the combobox methods to add this new item to the combobox items, and then set the value of the field to the new_value (or use DISPLAY if not UNBUFFERED)
It gives you a COMBOBOX and a mechanism for the user to enter a value that isn't in the COMBOBOX.
Reuben