Hi!
I have a selection-list with the default value "ALL" selected by default. Multiple selection can be made in the list.
What i'm trying to do is if another selection is made, i want to automaticly unselect the "ALL" one.
I'm trying to do this in the value-changed like this ????
Trying to remove the "ALL" entry from the screen-value, but when i assign the NewValue# to screen-value.... it doesn't changed anything ???? why ????
ON VALUE-CHANGED of lst# DO:
run CheckChoiceALL(Self:handle).
END.
here's the procedure :
Procedure CheckChoiceALL.
def input parameter hSelect as widget-handle.
def var PosDep# as int.
def var NewValue# as char.
/* Verify if ALL is selected */
if hSelect:Is-Selected("0") then do:
PosDep# = index(hSelect:screen-value, ",0").
if PosDep# <> 0 then do:
message ",0" posdep# substring(hSelect:screen-value, 1, PosDep# - 1). pause.
NewValue# = substring(hSelect:screen-value, 1, PosDep# - 1).
message "apres" NewValue#. pause.
hSelect:screen-value = NewValue#.
message "apres-2" hSelect:screen-value. pause.
end.
else do:
PosDep# = index(hSelect:screen-value, "0,").
if PosDep# <> 0 then do:
hSelect:screen-value = substring(hSelect:screen-value, PosDep#, 2).
end.
end.
end.
end.
I have a selection-list with the default value "ALL" selected by default. Multiple selection can be made in the list.
What i'm trying to do is if another selection is made, i want to automaticly unselect the "ALL" one.
I'm trying to do this in the value-changed like this ????
Trying to remove the "ALL" entry from the screen-value, but when i assign the NewValue# to screen-value.... it doesn't changed anything ???? why ????
ON VALUE-CHANGED of lst# DO:
run CheckChoiceALL(Self:handle).
END.
here's the procedure :
Procedure CheckChoiceALL.
def input parameter hSelect as widget-handle.
def var PosDep# as int.
def var NewValue# as char.
/* Verify if ALL is selected */
if hSelect:Is-Selected("0") then do:
PosDep# = index(hSelect:screen-value, ",0").
if PosDep# <> 0 then do:
message ",0" posdep# substring(hSelect:screen-value, 1, PosDep# - 1). pause.
NewValue# = substring(hSelect:screen-value, 1, PosDep# - 1).
message "apres" NewValue#. pause.
hSelect:screen-value = NewValue#.
message "apres-2" hSelect:screen-value. pause.
end.
else do:
PosDep# = index(hSelect:screen-value, "0,").
if PosDep# <> 0 then do:
hSelect:screen-value = substring(hSelect:screen-value, PosDep#, 2).
end.
end.
end.
end.