Add set value to value controls
This commit is contained in:
@@ -22,7 +22,7 @@ feature {NONE} -- Initialization
|
||||
make (l, c: STRING)
|
||||
-- Initialize with specified control name,
|
||||
do
|
||||
make_value_control ( "input")
|
||||
make_value_control ("input")
|
||||
label := l
|
||||
checked_value := c
|
||||
end
|
||||
@@ -54,9 +54,9 @@ feature --Event handling
|
||||
change_event := e
|
||||
end
|
||||
|
||||
handle_callback (cname: LIST[STRING]; event: STRING; event_parameter: detachable ANY)
|
||||
handle_callback (cname: LIST [STRING]; event: STRING; event_parameter: detachable ANY)
|
||||
do
|
||||
if Current.control_name.same_string (cname[1]) and attached change_event as cevent then
|
||||
if Current.control_name.same_string (cname [1]) and attached change_event as cevent then
|
||||
if event.same_string ("change") then
|
||||
cevent.call (Void)
|
||||
end
|
||||
@@ -81,6 +81,11 @@ feature -- Implementation
|
||||
Result := checked
|
||||
end
|
||||
|
||||
set_value (v: BOOLEAN)
|
||||
do
|
||||
checked := v
|
||||
end
|
||||
|
||||
feature -- Properties
|
||||
|
||||
label: STRING
|
||||
|
||||
@@ -48,4 +48,13 @@ feature -- Implementation
|
||||
end
|
||||
end
|
||||
|
||||
set_value (v: LIST [STRING])
|
||||
do
|
||||
across
|
||||
controls as c
|
||||
loop
|
||||
c.item.set_value (v.has (c.item.checked_value))
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
@@ -146,6 +146,11 @@ feature -- Change
|
||||
end
|
||||
end
|
||||
|
||||
set_value (v: detachable WSF_FILE)
|
||||
do
|
||||
file := v
|
||||
end
|
||||
|
||||
feature -- Properties
|
||||
|
||||
disabled: BOOLEAN
|
||||
|
||||
@@ -110,6 +110,11 @@ feature -- Implementation
|
||||
Result := text
|
||||
end
|
||||
|
||||
set_value (v: STRING)
|
||||
do
|
||||
text := v
|
||||
end
|
||||
|
||||
feature -- Properties
|
||||
|
||||
disabled: BOOLEAN
|
||||
|
||||
Reference in New Issue
Block a user