Hallo,
WebSet psValue of oWebCombo1 to "wert"
funktioniert nicht im cWebCombo
funktioniert in cWebForm
soll das so ein ?
Es soll ein Wert vorgegeben werden, trotzdem aber eine Auswahl möglich sen.
Ralf
Hallo,
WebSet psValue of oWebCombo1 to "wert"
funktioniert nicht im cWebCombo
funktioniert in cWebForm
soll das so ein ?
Es soll ein Wert vorgegeben werden, trotzdem aber eine Auswahl möglich sen.
Ralf
So etwas funktioniert:
soll der Wert schon voreingestellt sein, muss einfach "Set psValue" verwendet werden, damit der Wert schon gesetzt ist, bevor das Objekt an den Client übertragen wurde.Code:Object oWebCombo1 is a cWebCombo Set piColumnSpan to 0 Set psLabel to "combo" Procedure OnFill Forward Send OnFill Send AddComboItem "1" "eins" Send AddComboItem "2" "zwei" Send AddComboItem "3" "drei" Send AddComboItem "4" "vier" Send AddComboItem "5" "fünf" End_Procedure Set psValue to "1" End_Object Object oWebButton1 is a cWebButton Set piColumnSpan to 0 Set psCaption to "button" Procedure OnClick WebSet psValue of oWebCombo1 to "3" End_Procedure End_Object
WebSet ist nur dann notwendig, wenn eine Property geändert werden soll in einem Objekt, das der Client bereits hat.
Hello Ghost,
ich hatte den WebSet direkt mit einen Dateifeld gesetzt
WebSet psValue of oWebCombo to Datei.Feld
Das geht nicht.
Wenn ich das vorher in eine Variable schreibe geht das mit der Variablen.
Warum das?
Ralf
The cWebCombo requires an item to be available with the value you are setting. Unline the windows DbCombo/Combo it doesn't support free text input.
So if no AddComboItem with "wert" as first value is done it will not be able to show "wert" as a value.
You can use Entry_Item and it will then automatically pick up values from the validation table.