Diese Seite mit anderen teilen ...

Informationen zum Thema:
WinDev Forum
Beiträge im Thema:
Erster Beitrag:
vor 2 Jahren, 4 Monaten
Letzter Beitrag:
vor 2 Jahren, 4 Monaten
Beteiligte Autoren:
Ericus, André Labuschagné, Joel

[WB19] - How do I get the displayed value from a Combo box?

Startbeitrag von Joel am 12.03.2016 20:49

Anyone know how to get the displayed Value from a combo box in a looper? You have to reference loopers strictly by attributes in Webdev, but there's no "DisplayedValue" property listed in the looper design area... confusing!


Hi Joel

Not quite sure what you mean by the display value. Can you explain a bit more.


von André Labuschagné - am 13.03.2016 11:09
Hi Joel

This is the way I do it.

In the looper you have an attribute ATT_LkpCombo that points to your combo. The value that will be stored in the looper is always the number of the item in the list. So if you selected the 10th item in the combo the value stored in ATT_LkpCombo = 10.

So you create another attribute in the looper let's say ATT_Display.

In the Whenever Modified properties of the COMBO you have some code that lookup the stored value of the combo and update ATT_Display with that value.

If your combo points to a database table or query you have to figure out a way of getting the 10th value of your combo.

If the values are programmed into the COMBO I create 2 combo's. One is hidden and outside the looper. So when you select the 10th value in the combo in the looper you then just get ListSelectPlus(COMBO2,ATT_LkpCombo) and there you get the value.

If the source is an array of values then it is also easy to get the value to display.

Maybe somebody has an easier way to do things but the above does work.


Ericus Steyn

von Ericus - am 13.03.2016 13:01
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.