You want to add a label in front of a drop down list
Use Text with option -label
If there are further elements
in the same row at the right hand side of the drop down list you need to
"stop" the underlining by a further
command, see example 2 below.
Text (5,100) "Division" size=10 -label
DropDownList (5,111) "mydivisions" width=30 refer="V[division]"
InputField (5,150) "Customer" (5,160) size=10 name="kunnr"
Here the underlining is extended to the next text element "Customer". The reason is that the drop down list drawn by GuiXT is not taken into account by SAP GUI when joining the label with the next screen element.
You can avoid this effect by adding a further text element at the same position as the drop down list. This text remains invisible since it is covered by the drop down list:
InputField(5,150) "Customer" (5,160) size=10 name="kunnr"