4. USER INTERFACE CONTROLS
4.1. ui_button
declare ui_button $
Create a user interface button
Remarks
• A button, i.e. its callback, is triggered when releasing the mouse (mouse-up).
• A button cannot be automated.
Examples
on init
declare ui_button $free_sync_button
$free_sync_button := 1
set_text ($free_sync_button,"Sync")
make_persistent ($free_sync_button)
read_persistent_var($free_sync_button)
if ($free_sync_button = 0)
set_text ($free_sync_button,"Free")
else
set_text ($free_sync_button,"Sync")
end if
end on
on ui_control ($free_sync_button)
if ($free_sync_button = 0)
set_text ($free_sync_button,"Free")
else
set_text ($free_sync_button,"Sync")
end if
end on
A simple free/sync button implementation
Do'stlaringiz bilan baham: |