This component is for selecting one string from a list of several. When a button is pressed a list appears (possibly with a scroll bar) from which one item can be selected.
A SELECTION_CHANGED_EVENT is generated whenever an item is selected from the list.
l := List() l.set_selection_list(["Red", "Green", "Yellow", "Blue", "Orange"]) l.set_size(120) l.set_pos(100, 100) l.set_selection(2) # Green will be the first selection self.add(l)
Class summary |
Methods inherited from gui::DropDown |
close_textlist() finally() get_selection() go_down(e) go_to(x, e) go_up(e) handle_event(e) on_button(ev) on_textlist_selection(ev) open_textlist() set_selection(x) set_selection_list(x) |
Variables inherited from gui::DropDown |
b selection selection_list temp_win tl |
Variables inherited from gui::Component |
accel accepts_focus_flag allow_drag_flag allow_drop_flag attribs cbwin children cwin draw_border_flag h h_spec has_focus is_shaded_flag parent parent_dialog ticker tooltip valid w w_spec x x_align x_spec y y_align y_spec |
Methods inherited from lang::Object |
clone(seen) equals(other, seen) get_class() get_class_name() get_id() hash_code(depth, seen) is_instance(name) to_string(depth, seen) |
Methods inherited from util::Connectable |
connect(obj, meth, type) disconnect(l) fire(type, param) fire_event(e) |
Variables inherited from util::Connectable |
listeners |
Methods defined in this class |
apply_selection() display(buffer_flag) find_accel(e) find_focus() firstly() initially() resize() set_constant_label(x) set_one(attr, val) |
Variables defined in this class |
constant_label l |
Method detail |
Variable detail |