SINGLECLICKSELECT

From Liberty BASIC Family
Jump to navigation Jump to search
Supported in Just BASIC Supported in Liberty BASIC Not supported in Liberty BASIC 5 Not supported in Run BASIC

Description

Causes program flow to branch to an event handler on a single click of a List-box list item, rather than the default double-click.

Syntax

  1. print #handle.ext, "singleclickselect"

Hints

Place useful hints about this keyword here

Example

' Sample program from JB Help file.  Pick a contact status
options$(0) = "Cold Contact Phone Call"
options$(1) = "Send Literature"
options$(2) = "Follow Up Call"
options$(3) = "Send Promotional"
options$(4) = "Final Call"

listbox #status.list, options$(), selectionMade, 5, 35, 250, 90
button #status, "Cancel", [cancelStatusSelection], UR, 15, 5
WindowWidth = 270 : WindowHeight = 180
open "Select a contact status" for window as #status
#status.list "singleclickselect"

wait

sub selectionMade handle$
print #status.list, "selection? selection$"
notice selection$ + " was chosen with listbox ";handle$
end sub

[cancelStatusSelection]
notice "Status selection cancelled"
close #status
end

Useful Procedures

' Place a useful function or sub using this keyword here