Fix multi control
Use multi control in example
This commit is contained in:
@@ -21,22 +21,33 @@ create
|
||||
feature
|
||||
|
||||
initialize_controls
|
||||
local
|
||||
panel: WSF_MULTI_CONTROL
|
||||
do
|
||||
button := create {WSF_BUTTON_CONTROL}.make ("sample_button", "I'm a button")
|
||||
button.set_click_event(agent handle_click)
|
||||
control := button
|
||||
button1 := create {WSF_BUTTON_CONTROL}.make ("sample_button1", "I'm a button")
|
||||
button1.set_click_event (agent handle_click)
|
||||
button2 := create {WSF_BUTTON_CONTROL}.make ("sample_button2", "I'm a button2")
|
||||
button2.set_click_event (agent handle_click)
|
||||
create panel.make ("panel")
|
||||
panel.add_control (button1)
|
||||
panel.add_control (button2)
|
||||
control := panel
|
||||
end
|
||||
|
||||
handle_click(context: WSF_PAGE_CONTROL)
|
||||
do
|
||||
if attached {SAMPLE_PAGE} context as sp then
|
||||
sp.button.set_text("Hello World! (Ueeee)")
|
||||
handle_click (context: WSF_PAGE_CONTROL)
|
||||
do
|
||||
if attached {SAMPLE_PAGE} context as sp then
|
||||
sp.button1.set_text ("Hello World! (Ueeee)")
|
||||
sp.button2.set_text ("Hi btn2")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
process
|
||||
do
|
||||
end
|
||||
|
||||
button: WSF_BUTTON_CONTROL
|
||||
button1: WSF_BUTTON_CONTROL
|
||||
|
||||
button2: WSF_BUTTON_CONTROL
|
||||
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user