Diese Seite mit anderen teilen ...

Informationen zum Thema:
Forum:
WinDev Forum
Beiträge im Thema:
6
Erster Beitrag:
vor 8 Monaten, 2 Wochen
Letzter Beitrag:
vor 8 Monaten, 1 Woche
Beteiligte Autoren:
Garry Allen, DerekT, Stewart Crisler

Combo_box

Startbeitrag von Garry Allen am 08.02.2017 15:46

This is probably an easy question but I can't seem to find an answer myself.

I have a window to which I pass a parameter (psBoatID). On the window there is a combo_box showing the description of the boats: the stored value is the code for the boat. I want the combo_box to initially show the description for the boat that corresponds to the passed parameter. I just can't find the appropriate syntax.
Thanks
Garry

Antworten:

Garry

The 'store item' of the combo needs to be set to 'BoatID'

In the global declaration of the window use MyBoatCombo = psBoatID

This assumes that the combo is already populated (bound to a file) - if not run your process to populate the combo prior to setting the value.

von DerekT - am 08.02.2017 17:19
You might need to use GLINK() when setting the list of items to be displayed in the combo.

Stewart Crisler

von Stewart Crisler - am 10.02.2017 17:33
I thought that was what I had done.
[attachment 2277 GlobalDeclaration.png]
[attachment 2278 ComboBox.png]

von Garry Allen - am 10.02.2017 19:13
Garry,

To ensure that the combo has been intialized with its content move your code
COMBO_RBL_Boat = spBoatID
to the 'End of Initialization' code section of the window.

Alternatively put the code as
Myself = spBoatID
in the 'Initialization code section of the combo control.

von DerekT - am 12.02.2017 10:58
Thanks for the help Derek.
It is finally working!

Garry

von Garry Allen - am 13.02.2017 13:04
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.