Class: Wx::ListCtrl
- Includes:
- Enumerable
- Defined in:
- lib/wx/doc/gen/list_ctrl.rb,
lib/wx/doc/list_ctrl.rb
Overview
A list control presents lists in a number of formats: list view, report view, icon view and small icon view.
In any case, elements are numbered from zero. For all these modes, the items are stored in the control and must be added to it using #insert_item method. A special case of report view quite different from the other modes of the list control is a virtual control in which the items data (including text, images and attributes) is managed by the main program and is requested by the control itself only when needed which allows having controls with millions of items without consuming much memory. To use virtual list control you must use #set_item_count first and override at least #on_get_item_text (and optionally #on_get_item_image or #on_get_item_column_image and #on_get_item_attr) to return the information about the items when the control requests it. Virtual list control can be used as a normal one except that no operations which can take time proportional to the number of items in the control happen this is required to allow having a practically infinite number of items. For example, in a multiple selection virtual list control, the selections won’t be sent when many items are selected at once because this could mean iterating over all the items. Using many of ListCtrl features is shown in the corresponding sample. To intercept events from a list control, use the event table macros described in ListEvent.
The native WXOSX implementation for report mode that was added in wxWidgets 2.8 was removed in wxWidgets 3.1, meaning for wxWidgets 3.1+ WXOSX uses the generic implementation for all modes.
Column Ordering
By default, the columns of a list control appear on the screen in order of their indices, i.e. column 0 appears first, then column 1 next, and so on. However this can be changed by using the #set_columns_order function to arbitrarily reorder the columns visual order. The user can also rearrange the columns interactively by dragging them. In this case, the index of the column is not the same as its order and the functions #get_column_order and #get_column_index_from_order should be used to translate between them.
All the other functions still work with the column indices, i.e. the visual positioning of the columns on screen doesn't affect the code setting or getting their values for example.
Example of reordering columns:
list = Wx::ListCtrl.new(...)
3.times { |i| list.insert_column(i, "Column #{i}") }
order = [2, 0, 1]
list.set_columns_order(order)
# now list.get_columns_order() will return order and
# list.get_column_index_from_order(n) will return order[n] and
# list.get_column_order() will return 1, 2 and 0 for the column 0,
# 1 and 2 respectively
Styles
This class supports the following styles:
-
LC_LIST: Multicolumn list view, with optional small icons. Columns are computed automatically, i.e. you don't set columns as in LC_REPORT. In other words, the list wraps, unlike a ListBox.
-
LC_REPORT: Single or multicolumn report view, with optional header.
-
LC_VIRTUAL: The application provides items text on demand. May only be used with LC_REPORT.
-
LC_ICON: Large icon view, with optional labels.
-
LC_SMALL_ICON: Small icon view, with optional labels.
-
LC_ALIGN_TOP: Icons align to the top. Win32 default, Win32 only.
-
LC_ALIGN_LEFT: Icons align to the left.
-
LC_AUTOARRANGE: Icons arrange themselves. Win32 only.
-
LC_EDIT_LABELS: Labels are editable: the application will be notified when editing starts.
-
LC_NO_HEADER: No header in report mode.
-
LC_SINGLE_SEL: Single selection (default is multiple).
-
LC_SORT_ASCENDING: Sort in ascending order. (You must still supply a comparison callback in #sort_items.)
-
LC_SORT_DESCENDING: Sort in descending order. (You must still supply a comparison callback in #sort_items.)
-
LC_HRULES: Draws light horizontal rules between rows in report mode.
-
LC_VRULES: Draws light vertical rules between columns in report mode.
Events emitted by this class
The following event-handler methods redirect the events to member method or handler blocks for ListEvent events. Event handler methods for events emitted by this class:
-
EvtHandler#evt_list_begin_drag(id, meth = nil, &block): Begin dragging with the left mouse button. Processes a EVT_LIST_BEGIN_DRAG event type.
-
EvtHandler#evt_list_begin_rdrag(id, meth = nil, &block): Begin dragging with the right mouse button. Processes a EVT_LIST_BEGIN_RDRAG event type.
-
EvtHandler#evt_list_begin_label_edit(id, meth = nil, &block): Begin editing a label. This can be prevented by calling Veto(). Processes a EVT_LIST_BEGIN_LABEL_EDIT event type.
-
EvtHandler#evt_list_end_label_edit(id, meth = nil, &block): Finish editing a label. This can be prevented by calling Veto(). Processes a EVT_LIST_END_LABEL_EDIT event type.
-
EvtHandler#evt_list_delete_item(id, meth = nil, &block): An item was deleted. Processes a EVT_LIST_DELETE_ITEM event type.
-
EvtHandler#evt_list_delete_all_items(id, meth = nil, &block): All items were deleted. Processes a EVT_LIST_DELETE_ALL_ITEMS event type.
-
EvtHandler#evt_list_item_selected(id, meth = nil, &block): The item has been selected. Notice that the mouse is captured by the control itself when this event is generated, see event handling overview. Processes a EVT_LIST_ITEM_SELECTED event type.
-
EvtHandler#evt_list_item_deselected(id, meth = nil, &block): The item has been deselected. Processes a EVT_LIST_ITEM_DESELECTED event type.
-
EvtHandler#evt_list_item_activated(id, meth = nil, &block): The item has been activated (ENTER or double click). Processes a EVT_LIST_ITEM_ACTIVATED event type.
-
EvtHandler#evt_list_item_focused(id, meth = nil, &block): The currently focused item has changed. Processes a EVT_LIST_ITEM_FOCUSED event type.
-
EvtHandler#evt_list_item_middle_click(id, meth = nil, &block): The middle mouse button has been clicked on an item. This is only supported by the generic control. Processes a EVT_LIST_ITEM_MIDDLE_CLICK event type.
-
EvtHandler#evt_list_item_right_click(id, meth = nil, &block): The right mouse button has been clicked on an item. Processes a EVT_LIST_ITEM_RIGHT_CLICK event type.
-
EvtHandler#evt_list_key_down(id, meth = nil, &block): A key has been pressed. Processes a EVT_LIST_KEY_DOWN event type.
-
EvtHandler#evt_list_insert_item(id, meth = nil, &block): An item has been inserted. Processes a EVT_LIST_INSERT_ITEM event type.
-
EvtHandler#evt_list_col_click(id, meth = nil, &block): A column (m_col) has been left-clicked. Processes a EVT_LIST_COL_CLICK event type.
-
EvtHandler#evt_list_col_right_click(id, meth = nil, &block): A column (m_col) has been right-clicked. Processes a EVT_LIST_COL_RIGHT_CLICK event type.
-
EvtHandler#evt_list_col_begin_drag(id, meth = nil, &block): The user started resizing a column - can be vetoed. Processes a EVT_LIST_COL_BEGIN_DRAG event type.
-
EvtHandler#evt_list_col_dragging(id, meth = nil, &block): The divider between columns is being dragged. Processes a EVT_LIST_COL_DRAGGING event type.
-
EvtHandler#evt_list_col_end_drag(id, meth = nil, &block): A column has been resized by the user. Processes a EVT_LIST_COL_END_DRAG event type.
-
EvtHandler#evt_list_cache_hint(id, meth = nil, &block): Prepare cache for a virtual list control. Processes a EVT_LIST_CACHE_HINT event type.
-
EvtHandler#evt_list_item_checked(id, meth = nil, &block): The item has been checked. Processes a EVT_LIST_ITEM_CHECKED event type (new since wxWidgets 3.1.0).
-
EvtHandler#evt_list_item_unchecked(id, meth = nil, &block): The item has been unchecked. Processes a EVT_LIST_ITEM_UNCHECKED event type (new since wxWidgets 3.1.0).
Under WXMSW this control uses SystemThemedControl for an explorer style appearance by default since wxWidgets 3.1.0. If this is not desired, you can call Wx::SystemThemedControl::EnableSystemTheme with false argument to disable this.
Category: Controls <div class=‘appearance’><span class=‘appearance’>Appearance:</span><table><tr><td> WXMSW Appearance </td><td> WXGTK Appearance </td><td> WXOSX Appearance </td></tr></table></div>
Direct Known Subclasses
Instance Method Summary collapse
-
#append_column(heading, format = Wx::ListColumnFormat::LIST_FORMAT_LEFT, width = -1)) ⇒ Integer
Adds a new column to the list control in report view mode.
-
#arrange(flag = Wx::LIST_ALIGN_DEFAULT) ⇒ Boolean
Arranges the items in icon or small icon view.
-
#check_item(item, check) ⇒ void
Check or uncheck a ListItem in a control using checkboxes.
-
#clear_all ⇒ void
Deletes all items and all columns.
-
#create(parent, id, pos = Wx::DEFAULT_POSITION, size = Wx::DEFAULT_SIZE, style = Wx::LC_ICON, validator = Wx::DEFAULT_VALIDATOR, name = Wx::LIST_CTRL_NAME_STR) ⇒ Boolean
Creates the list control.
-
#delete_all_columns ⇒ Boolean
Delete all columns in the list control.
-
#delete_all_items ⇒ Boolean
Deletes all items in the list control.
-
#delete_column(col) ⇒ Boolean
Deletes a column.
-
#delete_item(item) ⇒ Boolean
Deletes the specified item.
-
#each {|item| ... } ⇒ ::Object
Iterates all items in the list control passing each item (id) to the given block.
-
#each_selected {|item| ... } ⇒ ::Object
Iterates all selected items in the list control (like #get_next_item(item, Wx::LIST_NEXT_ALL, Wx::LIST_STATE_SELECTED)) passing each item (id) to the given block.
-
#enable_alternate_row_colours(enable = true) ⇒ void
Enable alternating row background colours (also called zebra striping).
-
#enable_bell_on_no_match(on = true) ⇒ void
Enable or disable a beep if there is no match for the currently entered text when searching for the item from keyboard.
-
#enable_check_boxes(enable = true) ⇒ Boolean
Enable or disable checkboxes for list items.
-
#end_edit_label(cancel) ⇒ Boolean
Finish editing the label.
-
#ensure_visible(item) ⇒ Boolean
Ensures this item is visible.
-
#extend_rules_and_alternate_colour(extend = true) ⇒ void
Extend rules and alternate rows background to the entire client area.
- #find_item(*args) ⇒ Object
-
#get_alternate_row_colour ⇒ Wx::Colour
(also: #alternate_row_colour)
Get the alternative row background colour.
-
#get_column(col, item) ⇒ Boolean
(also: #column)
Gets information about this column.
-
#get_column_count ⇒ Integer
(also: #column_count)
Returns the number of columns.
-
#get_column_index_from_order(pos) ⇒ Integer
(also: #column_index_from_order)
Gets the column index from its position in visual order.
-
#get_column_order(col) ⇒ Integer
(also: #column_order)
Gets the column visual order position.
-
#get_column_width(col) ⇒ Integer
(also: #column_width)
Gets the column width (report view only).
-
#get_columns_order ⇒ Array<Integer>
(also: #columns_order)
Returns the array containing the orders of all columns.
-
#get_count_per_page ⇒ Integer
(also: #count_per_page)
Gets the number of items that can fit vertically in the visible area of the list control (list or report view) or the total number of items in the list control (icon or small icon view).
-
#get_edit_control ⇒ Wx::TextCtrl
(also: #edit_control)
Returns the edit control being currently used to edit a label.
-
#get_image_list(which) ⇒ Wx::ImageList
(also: #image_list)
Returns the specified image list.
-
#get_item_background_colour(item) ⇒ Wx::Colour
(also: #item_background_colour)
Returns the colour for this item.
-
#get_item_count ⇒ Integer
(also: #item_count)
Returns the number of items in the list control.
-
#get_item_font(item) ⇒ Wx::Font
(also: #item_font)
Returns the item’s font.
-
#get_item_position(item, pos) ⇒ Boolean
(also: #item_position)
Returns the position of the item, in icon or small icon view.
-
#get_item_rect(item, code = Wx::LIST_RECT_BOUNDS) ⇒ Array(Boolean,Wx::Rect)
(also: #item_rect)
Returns the rectangle representing the item’s size and position, in physical coordinates.
-
#get_item_spacing ⇒ Wx::Size
(also: #item_spacing)
Retrieves the spacing between icons in pixels: horizontal spacing is returned as x component of the Size object and the vertical spacing as its y component.
-
#get_item_state(item, stateMask) ⇒ Integer
(also: #item_state)
Gets the item state.
-
#get_item_text(item, col = 0) ⇒ String
(also: #item_text)
Gets the item text for this item.
-
#get_item_text_colour(item) ⇒ Wx::Colour
(also: #item_text_colour)
Returns the colour for this item.
-
#get_next_item(item, geometry = Wx::LIST_NEXT_ALL, state = Wx::LIST_STATE_DONTCARE) ⇒ Integer
(also: #next_item)
Searches for an item with the given geometry or state, starting from item but excluding the item itself.
-
#get_selected_item_count ⇒ Integer
(also: #selected_item_count)
Returns the number of selected items in the list control.
-
#get_selections ⇒ Array<Integer>
Returns array of selected items.
-
#get_sort_indicator ⇒ Integer
(also: #sort_indicator)
Returns the column that shows the sort indicator.
-
#get_sub_item_rect(item, subItem, code = Wx::LIST_RECT_BOUNDS) ⇒ Array(Boolean,Wx::Rect)
(also: #sub_item_rect)
Returns the rectangle representing the size and position, in physical coordinates, of the given subitem, i.e.
-
#get_text_colour ⇒ Wx::Colour
(also: #text_colour)
Gets the text colour of the list control.
-
#get_top_item ⇒ Integer
(also: #top_item)
Gets the index of the topmost visible item when in list or report view.
-
#get_updated_ascending_sort_indicator(col) ⇒ Boolean
(also: #updated_ascending_sort_indicator)
Returns the new value to use for sort indicator after clicking a column.
-
#get_view_rect ⇒ Wx::Rect
(also: #view_rect)
Returns the rectangle taken by all items in the control.
-
#has_check_boxes ⇒ Boolean
(also: #has_check_boxes?)
Returns true if checkboxes are enabled for list items.
-
#hit_test(point) ⇒ Array(Integer,Integer)
Determines which item (if any) is at the specified point, giving details in flags.
-
#in_report_view ⇒ Boolean
Returns true if the control is currently using LC_REPORT style.
-
#initialize(*args) ⇒ ListCtrl
constructor
A new instance of ListCtrl.
- #insert_column(*args) ⇒ Object
- #insert_item(*args) ⇒ Object
-
#is_ascending_sort_indicator ⇒ Boolean
(also: #ascending_sort_indicator?)
Returns true if the sort indicator direction is ascending, false when the direction is descending.
-
#is_empty ⇒ Boolean
(also: #empty?)
Returns true if the control doesn’t currently contain any items.
-
#is_item_checked(item) ⇒ Boolean
(also: #item_checked?)
Return true if the checkbox for the given ListItem is checked.
-
#is_virtual ⇒ Boolean
(also: #virtual?)
Returns true if the control is currently in virtual report view.
-
#is_visible(item) ⇒ Boolean
(also: #visible?)
Check if the item is visible.
-
#on_get_item_attr(item) ⇒ Wx::ItemAttr
protected
This function may be overridden in the derived class for a control with LC_VIRTUAL style.
-
#on_get_item_column_attr(item, column) ⇒ Wx::ItemAttr
protected
This function may be overridden in the derived class for a control with LC_VIRTUAL style.
-
#on_get_item_column_image(item, column) ⇒ Integer
protected
Override this function in the derived class for a control with LC_VIRTUAL and LC_REPORT styles in order to specify the image index for the given line and column.
-
#on_get_item_image(item) ⇒ Integer
protected
This function must be overridden in the derived class for a control with LC_VIRTUAL style using images.
-
#on_get_item_is_checked(item) ⇒ Boolean
protected
This function must be overridden in the derived class for a control with LC_VIRTUAL style that uses checkboxes.
-
#on_get_item_text(item, column) ⇒ String
protected
This function must be overridden in the derived class for a control with LC_VIRTUAL style.
-
#refresh_item(item) ⇒ void
Redraws the given item.
-
#refresh_items(itemFrom, itemTo) ⇒ void
Redraws the items between itemFrom and itemTo.
-
#remove_sort_indicator ⇒ void
Remove the sort indicator from the column being used as sort key.
-
#scroll_list(dx, dy) ⇒ Boolean
Scrolls the list control.
-
#set_alternate_row_colour(colour) ⇒ void
(also: #alternate_row_colour=)
Set the alternative row background colour to a specific colour.
-
#set_background_colour(col) ⇒ Boolean
(also: #background_colour=)
Sets the background colour.
-
#set_column(col, item) ⇒ Boolean
Sets information about this column.
-
#set_column_width(col, width) ⇒ Boolean
Sets the column width.
-
#set_columns_order(orders) ⇒ Boolean
Changes the order in which the columns are shown.
-
#set_header_attr(attr) ⇒ Boolean
(also: #header_attr=)
Change the font and the colours used for the list control header.
-
#set_image_list(imageList, which) ⇒ void
Sets the image list associated with the control.
- #set_item(*args) ⇒ Object (also: #item=)
-
#set_item_background_colour(item, col) ⇒ void
Sets the background colour for this item.
-
#set_item_column_image(item, column, image) ⇒ Boolean
Sets the image associated with the item.
-
#set_item_count(count) ⇒ void
(also: #item_count=)
This method can only be used with virtual list controls.
-
#set_item_font(item, font) ⇒ void
Sets the item’s font.
-
#set_item_image(item, image, selImage = -1)) ⇒ Boolean
Sets the unselected and selected images associated with the item.
-
#set_item_position(item, pos) ⇒ Boolean
Sets the position of the item, in icon or small icon view.
-
#set_item_state(item, state, stateMask) ⇒ Boolean
Sets the item state.
-
#set_item_text(item, text) ⇒ void
Sets the item text for this item.
-
#set_item_text_colour(item, col) ⇒ void
Sets the colour for this item.
-
#set_normal_images(images) ⇒ void
(also: #normal_images=)
Sets the images to use when showing large, normal icons in this control.
-
#set_single_style(style, add = true) ⇒ void
(also: #single_style=)
Adds or removes a single window style.
-
#set_small_images(images) ⇒ void
(also: #small_images=)
Sets the images to use when showing small icons in this control.
-
#set_text_colour(col) ⇒ void
(also: #text_colour=)
Sets the text colour of the list control.
-
#set_window_style_flag(style) ⇒ void
(also: #window_style_flag=)
Sets the whole window style, deleting all items.
-
#show_sort_indicator(col, ascending = true) ⇒ void
Show the sort indicator of a specific column in a specific direction.
-
#sort_items(data = nil) {|item_data1, item_data2, data| ... } ⇒ Object
Call this function to sort the items in the list control.
Methods inherited from Control
#command, ellipsize, escape_mnemonics, #get_label, #get_label_text, #get_size_from_text, #get_size_from_text_size, remove_mnemonics, #set_label, #set_label_markup, #set_label_text
Methods inherited from Window
#accepts_focus, #accepts_focus_from_keyboard, #accepts_focus_recursively, #add_child, #adjust_for_layout_direction, #always_show_scrollbars, #begin_repositioning_children, #cache_best_size, #can_accept_focus, #can_accept_focus_from_keyboard, #can_scroll, #can_set_transparent, #capture_mouse, #center, #center_on_parent, #centre, #centre_on_parent, #clear_background, #client_to_screen, #client_to_window_size, #close, #convert_dialog_to_pixels, #convert_pixels_to_dialog, #destroy, #destroy_children, #disable, #disable_focus_from_keyboard, #do_update_window_ui, #drag_accept_files, #each_child, #enable, #enable_touch_events, #enable_visible_focus, #end_repositioning_children, find_focus, #find_window_by_id, find_window_by_id, #find_window_by_label, find_window_by_label, #find_window_by_name, find_window_by_name, #fit, #fit_inside, #freeze, #from_dip, from_dip, #from_phys, from_phys, #get_accelerator_table, #get_auto_layout, #get_background_colour, #get_background_style, #get_best_height, #get_best_size, #get_best_virtual_size, #get_best_width, #get_border, get_capture, #get_caret, #get_char_height, #get_char_width, #get_children, get_class_default_attributes, #get_client_area_origin, #get_client_rect, #get_client_size, #get_containing_sizer, #get_content_scale_factor, #get_cursor, #get_default_attributes, #get_dpi, #get_dpi_scale_factor, #get_drop_target, #get_effective_min_size, #get_event_handler, #get_extra_style, #get_font, #get_foreground_colour, #get_grand_parent, #get_help_text, #get_help_text_at_point, #get_id, #get_label, #get_layout_direction, #get_max_client_size, #get_max_height, #get_max_size, #get_max_width, #get_min_client_size, #get_min_height, #get_min_size, #get_min_width, #get_name, #get_next_sibling, #get_parent, #get_popup_menu_selection_from_user, #get_position, #get_prev_sibling, #get_rect, #get_screen_position, #get_screen_rect, #get_scroll_pos, #get_scroll_range, #get_scroll_thumb, #get_size, #get_sizer, #get_text_extent, #get_theme_enabled, #get_tool_tip, #get_tool_tip_text, #get_update_client_rect, #get_update_region, #get_validator, #get_virtual_size, #get_window_border_size, #get_window_style, #get_window_style_flag, #get_window_variant, #handle_as_navigation_key, #handle_window_event, #has_capture, #has_extra_style, #has_flag, #has_focus, #has_multiple_pages, #has_scrollbar, #has_transparent_background, #hide, #hide_with_effect, #inform_first_direction, #inherit_attributes, #inherits_background_colour, #inherits_foreground_colour, #init_dialog, #invalidate_best_size, #is_being_deleted, #is_descendant, #is_double_buffered, #is_enabled, #is_exposed, #is_focusable, #is_frozen, #is_retained, #is_scrollbar_always_shown, #is_shown, #is_shown_on_screen, #is_this_enabled, #is_top_level, #is_transparent_background_supported, #layout, #line_down, #line_up, #locked, #lower_window, #move, #move_after_in_tab_order, #move_before_in_tab_order, #navigate, #navigate_in, new_control_id, #on_internal_idle, #page_down, #page_up, #paint, #paint_buffered, #popup_menu, #post_size_event, #post_size_event_to_parent, #process_window_event, #process_window_event_locally, #push_event_handler, #raise_window, #refresh, #refresh_rect, #register_hot_key, #release_mouse, #remove_child, #remove_event_handler, #reparent, #screen_to_client, #scroll_lines, #scroll_pages, #scroll_window, #send_size_event, #send_size_event_to_parent, #set_accelerator_table, #set_auto_layout, #set_background_style, #set_can_focus, #set_caret, #set_client_size, #set_containing_sizer, #set_cursor, #set_double_buffered, #set_drop_target, #set_event_handler, #set_extra_style, #set_focus, #set_focus_from_kbd, #set_font, #set_foreground_colour, #set_help_text, #set_id, #set_initial_size, #set_label, #set_layout_direction, #set_max_client_size, #set_max_size, #set_min_client_size, #set_min_size, #set_name, #set_next_handler, #set_own_background_colour, #set_own_font, #set_own_foreground_colour, #set_position, #set_previous_handler, #set_scroll_pos, #set_scrollbar, #set_size, #set_size_hints, #set_sizer, #set_sizer_and_fit, #set_theme_enabled, #set_tool_tip, #set_transparent, #set_validator, #set_virtual_size, #set_window_style, #set_window_variant, #should_inherit_colours, #show, #show_with_effect, #switch_sizer, #thaw, #to_dip, to_dip, #to_phys, to_phys, #toggle_window_style, #transfer_data_from_window, #transfer_data_to_window, #unregister_hot_key, unreserve_control_id, #unset_tool_tip, #update, #update_window_ui, #use_background_colour, #use_bg_col, #use_foreground_colour, #validate, #warp_pointer, #window_to_client_size
Methods inherited from EvtHandler
add_filter, #add_pending_event, #call_after, clear_filters, #connect, #delete_pending_events, #disconnect, #evt_activate, #evt_activate_app, #evt_aui_pane_activated, #evt_aui_pane_button, #evt_aui_pane_close, #evt_aui_pane_maximize, #evt_aui_pane_restore, #evt_aui_render, #evt_auinotebook_allow_dnd, #evt_auinotebook_begin_drag, #evt_auinotebook_bg_dclick, #evt_auinotebook_button, #evt_auinotebook_drag_done, #evt_auinotebook_drag_motion, #evt_auinotebook_end_drag, #evt_auinotebook_page_changed, #evt_auinotebook_page_changing, #evt_auinotebook_page_close, #evt_auinotebook_page_closed, #evt_auinotebook_tab_middle_down, #evt_auinotebook_tab_middle_up, #evt_auinotebook_tab_right_down, #evt_auinotebook_tab_right_up, #evt_auitoolbar_begin_drag, #evt_auitoolbar_middle_click, #evt_auitoolbar_overflow_click, #evt_auitoolbar_right_click, #evt_auitoolbar_tool_dropdown, #evt_button, #evt_calculate_layout, #evt_calendar, #evt_calendar_page_changed, #evt_calendar_sel_changed, #evt_calendar_week_clicked, #evt_calendar_weekday_clicked, #evt_char, #evt_char_hook, #evt_checkbox, #evt_checklistbox, #evt_child_focus, #evt_choice, #evt_choicebook_page_changed, #evt_choicebook_page_changing, #evt_close, #evt_collapsiblepane_changed, #evt_colourpicker_changed, #evt_colourpicker_current_changed, #evt_colourpicker_dialog_cancelled, #evt_combobox, #evt_combobox_closeup, #evt_combobox_dropdown, #evt_command, #evt_command_enter, #evt_command_kill_focus, #evt_command_left_click, #evt_command_left_dclick, #evt_command_range, #evt_command_right_click, #evt_command_scroll, #evt_command_scroll_bottom, #evt_command_scroll_changed, #evt_command_scroll_linedown, #evt_command_scroll_lineup, #evt_command_scroll_pagedown, #evt_command_scroll_pageup, #evt_command_scroll_thumbrelease, #evt_command_scroll_thumbtrack, #evt_command_scroll_top, #evt_command_set_focus, #evt_context_menu, #evt_date_changed, #evt_dialup_connected, #evt_dialup_disconnected, #evt_dirctrl_fileactivated, #evt_dirctrl_selectionchanged, #evt_dirpicker_changed, #evt_display_changed, #evt_dpi_changed, #evt_drop_files, #evt_end_session, #evt_enter_window, #evt_erase_background, #evt_filectrl_fileactivated, #evt_filectrl_filterchanged, #evt_filectrl_folderchanged, #evt_filectrl_selectionchanged, #evt_filepicker_changed, #evt_find, #evt_find_close, #evt_find_next, #evt_find_replace, #evt_find_replace_all, #evt_fontpicker_changed, #evt_fullscreen, #evt_gesture_pan, #evt_gesture_rotate, #evt_gesture_zoom, #evt_grid_cell_changed, #evt_grid_cell_changing, #evt_grid_cell_left_click, #evt_grid_cell_left_dclick, #evt_grid_cell_right_click, #evt_grid_cell_right_dclick, #evt_grid_cmd_col_size, #evt_grid_cmd_editor_created, #evt_grid_cmd_range_selected, #evt_grid_cmd_range_selecting, #evt_grid_cmd_row_size, #evt_grid_col_auto_size, #evt_grid_col_move, #evt_grid_col_size, #evt_grid_col_sort, #evt_grid_editor_created, #evt_grid_editor_hidden, #evt_grid_editor_shown, #evt_grid_label_left_click, #evt_grid_label_left_dclick, #evt_grid_label_right_click, #evt_grid_label_right_dclick, #evt_grid_range_selected, #evt_grid_range_selecting, #evt_grid_row_auto_size, #evt_grid_row_move, #evt_grid_row_size, #evt_grid_select_cell, #evt_grid_tabbing, #evt_header_begin_reorder, #evt_header_begin_resize, #evt_header_click, #evt_header_dclick, #evt_header_dragging_cancelled, #evt_header_end_reorder, #evt_header_end_resize, #evt_header_middle_click, #evt_header_middle_dclick, #evt_header_resizing, #evt_header_right_click, #evt_header_right_dclick, #evt_header_separator_dclick, #evt_help, #evt_help_range, #evt_hibernate, #evt_hotkey, #evt_html_cell_clicked, #evt_html_cell_hover, #evt_html_link_clicked, #evt_hyperlink, #evt_iconize, #evt_idle, #evt_init_dialog, #evt_joy_button_down, #evt_joy_button_up, #evt_joy_move, #evt_joy_zmove, #evt_joystick_events, #evt_key_down, #evt_key_up, #evt_kill_focus, #evt_leave_window, #evt_left_dclick, #evt_left_down, #evt_left_up, #evt_list_begin_drag, #evt_list_begin_label_edit, #evt_list_begin_rdrag, #evt_list_cache_hint, #evt_list_col_begin_drag, #evt_list_col_click, #evt_list_col_dragging, #evt_list_col_end_drag, #evt_list_col_right_click, #evt_list_delete_all_items, #evt_list_delete_item, #evt_list_end_label_edit, #evt_list_insert_item, #evt_list_item_activated, #evt_list_item_checked, #evt_list_item_deselected, #evt_list_item_focused, #evt_list_item_middle_click, #evt_list_item_right_click, #evt_list_item_selected, #evt_list_item_unchecked, #evt_list_key_down, #evt_listbook_page_changed, #evt_listbook_page_changing, #evt_listbox, #evt_listbox_dclick, #evt_long_press, #evt_magnify, #evt_maximize, #evt_media_finished, #evt_media_loaded, #evt_media_pause, #evt_media_play, #evt_media_statechanged, #evt_media_stop, #evt_menu, #evt_menu_close, #evt_menu_highlight, #evt_menu_highlight_all, #evt_menu_open, #evt_menu_range, #evt_middle_dclick, #evt_middle_down, #evt_middle_up, #evt_motion, #evt_mouse_aux1_dclick, #evt_mouse_aux1_down, #evt_mouse_aux1_up, #evt_mouse_aux2_dclick, #evt_mouse_aux2_down, #evt_mouse_aux2_up, #evt_mouse_capture_changed, #evt_mouse_capture_lost, #evt_mouse_events, #evt_mousewheel, #evt_move, #evt_move_end, #evt_move_start, #evt_moving, #evt_navigation_key, #evt_notebook_page_changed, #evt_notebook_page_changing, #evt_paint, #evt_pg_changed, #evt_pg_changing, #evt_pg_col_begin_drag, #evt_pg_col_dragging, #evt_pg_col_end_drag, #evt_pg_double_click, #evt_pg_highlighted, #evt_pg_item_collapsed, #evt_pg_item_expanded, #evt_pg_label_edit_begin, #evt_pg_label_edit_ending, #evt_pg_page_changed, #evt_pg_right_click, #evt_pg_selected, #evt_press_and_tap, #evt_query_end_session, #evt_query_layout_info, #evt_radiobox, #evt_radiobutton, #evt_ribbonbar_help_click, #evt_ribbonbar_page_changed, #evt_ribbonbar_page_changing, #evt_ribbonbar_tab_left_dclick, #evt_ribbonbar_tab_middle_down, #evt_ribbonbar_tab_middle_up, #evt_ribbonbar_tab_right_down, #evt_ribbonbar_tab_right_up, #evt_ribbonbar_toggled, #evt_ribbonbuttonbar_clicked, #evt_ribbonbuttonbar_dropdown_clicked, #evt_ribbongallery_clicked, #evt_ribbongallery_hover_changed, #evt_ribbongallery_selected, #evt_ribbonpanel_extbutton_activated, #evt_ribbontoolbar_clicked, #evt_ribbontoolbar_dropdown_clicked, #evt_richtext_buffer_reset, #evt_richtext_character, #evt_richtext_consuming_character, #evt_richtext_content_deleted, #evt_richtext_content_inserted, #evt_richtext_delete, #evt_richtext_focus_object_changed, #evt_richtext_left_click, #evt_richtext_left_dclick, #evt_richtext_middle_click, #evt_richtext_properties_changed, #evt_richtext_return, #evt_richtext_right_click, #evt_richtext_selection_changed, #evt_richtext_style_changed, #evt_richtext_stylesheet_changed, #evt_richtext_stylesheet_replaced, #evt_richtext_stylesheet_replacing, #evt_right_dclick, #evt_right_down, #evt_right_up, #evt_sash_dragged, #evt_sash_dragged_range, #evt_scroll, #evt_scroll_bottom, #evt_scroll_changed, #evt_scroll_command, #evt_scroll_linedown, #evt_scroll_lineup, #evt_scroll_pagedown, #evt_scroll_pageup, #evt_scroll_thumbrelease, #evt_scroll_thumbtrack, #evt_scroll_top, #evt_scrollbar, #evt_scrollwin, #evt_scrollwin_bottom, #evt_scrollwin_linedown, #evt_scrollwin_lineup, #evt_scrollwin_pagedown, #evt_scrollwin_pageup, #evt_scrollwin_thumbrelease, #evt_scrollwin_thumbtrack, #evt_scrollwin_top, #evt_search, #evt_search_cancel, #evt_set_cursor, #evt_set_focus, #evt_show, #evt_size, #evt_slider, #evt_spin, #evt_spin_down, #evt_spin_up, #evt_spinctrl, #evt_spinctrldouble, #evt_splitter_dclick, #evt_splitter_sash_pos_changed, #evt_splitter_sash_pos_changing, #evt_splitter_sash_pos_resize, #evt_splitter_unsplit, #evt_stc_autocomp_cancelled, #evt_stc_autocomp_char_deleted, #evt_stc_autocomp_completed, #evt_stc_autocomp_selection, #evt_stc_autocomp_selection_change, #evt_stc_calltip_click, #evt_stc_change, #evt_stc_charadded, #evt_stc_clipboard_copy, #evt_stc_clipboard_paste, #evt_stc_do_drop, #evt_stc_doubleclick, #evt_stc_drag_over, #evt_stc_dwellend, #evt_stc_dwellstart, #evt_stc_hotspot_click, #evt_stc_hotspot_dclick, #evt_stc_hotspot_release_click, #evt_stc_indicator_click, #evt_stc_indicator_release, #evt_stc_macrorecord, #evt_stc_margin_right_click, #evt_stc_marginclick, #evt_stc_modified, #evt_stc_needshown, #evt_stc_painted, #evt_stc_romodifyattempt, #evt_stc_savepointleft, #evt_stc_savepointreached, #evt_stc_start_drag, #evt_stc_styleneeded, #evt_stc_updateui, #evt_stc_userlistselection, #evt_stc_zoom, #evt_sys_colour_changed, #evt_taskbar_click, #evt_taskbar_left_dclick, #evt_taskbar_left_down, #evt_taskbar_left_up, #evt_taskbar_move, #evt_taskbar_right_dclick, #evt_taskbar_right_down, #evt_taskbar_right_up, #evt_text, #evt_text_copy, #evt_text_cut, #evt_text_enter, #evt_text_maxlen, #evt_text_paste, #evt_text_url, #evt_time_changed, #evt_timer, #evt_togglebutton, #evt_tool, #evt_tool_dropdown, #evt_tool_enter, #evt_tool_range, #evt_tool_rclicked, #evt_tool_rclicked_range, #evt_toolbook_page_changed, #evt_toolbook_page_changing, #evt_tree_begin_drag, #evt_tree_begin_label_edit, #evt_tree_begin_rdrag, #evt_tree_delete_item, #evt_tree_end_drag, #evt_tree_end_label_edit, #evt_tree_get_info, #evt_tree_item_activated, #evt_tree_item_collapsed, #evt_tree_item_collapsing, #evt_tree_item_expanded, #evt_tree_item_expanding, #evt_tree_item_gettooltip, #evt_tree_item_menu, #evt_tree_item_middle_click, #evt_tree_item_right_click, #evt_tree_key_down, #evt_tree_sel_changed, #evt_tree_sel_changing, #evt_tree_set_info, #evt_tree_state_image_click, #evt_treebook_node_collapsed, #evt_treebook_node_expanded, #evt_treebook_page_changed, #evt_treebook_page_changing, #evt_two_finger_tap, #evt_update_ui, #evt_update_ui_range, #evt_window_create, #evt_window_destroy, #evt_wizard_before_page_changed, #evt_wizard_cancel, #evt_wizard_finished, #evt_wizard_help, #evt_wizard_page_changed, #evt_wizard_page_changing, #evt_wizard_page_shown, #get_client_object, #get_evt_handler_enabled, #get_next_handler, #get_previous_handler, #is_unlinked, #process_event, #process_event_locally, #process_pending_events, #queue_event, register_class, remove_filter, #safely_process_event, #set_client_object, #set_evt_handler_enabled, #set_next_handler, #set_previous_handler, #try_after, #try_before, #unlink
Methods inherited from Object
#clone, #dup, #is_same_as, #un_share
Constructor Details
#initialize ⇒ Wx::ListCtrl #initialize(parent, id, pos = Wx::DEFAULT_POSITION, size = Wx::DEFAULT_SIZE, style = Wx::LC_ICON, validator = Wx::DEFAULT_VALIDATOR, name = Wx::LIST_CTRL_NAME_STR) ⇒ Wx::ListCtrl
Returns a new instance of ListCtrl.
479 |
# File 'lib/wx/doc/gen/list_ctrl.rb', line 479 def initialize(*args) end |
Instance Method Details
#append_column(heading, format = Wx::ListColumnFormat::LIST_FORMAT_LEFT, width = -1)) ⇒ Integer
Adds a new column to the list control in report view mode.
This is just a convenient wrapper for #insert_column which adds the new column after all the existing ones without having to specify its position explicitly.
488 |
# File 'lib/wx/doc/gen/list_ctrl.rb', line 488 def append_column(heading, format=Wx::ListColumnFormat::LIST_FORMAT_LEFT, width=-1) end |
#arrange(flag = Wx::LIST_ALIGN_DEFAULT) ⇒ Boolean
Arranges the items in icon or small icon view.
This only has effect on Win32. flag is one of:
-
Wx::LIST_ALIGN_DEFAULT: Default alignment.
-
Wx::LIST_ALIGN_LEFT: Align to the left side of the control.
-
Wx::LIST_ALIGN_TOP: Align to the top side of the control.
-
Wx::LIST_ALIGN_SNAP_TO_GRID: Snap to grid.
500 |
# File 'lib/wx/doc/gen/list_ctrl.rb', line 500 def arrange(flag=Wx::LIST_ALIGN_DEFAULT) end |
#check_item(item, check) ⇒ void
This method returns an undefined value.
Check or uncheck a Wx::ListItem in a control using checkboxes.
This method only works if checkboxes support had been successfully enabled using #enable_check_boxes. For a control with Wx::LC_VIRTUAL style, this will only generate the EVT_LIST_ITEM_CHECKED and EVT_LIST_ITEM_UNCHECKED events. See #on_get_item_is_checked for information on how to update the checkbox state.
1236 |
# File 'lib/wx/doc/gen/list_ctrl.rb', line 1236 def check_item(item, check) end |
#clear_all ⇒ void
This method returns an undefined value.
Deletes all items and all columns.
This sends an event of type EVT_LIST_DELETE_ALL_ITEMS under all platforms.
510 |
# File 'lib/wx/doc/gen/list_ctrl.rb', line 510 def clear_all; end |
#create(parent, id, pos = Wx::DEFAULT_POSITION, size = Wx::DEFAULT_SIZE, style = Wx::LC_ICON, validator = Wx::DEFAULT_VALIDATOR, name = Wx::LIST_CTRL_NAME_STR) ⇒ Boolean
Creates the list control.
See list_ctrl for further details.
523 |
# File 'lib/wx/doc/gen/list_ctrl.rb', line 523 def create(parent, id, pos=Wx::DEFAULT_POSITION, size=Wx::DEFAULT_SIZE, style=Wx::LC_ICON, validator=Wx::DEFAULT_VALIDATOR, name=Wx::LIST_CTRL_NAME_STR) end |
#delete_all_columns ⇒ Boolean
Delete all columns in the list control.
true if all columns were successfully deleted, false otherwise.
529 |
# File 'lib/wx/doc/gen/list_ctrl.rb', line 529 def delete_all_columns; end |
#delete_all_items ⇒ Boolean
Deletes all items in the list control.
This function does not send the EVT_LIST_DELETE_ITEM event because deleting many items from the control would be too slow then (unlike #delete_item) but it does send the special EVT_LIST_DELETE_ALL_ITEMS event if the control was not empty. If it was already empty, nothing is done and no event is sent. true if the items were successfully deleted or if the control was already empty, false if an error occurred while deleting the items.
536 |
# File 'lib/wx/doc/gen/list_ctrl.rb', line 536 def delete_all_items; end |
#delete_column(col) ⇒ Boolean
Deletes a column.
541 |
# File 'lib/wx/doc/gen/list_ctrl.rb', line 541 def delete_column(col) end |
#delete_item(item) ⇒ Boolean
Deletes the specified item.
This function sends the EVT_LIST_DELETE_ITEM event for the item being deleted.
549 |
# File 'lib/wx/doc/gen/list_ctrl.rb', line 549 def delete_item(item) end |
#each {|item| ... } ⇒ ::Object
Iterates all items in the list control passing each item (id) to the given block.
17 |
# File 'lib/wx/doc/list_ctrl.rb', line 17 def each(&block) end |
#each_selected {|item| ... } ⇒ ::Object
Iterates all selected items in the list control (like #get_next_item(item, Wx::LIST_NEXT_ALL, Wx::LIST_STATE_SELECTED)) passing each item (id) to the given block.
23 |
# File 'lib/wx/doc/list_ctrl.rb', line 23 def each_selected(&block) end |
#enable_alternate_row_colours(enable = true) ⇒ void
This method returns an undefined value.
Enable alternating row background colours (also called zebra striping).
This method can only be called for the control in virtual report mode, i.e. having Wx::LC_REPORT and Wx::LC_VIRTUAL styles. When enabling alternating colours, the appropriate colour for the even rows is chosen automatically depending on the default foreground and background colours which are used for the odd rows.
558 |
# File 'lib/wx/doc/gen/list_ctrl.rb', line 558 def enable_alternate_row_colours(enable=true) end |
#enable_bell_on_no_match(on = true) ⇒ void
This method returns an undefined value.
Enable or disable a beep if there is no match for the currently entered text when searching for the item from keyboard.
The default is to not beep in this case except in WXMSW where the beep is always generated by the native control and cannot be disabled, i.e. calls to this function do nothing there.
565 |
# File 'lib/wx/doc/gen/list_ctrl.rb', line 565 def enable_bell_on_no_match(on=true) end |
#enable_check_boxes(enable = true) ⇒ Boolean
Enable or disable checkboxes for list items.
true if checkboxes are supported, false otherwise.
In a list control with Wx::LC_VIRTUAL style you have to keep track of the checkbox state. When a checkbox is clicked (EVT_LIST_ITEM_CHECKED or EVT_LIST_ITEM_UNCHECKED) you have to update the state and refresh the item yourself.
1218 |
# File 'lib/wx/doc/gen/list_ctrl.rb', line 1218 def enable_check_boxes(enable=true) end |
#end_edit_label(cancel) ⇒ Boolean
Finish editing the label.
This method allows one to programmatically end editing a list control item in place. Usually it will only be called when editing is in progress, i.e. if #get_edit_control returns non-NULL. In particular, do not call it from EVT_LIST_BEGIN_LABEL_EDIT handler as the edit control is not yet fully created by then, just veto the event in this handler instead to prevent the editing from even starting. Notice that calling this method will result in EVT_LIST_END_LABEL_EDIT event being generated. Currently only implemented in WXMSW.
true if item editing was finished or false if no item as being edited.
576 |
# File 'lib/wx/doc/gen/list_ctrl.rb', line 576 def end_edit_label(cancel) end |
#ensure_visible(item) ⇒ Boolean
Ensures this item is visible.
581 |
# File 'lib/wx/doc/gen/list_ctrl.rb', line 581 def ensure_visible(item) end |
#extend_rules_and_alternate_colour(extend = true) ⇒ void
This method returns an undefined value.
Extend rules and alternate rows background to the entire client area.
By default, the rules (when enabled with Wx::LC_HRULES and Wx::LC_VRULES) and alternate row background (when #enable_alternate_row_colours was called) are only shown in the part of the control occupied by the items, which can be smaller than the entire window if there are few items in the control. Calling this function extends the display of the rules and alternate background rows to the entire client area. Similarly to #enable_alternate_row_colours, this method can only be used with controls having Wx::LC_REPORT and Wx::LC_VIRTUAL styles. Note that this method is currently not implemented in the native MSW version and does nothing there.
1246 |
# File 'lib/wx/doc/gen/list_ctrl.rb', line 1246 def extend_rules_and_alternate_colour(extend=true) end |
#find_item(start, str, partial = false) ⇒ Integer #find_item(start, data) ⇒ Integer #find_item(start, pt, direction) ⇒ Integer
608 |
# File 'lib/wx/doc/gen/list_ctrl.rb', line 608 def find_item(*args) end |
#get_alternate_row_colour ⇒ Wx::Colour Also known as: alternate_row_colour
Get the alternative row background colour.
871 |
# File 'lib/wx/doc/gen/list_ctrl.rb', line 871 def get_alternate_row_colour; end |
#get_column(col, item) ⇒ Boolean Also known as: column
Gets information about this column.
See #set_item for more information.
616 |
# File 'lib/wx/doc/gen/list_ctrl.rb', line 616 def get_column(col, item) end |
#get_column_count ⇒ Integer Also known as: column_count
Returns the number of columns.
The control can have multiple columns only in Wx::LC_REPORT mode. In Wx::LC_LIST mode this function returns 1, as a list is still considered to have a (single) column. In Wx::LC_SMALL_ICON and Wx::LC_ICON modes, it returns 0 as there are no columns at all.
623 |
# File 'lib/wx/doc/gen/list_ctrl.rb', line 623 def get_column_count; end |
#get_column_index_from_order(pos) ⇒ Integer Also known as: column_index_from_order
Gets the column index from its position in visual order.
After calling #set_columns_order, the index returned by this function corresponds to the value of the element number pos in the array returned by #get_columns_order.
This function makes sense for report view only and currently is only implemented in the WXMSW port. Use HAS_LISTCTRL_COLUMN_ORDER to guard uses of this function so that they will start working under the other platforms when support for the column reordering is added there.
639 |
# File 'lib/wx/doc/gen/list_ctrl.rb', line 639 def get_column_index_from_order(pos) end |
#get_column_order(col) ⇒ Integer Also known as: column_order
Gets the column visual order position.
This function returns the index of the column which appears at the given visual position, e.g. calling it with col equal to 0 returns the index of the first shown column.
This function makes sense for report view only and currently is only implemented in the WXMSW port. Use HAS_LISTCTRL_COLUMN_ORDER to guard uses of this function so that they will start working under the other platforms when support for the column reordering is added there.
656 |
# File 'lib/wx/doc/gen/list_ctrl.rb', line 656 def get_column_order(col) end |
#get_column_width(col) ⇒ Integer Also known as: column_width
Gets the column width (report view only).
662 |
# File 'lib/wx/doc/gen/list_ctrl.rb', line 662 def get_column_width(col) end |
#get_columns_order ⇒ Array<Integer> Also known as: columns_order
Returns the array containing the orders of all columns.
On error, an empty array is returned.
This function makes sense for report view only and currently is only implemented in the WXMSW port. Use HAS_LISTCTRL_COLUMN_ORDER to guard uses of this function so that they will start working under the other platforms when support for the column reordering is added there.
678 |
# File 'lib/wx/doc/gen/list_ctrl.rb', line 678 def get_columns_order; end |
#get_count_per_page ⇒ Integer Also known as: count_per_page
Gets the number of items that can fit vertically in the visible area of the list control (list or report view) or the total number of items in the list control (icon or small icon view).
683 |
# File 'lib/wx/doc/gen/list_ctrl.rb', line 683 def get_count_per_page; end |
#get_edit_control ⇒ Wx::TextCtrl Also known as: edit_control
Returns the edit control being currently used to edit a label.
Returns NULL if no label is being edited.
It is currently only implemented for WXMSW and the generic version, not for the native macOS version.
696 |
# File 'lib/wx/doc/gen/list_ctrl.rb', line 696 def get_edit_control; end |
#get_image_list(which) ⇒ Wx::ImageList Also known as: image_list
Returns the specified image list.
which may be one of:
-
IMAGE_LIST_NORMAL: The normal (large icon) image list.
-
IMAGE_LIST_SMALL: The small icon image list.
-
IMAGE_LIST_STATE: The user-defined state image list (unimplemented).
708 |
# File 'lib/wx/doc/gen/list_ctrl.rb', line 708 def get_image_list(which) end |
#get_item_background_colour(item) ⇒ Wx::Colour Also known as: item_background_colour
Returns the colour for this item.
If the item has no specific colour, returns an invalid colour (and not the default background colour of the control itself).
717 |
# File 'lib/wx/doc/gen/list_ctrl.rb', line 717 def get_item_background_colour(item) end |
#get_item_count ⇒ Integer Also known as: item_count
Returns the number of items in the list control.
722 |
# File 'lib/wx/doc/gen/list_ctrl.rb', line 722 def get_item_count; end |
#get_item_font(item) ⇒ Wx::Font Also known as: item_font
Returns the item’s font.
728 |
# File 'lib/wx/doc/gen/list_ctrl.rb', line 728 def get_item_font(item) end |
#get_item_position(item, pos) ⇒ Boolean Also known as: item_position
Returns the position of the item, in icon or small icon view.
735 |
# File 'lib/wx/doc/gen/list_ctrl.rb', line 735 def get_item_position(item, pos) end |
#get_item_rect(item, code = Wx::LIST_RECT_BOUNDS) ⇒ Array(Boolean,Wx::Rect) Also known as: item_rect
Returns the rectangle representing the item’s size and position, in physical coordinates.
code is one of Wx::LIST_RECT_BOUNDS, Wx::LIST_RECT_ICON, Wx::LIST_RECT_LABEL.
744 |
# File 'lib/wx/doc/gen/list_ctrl.rb', line 744 def get_item_rect(item, code=Wx::LIST_RECT_BOUNDS) end |
#get_item_spacing ⇒ Wx::Size Also known as: item_spacing
Retrieves the spacing between icons in pixels: horizontal spacing is returned as x component of the Size object and the vertical spacing as its y component.
749 |
# File 'lib/wx/doc/gen/list_ctrl.rb', line 749 def get_item_spacing; end |
#get_item_state(item, stateMask) ⇒ Integer Also known as: item_state
Gets the item state.
For a list of state flags, see #set_item. The stateMask indicates which state flags are of interest.
758 |
# File 'lib/wx/doc/gen/list_ctrl.rb', line 758 def get_item_state(item, stateMask) end |
#get_item_text(item, col = 0) ⇒ String Also known as: item_text
Gets the item text for this item.
765 |
# File 'lib/wx/doc/gen/list_ctrl.rb', line 765 def get_item_text(item, col=0) end |
#get_item_text_colour(item) ⇒ Wx::Colour Also known as: item_text_colour
Returns the colour for this item.
If the item has no specific colour, returns an invalid colour (and not the default foreground colour of the control itself as this wouldn’t allow distinguishing between items having the same colour as the current control foreground and items with default colour which, hence, have always the same colour as the control).
773 |
# File 'lib/wx/doc/gen/list_ctrl.rb', line 773 def get_item_text_colour(item) end |
#get_next_item(item, geometry = Wx::LIST_NEXT_ALL, state = Wx::LIST_STATE_DONTCARE) ⇒ Integer Also known as: next_item
Searches for an item with the given geometry or state, starting from item but excluding the item itself.
If item is -1, the first item that matches the specified flags will be returned. Returns the first item with given state following item or -1 if no such item found. This function may be used to find all selected items in the control like this:
item = -1
while (item = list_ctrl.get_next_item(item, Wx::LIST_NEXT_ALL, Wx::LIST_STATE_SELECTED)) != -1
# item is selected - do whatever is needed with it
Wx.("Item #{item} is selected.")
end
# alternatively in wxRuby you could do
list_ctrl.each_selected do |item|
Wx.("Item #{item} is selected.")
end
geometry can be one of:
-
Wx::LIST_NEXT_ABOVE: Searches for an item above the specified item.
-
Wx::LIST_NEXT_ALL: Searches for subsequent item by index.
-
Wx::LIST_NEXT_BELOW: Searches for an item below the specified item.
-
Wx::LIST_NEXT_LEFT: Searches for an item to the left of the specified item.
-
Wx::LIST_NEXT_RIGHT: Searches for an item to the right of the specified item.
this parameter is only supported by WXMSW currently and ignored on other platforms.
state can be a bitlist of the following:
-
Wx::LIST_STATE_DONTCARE: Don’t care what the state is.
-
Wx::LIST_STATE_DROPHILITED: The item indicates it is a drop target.
-
Wx::LIST_STATE_FOCUSED: The item has the focus.
-
Wx::LIST_STATE_SELECTED: The item is selected.
-
Wx::LIST_STATE_CUT: The item is selected as part of a cut and paste operation.
818 |
# File 'lib/wx/doc/gen/list_ctrl.rb', line 818 def get_next_item(item, geometry=Wx::LIST_NEXT_ALL, state=Wx::LIST_STATE_DONTCARE) end |
#get_selected_item_count ⇒ Integer Also known as: selected_item_count
Returns the number of selected items in the list control.
823 |
# File 'lib/wx/doc/gen/list_ctrl.rb', line 823 def get_selected_item_count; end |
#get_selections ⇒ Array<Integer>
Returns array of selected items.
27 |
# File 'lib/wx/doc/list_ctrl.rb', line 27 def get_selections; end |
#get_sort_indicator ⇒ Integer Also known as: sort_indicator
Returns the column that shows the sort indicator.
Can return -1
if there is no sort indicator currently shown.
1271 |
# File 'lib/wx/doc/gen/list_ctrl.rb', line 1271 def get_sort_indicator; end |
#get_sub_item_rect(item, subItem, code = Wx::LIST_RECT_BOUNDS) ⇒ Array(Boolean,Wx::Rect) Also known as: sub_item_rect
Returns the rectangle representing the size and position, in physical coordinates, of the given subitem, i.e.
the part of the row item in the column subItem. This method is only meaningful when the Wx::ListCtrl is in the report mode. If subItem parameter is equal to the special value Wx::LIST_GETSUBITEMRECT_WHOLEITEM the return value is the same as for #get_item_rect. code can be one of Wx::LIST_RECT_BOUNDS, Wx::LIST_RECT_ICON or Wx::LIST_RECT_LABEL. Note that using Wx::LIST_RECT_ICON with any sub-item but the first one isn’t very useful as only the first sub-item can have an icon in Wx::ListCtrl. In this case, i.e. for subItem > 0, this function simply returns an empty rectangle in rect.
836 |
# File 'lib/wx/doc/gen/list_ctrl.rb', line 836 def get_sub_item_rect(item, subItem, code=Wx::LIST_RECT_BOUNDS) end |
#get_text_colour ⇒ Wx::Colour Also known as: text_colour
Gets the text colour of the list control.
841 |
# File 'lib/wx/doc/gen/list_ctrl.rb', line 841 def get_text_colour; end |
#get_top_item ⇒ Integer Also known as: top_item
Gets the index of the topmost visible item when in list or report view.
846 |
# File 'lib/wx/doc/gen/list_ctrl.rb', line 846 def get_top_item; end |
#get_updated_ascending_sort_indicator(col) ⇒ Boolean Also known as: updated_ascending_sort_indicator
Returns the new value to use for sort indicator after clicking a column.
This helper function can be useful in the EVT_LIST_COL_CLICK handler when it updates the sort indicator after the user clicked on a column. For example:
class MyListCtrl
def on_col_click(event)
col = event.column
if col == -1
return # clicked outside any column.
ascending = get_updated_ascending_sort_indicator(col)
sort_items(ascending) { |itm1_data, itm2_data, data| ... }
show_sort_indicator(col, ascending)
end
end
1295 |
# File 'lib/wx/doc/gen/list_ctrl.rb', line 1295 def get_updated_ascending_sort_indicator(col) end |
#get_view_rect ⇒ Wx::Rect Also known as: view_rect
Returns the rectangle taken by all items in the control.
In other words, if the controls client size were equal to the size of this rectangle, no scrollbars would be needed and no free space would be left. Note that this function only works in the icon and small icon views, not in list or report views (this is a limitation of the native Win32 control).
854 |
# File 'lib/wx/doc/gen/list_ctrl.rb', line 854 def get_view_rect; end |
#has_check_boxes ⇒ Boolean Also known as: has_check_boxes?
Returns true if checkboxes are enabled for list items.
1207 |
# File 'lib/wx/doc/gen/list_ctrl.rb', line 1207 def has_check_boxes; end |
#hit_test(point) ⇒ Array(Integer,Integer)
Determines which item (if any) is at the specified point, giving details in flags.
Returns index of the item or NOT_FOUND if no item is at the specified point. flags will be a combination of the following flags:
-
Wx::LIST_HITTEST_ABOVE: Above the control’s client area.
-
Wx::LIST_HITTEST_BELOW: Below the control’s client area.
-
Wx::LIST_HITTEST_TOLEFT: To the left of the control’s client area.
-
Wx::LIST_HITTEST_TORIGHT: To the right of the control’s client area.
-
Wx::LIST_HITTEST_NOWHERE: Inside the control’s client area but not over an item.
-
Wx::LIST_HITTEST_ONITEMICON: Over an item’s icon.
-
Wx::LIST_HITTEST_ONITEMLABEL: Over an item’s text.
-
Wx::LIST_HITTEST_ONITEMSTATEICON: Over the checkbox of an item.
-
Wx::LIST_HITTEST_ONITEM: Combination of Wx::LIST_HITTEST_ONITEMICON, Wx::LIST_HITTEST_ONITEMLABEL, Wx::LIST_HITTEST_ONITEMSTATEICON.
If ptrSubItem is not NULL and the Wx::ListCtrl is in the report mode the subitem (or column) number will also be provided. This feature is only available in version 2.7.0 or higher and is currently only implemented under WXMSW and requires at least comctl32.dll of version 4.70 on the host system or the value stored in ptrSubItem will be always -1. To compile this feature into wxWidgets library you need to have access to commctrl.h of version 4.70 that is provided by Microsoft.
892 |
# File 'lib/wx/doc/gen/list_ctrl.rb', line 892 def hit_test(point) end |
#in_report_view ⇒ Boolean
Returns true if the control is currently using Wx::LC_REPORT style.
896 |
# File 'lib/wx/doc/gen/list_ctrl.rb', line 896 def in_report_view; end |
#insert_column(col, info) ⇒ Integer #insert_column(col, heading, format = Wx::ListColumnFormat::LIST_FORMAT_LEFT, width = Wx::LIST_AUTOSIZE) ⇒ Integer
917 |
# File 'lib/wx/doc/gen/list_ctrl.rb', line 917 def insert_column(*args) end |
#insert_item(info) ⇒ Integer #insert_item(index, label) ⇒ Integer #insert_item(index, imageIndex) ⇒ Integer #insert_item(index, label, imageIndex) ⇒ Integer
939 |
# File 'lib/wx/doc/gen/list_ctrl.rb', line 939 def insert_item(*args) end |
#is_ascending_sort_indicator ⇒ Boolean Also known as: ascending_sort_indicator?
Returns true if the sort indicator direction is ascending, false when the direction is descending.
1300 |
# File 'lib/wx/doc/gen/list_ctrl.rb', line 1300 def is_ascending_sort_indicator; end |
#is_empty ⇒ Boolean Also known as: empty?
Returns true if the control doesn’t currently contain any items.
Note that the control with some columns is still considered to be empty if it has no rows.
945 |
# File 'lib/wx/doc/gen/list_ctrl.rb', line 945 def is_empty; end |
#is_item_checked(item) ⇒ Boolean Also known as: item_checked?
Return true if the checkbox for the given Wx::ListItem is checked.
Always returns false if checkboxes support hadn’t been enabled. For a control with Wx::LC_VIRTUAL style, this uses #on_get_item_is_checked.
1226 |
# File 'lib/wx/doc/gen/list_ctrl.rb', line 1226 def is_item_checked(item) end |
#is_virtual ⇒ Boolean Also known as: virtual?
Returns true if the control is currently in virtual report view.
950 |
# File 'lib/wx/doc/gen/list_ctrl.rb', line 950 def is_virtual; end |
#is_visible(item) ⇒ Boolean Also known as: visible?
Check if the item is visible.
An item is considered visible if at least one pixel of it is present on the screen.
1078 |
# File 'lib/wx/doc/gen/list_ctrl.rb', line 1078 def is_visible(item) end |
#on_get_item_attr(item) ⇒ Wx::ItemAttr (protected)
This function may be overridden in the derived class for a control with Wx::LC_VIRTUAL style.
It should return the attribute for the specified item or NULL to use the default appearance parameters. Wx::ListCtrl will not delete the pointer or keep a reference of it. You can return the same ItemAttr pointer for every #on_get_item_attr call. The base class version always returns NULL.
1318 |
# File 'lib/wx/doc/gen/list_ctrl.rb', line 1318 def on_get_item_attr(item) end |
#on_get_item_column_attr(item, column) ⇒ Wx::ItemAttr (protected)
This function may be overridden in the derived class for a control with Wx::LC_VIRTUAL style.
It should return the attribute for the for the specified item and column or NULL to use the default appearance parameters. The base class version returns OnGetItemAttr(item)
.
Currently this function is only called under WXMSW, the other ports only support #on_get_item_attr
1338 |
# File 'lib/wx/doc/gen/list_ctrl.rb', line 1338 def on_get_item_column_attr(item, column) end |
#on_get_item_column_image(item, column) ⇒ Integer (protected)
Override this function in the derived class for a control with Wx::LC_VIRTUAL and Wx::LC_REPORT styles in order to specify the image index for the given line and column.
The base class version always calls #on_get_item_image for the first column, else it returns -1.
1350 |
# File 'lib/wx/doc/gen/list_ctrl.rb', line 1350 def on_get_item_column_image(item, column) end |
#on_get_item_image(item) ⇒ Integer (protected)
This function must be overridden in the derived class for a control with Wx::LC_VIRTUAL style using images.
If the control doesn’t use images, i.e. #set_normal_images or #set_small_images hadn’t been called, it is not necessary to override it. It should return the index of the items image in the controls image list or -1 for no image. In a control with Wx::LC_REPORT style, #on_get_item_image only gets called for the first column of each line. The base class version always returns -1.
1363 |
# File 'lib/wx/doc/gen/list_ctrl.rb', line 1363 def on_get_item_image(item) end |
#on_get_item_is_checked(item) ⇒ Boolean (protected)
This function must be overridden in the derived class for a control with Wx::LC_VIRTUAL style that uses checkboxes.
It should return whether the checkbox of the specified item is checked.
1384 |
# File 'lib/wx/doc/gen/list_ctrl.rb', line 1384 def on_get_item_is_checked(item) end |
#on_get_item_text(item, column) ⇒ String (protected)
This function must be overridden in the derived class for a control with Wx::LC_VIRTUAL style.
It should return the string containing the text of the given column for the specified item.
1375 |
# File 'lib/wx/doc/gen/list_ctrl.rb', line 1375 def on_get_item_text(item, column) end |
#refresh_item(item) ⇒ void
This method returns an undefined value.
Redraws the given item.
This is only useful for the virtual list controls as without calling this function the displayed value of the item doesn’t change even when the underlying data does change.
959 |
# File 'lib/wx/doc/gen/list_ctrl.rb', line 959 def refresh_item(item) end |
#refresh_items(itemFrom, itemTo) ⇒ void
This method returns an undefined value.
Redraws the items between itemFrom and itemTo.
The starting item must be less than or equal to the ending one. Just as #refresh_item this is only useful for virtual list controls.
968 |
# File 'lib/wx/doc/gen/list_ctrl.rb', line 968 def refresh_items(itemFrom, itemTo) end |
#remove_sort_indicator ⇒ void
This method returns an undefined value.
Remove the sort indicator from the column being used as sort key.
1265 |
# File 'lib/wx/doc/gen/list_ctrl.rb', line 1265 def remove_sort_indicator; end |
#scroll_list(dx, dy) ⇒ Boolean
Scrolls the list control.
If in icon, small icon or report view mode, dx specifies the number of pixels to scroll. If in list view mode, dx specifies the number of columns to scroll. dy always specifies the number of pixels to scroll vertically.
This method is currently only implemented in the Windows version.
982 |
# File 'lib/wx/doc/gen/list_ctrl.rb', line 982 def scroll_list(dx, dy) end |
#set_alternate_row_colour(colour) ⇒ void Also known as: alternate_row_colour=
This method returns an undefined value.
Set the alternative row background colour to a specific colour.
It is recommended to call #enable_alternate_row_colours instead of using these methods as native implementations of this control might support alternating row colours but not setting the exact colour to be used for them. As #enable_alternate_row_colours, this method can only be used with controls having Wx::LC_REPORT and Wx::LC_VIRTUAL styles.
863 |
# File 'lib/wx/doc/gen/list_ctrl.rb', line 863 def set_alternate_row_colour(colour) end |
#set_background_colour(col) ⇒ Boolean Also known as: background_colour=
Sets the background colour.
Note that the Window#get_background_colour function of Window base class can be used to retrieve the current background colour.
If alternate row colouring is enabled, then call #enable_alternate_row_colours again after changing the background colour. This will update the alternate row color to match the new background colour.
995 |
# File 'lib/wx/doc/gen/list_ctrl.rb', line 995 def set_background_colour(col) end |
#set_column(col, item) ⇒ Boolean
Sets information about this column.
See #set_item for more information.
1004 |
# File 'lib/wx/doc/gen/list_ctrl.rb', line 1004 def set_column(col, item) end |
#set_column_width(col, width) ⇒ Boolean
Sets the column width.
width can be a width in pixels or Wx::LIST_AUTOSIZE (-1) or Wx::LIST_AUTOSIZE_USEHEADER (-2). Wx::LIST_AUTOSIZE will resize the column to the length of its longest item. Wx::LIST_AUTOSIZE_USEHEADER will resize the column to the length of the header (Win32) or 80 pixels (other platforms). In small or normal icon view, col must be -1, and the column width is set for all columns.
1015 |
# File 'lib/wx/doc/gen/list_ctrl.rb', line 1015 def set_column_width(col, width) end |
#set_columns_order(orders) ⇒ Boolean
Changes the order in which the columns are shown.
The orders array must have the same number elements as the number of columns and contain each position exactly once. Its n-th element contains the index of the column to be shown in n-th position, so for a control with three columns passing an array with elements 2, 0 and 1 results in the third column being displayed first, the first one next and the second one last.
This function makes sense for report view only and currently is only implemented in the WXMSW port. Use HAS_LISTCTRL_COLUMN_ORDER to guard uses of this function so that they will start working under the other platforms when support for the column reordering is added there.
1030 |
# File 'lib/wx/doc/gen/list_ctrl.rb', line 1030 def set_columns_order(orders) end |
#set_header_attr(attr) ⇒ Boolean Also known as: header_attr=
Change the font and the colours used for the list control header.
This method can be used to change the appearance of the header shown by the control in report mode (unless Wx::LC_NO_HEADER style is used). Currently it is implemented only for WXMSW and does nothing in the other ports.
true if the attributes have been updated or false if this is not supported by the current platform.
1040 |
# File 'lib/wx/doc/gen/list_ctrl.rb', line 1040 def set_header_attr(attr) end |
#set_image_list(imageList, which) ⇒ void
This method returns an undefined value.
Sets the image list associated with the control.
Not that it is recommended to use #set_normal_images or #set_small_images instead of this function in the new code. which must be one of IMAGE_LIST_NORMAL, IMAGE_LIST_SMALL, IMAGE_LIST_STATE (support for the last one is unimplemented). This method does not take ownership of the image list, you have to delete it yourself. Note that, unlike for most of the other methods of this class, it is possible to call this function before the corresponding window is created, i.e. do it in a constructor of a class derived from Wx::ListCtrl before calling #create.
1053 |
# File 'lib/wx/doc/gen/list_ctrl.rb', line 1053 def set_image_list(imageList, which) end |
#set_item(info) ⇒ Boolean #set_item(index, column, label, imageId = -1) ⇒ Boolean Also known as: item=
1097 |
# File 'lib/wx/doc/gen/list_ctrl.rb', line 1097 def set_item(*args) end |
#set_item_background_colour(item, col) ⇒ void
This method returns an undefined value.
Sets the background colour for this item.
This function only works in report view mode. The colour can be retrieved using #get_item_background_colour.
1106 |
# File 'lib/wx/doc/gen/list_ctrl.rb', line 1106 def set_item_background_colour(item, col) end |
#set_item_column_image(item, column, image) ⇒ Boolean
Sets the image associated with the item.
In report view, you can specify the column. The image is an index into the image list associated with the list control.
1115 |
# File 'lib/wx/doc/gen/list_ctrl.rb', line 1115 def set_item_column_image(item, column, image) end |
#set_item_count(count) ⇒ void Also known as: item_count=
This method returns an undefined value.
This method can only be used with virtual list controls.
It is used to indicate to the control the number of items it contains. After calling it, the main program should be ready to handle calls to various item callbacks (such as #on_get_item_text) for all items in the range from 0 to count. Notice that the control is not necessarily redrawn after this call as it may be undesirable if an item which is not visible on the screen anyhow was added to or removed from a control displaying many items, if you do need to refresh the display you can just call Window#refresh manually.
1123 |
# File 'lib/wx/doc/gen/list_ctrl.rb', line 1123 def set_item_count(count) end |
#set_item_font(item, font) ⇒ void
This method returns an undefined value.
Sets the item’s font.
1130 |
# File 'lib/wx/doc/gen/list_ctrl.rb', line 1130 def set_item_font(item, font) end |
#set_item_image(item, image, selImage = -1)) ⇒ Boolean
Sets the unselected and selected images associated with the item.
The images are indices into the image list associated with the list control.
1139 |
# File 'lib/wx/doc/gen/list_ctrl.rb', line 1139 def set_item_image(item, image, selImage=-1) end |
#set_item_position(item, pos) ⇒ Boolean
Sets the position of the item, in icon or small icon view.
Windows only.
1147 |
# File 'lib/wx/doc/gen/list_ctrl.rb', line 1147 def set_item_position(item, pos) end |
#set_item_state(item, state, stateMask) ⇒ Boolean
Sets the item state.
The stateMask is a combination of Wx::LIST_STATE_XXX constants described in Wx::ListItem documentation. For each of the bits specified in stateMask, the corresponding state is set or cleared depending on whether state argument contains the same bit or not. So to select an item you can use
list.set_item_state(item, Wx::LIST_STATE_SELECTED, Wx::LIST_STATE_SELECTED)
while to deselect it you should use
list.set_item_state(item, 0, Wx::LIST_STATE_SELECTED)
Consider using Wx::ListView if possible to avoid dealing with this error-prone and confusing method. Also notice that contrary to the usual rule that only user actions generate events, this method does generate EVT_LIST_ITEM_SELECTED event when it is used to select an item.
1167 |
# File 'lib/wx/doc/gen/list_ctrl.rb', line 1167 def set_item_state(item, state, stateMask) end |
#set_item_text(item, text) ⇒ void
This method returns an undefined value.
Sets the item text for this item.
1173 |
# File 'lib/wx/doc/gen/list_ctrl.rb', line 1173 def set_item_text(item, text) end |
#set_item_text_colour(item, col) ⇒ void
This method returns an undefined value.
Sets the colour for this item.
This function only works in report view. The colour can be retrieved using #get_item_text_colour.
1181 |
# File 'lib/wx/doc/gen/list_ctrl.rb', line 1181 def set_item_text_colour(item, col) end |
#set_normal_images(images) ⇒ void Also known as: normal_images=
This method returns an undefined value.
Sets the images to use when showing large, normal icons in this control.
These images are used by the items when the list control is in Wx::LC_ICON mode, in all the other modes the images set by #set_small_images are used. This function should be preferred to calling #set_image_list or assign_image_list with IMAGE_LIST_NORMAL argument in the new code, as using BitmapBundle makes it possible to specify multiple versions of the icons, allowing the control to choose the right one for the current DPI scaling.
1061 |
# File 'lib/wx/doc/gen/list_ctrl.rb', line 1061 def set_normal_images(images) end |
#set_single_style(style, add = true) ⇒ void Also known as: single_style=
This method returns an undefined value.
Adds or removes a single window style.
1187 |
# File 'lib/wx/doc/gen/list_ctrl.rb', line 1187 def set_single_style(style, add=true) end |
#set_small_images(images) ⇒ void Also known as: small_images=
This method returns an undefined value.
Sets the images to use when showing small icons in this control.
These images are used by the items when the list control is in Wx::LC_SMALL_ICON or Wx::LC_REPORT mode, use #set_normal_images for the icons used in Wx::LC_ICON mode. This function should be preferred to calling #set_image_list or assign_image_list with IMAGE_LIST_SMALL argument in the new code, as using BitmapBundle makes it possible to specify multiple versions of the icons, allowing the control to choose the right one for the current DPI scaling.
1070 |
# File 'lib/wx/doc/gen/list_ctrl.rb', line 1070 def set_small_images(images) end |
#set_text_colour(col) ⇒ void Also known as: text_colour=
This method returns an undefined value.
Sets the text colour of the list control.
1193 |
# File 'lib/wx/doc/gen/list_ctrl.rb', line 1193 def set_text_colour(col) end |
#set_window_style_flag(style) ⇒ void Also known as: window_style_flag=
This method returns an undefined value.
Sets the whole window style, deleting all items.
1199 |
# File 'lib/wx/doc/gen/list_ctrl.rb', line 1199 def set_window_style_flag(style) end |
#show_sort_indicator(col, ascending = true) ⇒ void
This method returns an undefined value.
Show the sort indicator of a specific column in a specific direction.
Sort indicators are only shown in report view and in the native WXMSW version override any column icon, i.e. if the sort indicator is shown for a column, no (other) icon is shown. This function should typically be called from EVT_LIST_COL_CLICK handler.
This does not actually sort the list, use #sort_items for this.
1261 |
# File 'lib/wx/doc/gen/list_ctrl.rb', line 1261 def show_sort_indicator(col, ascending=true) end |
#sort_items(data = nil) {|item_data1, item_data2, data| ... } ⇒ Object
Call this function to sort the items in the list control. The sorting method will call the given block repeatedly to compare two items from the list passing the item data for each item as well as the data
argument given to the #sort_items method. The block should return 0 if the items are equal, negative value if the first item is less than the second one and positive value if the first one is greater than the second one.
38 |
# File 'lib/wx/doc/list_ctrl.rb', line 38 def sort_items(data = nil, &block) end |