General information
Category:
Forms & Form designer
Title:
Displaying both columns in a combo drop down
I have a form which acts as a generic popup for a variety of options throughout an application and rather than create a form for each one I just pass parameters to the form. It works worderfully for single field options and almost works for the two field lists. For the latter, however, it only displays the last named field, although, as you navigate up and down the list, the value of the other field appears in the combo list header area.
this is the code, in the init of the form, which populates the combo properties.
*first assign properties from params
thisform.dbase=dbase && alias basis for combo
thisform.fieldlist=listfld && fields for combo in form "dbase.field1,field2"
thisform.datafld=datafld && field to capture the return value
thisform.listitle=header && display title for form with combo
thisform.cbopoplist.columncount=(cols)
thisform.cbopoplist.rowsource=thisform.fieldlist
thisform.cbopoplist.rowsourcetype=2
if width2>0
ws='"'+alltrim(str(width1))+','+alltrim(str(width2))+'"'
else
ws=alltrim(str(width1))
endif
thisform.cbopoplist.columnwidths=ws
Anyone point me at the problem?
Harry
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only