Class: Wx::GRID::Grid

Inherits:
ScrolledCanvas show all
Defined in:
lib/wx/doc/gen/grid/grid_ctrl.rb,
lib/wx/doc/grid/grid.rb

Overview

Grid and its related classes are used for displaying and editing tabular data.

They provide a rich set of features for display, editing, and interacting with a variety of data sources. For simple applications, and to help you get started, Grid is the only class you need to refer to directly. It will set up default instances of the other classes and manage them for you. For more complex applications you can derive your own classes for custom grid views, grid data tables, cell editors and renderers. The wxGrid Overview has examples of simple and more complex applications, explains the relationship between the various grid classes and has a summary of the keyboard shortcuts and mouse functions provided by Grid. A GridTableBase class holds the actual data to be displayed by a Grid class. One or more Grid classes may act as a view for one table class. The default table class is called GridStringTable and holds an array of strings. An instance of such a class is created by #create_grid. GridCellRenderer is the abstract base class for rendering contents in a cell. The following renderers are predefined:

The look of a cell can be further defined using GridCellAttr. An object of this type may be returned by Wx::GRID::GridTableBase#get_attr. GridCellEditor is the abstract base class for editing the value of a cell. The following editors are predefined:

Please see GridEvent, GridSizeEvent, GridRangeSelectEvent, and GridEditorCreatedEvent for the documentation of all event types you can use with Grid.

Category: Grid Related Classes

See Also:

  • Overview
  • Wx::GridUpdateLocker

Requires:

  • USE_GRID

Defined Under Namespace

Classes: CellSpan, GridSelectionModes, TabBehaviour

Instance Method Summary collapse

Methods inherited from ScrolledCanvas

#adjust_scrollbars, #calc_scrolled_position, #calc_unscrolled_position, #disable_keyboard_scrolling, #do_prepare_dc, #enable_scrolling, #get_scale_x, #get_scale_y, #get_scroll_lines, #get_scroll_page_size, #get_scroll_pixels_per_unit, #get_target_rect, #get_target_window, #get_view_start, #get_virtual_size, #is_auto_scrolling, #is_retained, #prepare_dc, #scroll, #set_scale, #set_scroll_page_size, #set_scroll_rate, #set_scrollbars, #set_target_rect, #set_target_window, #show_scrollbars, #stop_auto_scrolling

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_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, #hit_test, #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_colour, #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_style_flag, #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

#initializeWx::GRID::Grid #initialize(parent, id, pos = Wx::DEFAULT_POSITION, size = Wx::DEFAULT_SIZE, style = Wx::WANTS_CHARS, name = Wx::GRID_NAME_STR) ⇒ Wx::GRID::Grid

Returns a new instance of Grid.

Overloads:

  • #initializeWx::GRID::Grid

    Default constructor.

    You must call #create to really create the grid window and also call #create_grid or #set_table or #assign_table to initialize its contents.

  • #initialize(parent, id, pos = Wx::DEFAULT_POSITION, size = Wx::DEFAULT_SIZE, style = Wx::WANTS_CHARS, name = Wx::GRID_NAME_STR) ⇒ Wx::GRID::Grid

    Constructor creating the grid window.

    You must call either #create_grid or #set_table or #assign_table to initialize the grid contents before using it.

    Parameters:

    • parent (Wx::Window)
    • id (Integer)
    • pos (Array(Integer, Integer), Wx::Point) (defaults to: Wx::DEFAULT_POSITION)
    • size (Array(Integer, Integer), Wx::Size) (defaults to: Wx::DEFAULT_SIZE)
    • style (Integer) (defaults to: Wx::WANTS_CHARS)
    • name (String) (defaults to: Wx::GRID_NAME_STR)


320
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 320

def initialize(*args) end

Instance Method Details

#append_cols(numCols = 1, updateLabels = true) ⇒ Boolean

Appends one or more new columns to the right of the grid.

The updateLabels argument is not used at present. If you are using a derived grid table class you will need to override Wx::GRID::GridTableBase#append_cols. See #insert_cols for further information. true on success or false if appending columns failed.

Parameters:

  • numCols (Integer) (defaults to: 1)
  • updateLabels (Boolean) (defaults to: true)

Returns:

  • (Boolean)


2122
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 2122

def append_cols(numCols=1, updateLabels=true) end

#append_rows(numRows = 1, updateLabels = true) ⇒ Boolean

Appends one or more new rows to the bottom of the grid.

The updateLabels argument is not used at present. If you are using a derived grid table class you will need to override Wx::GRID::GridTableBase#append_rows. See #insert_rows for further information. true on success or false if appending rows failed.

Parameters:

  • numRows (Integer) (defaults to: 1)
  • updateLabels (Boolean) (defaults to: true)

Returns:

  • (Boolean)


2131
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 2131

def append_rows(numRows=1, updateLabels=true) end

#are_horz_grid_lines_clippedBoolean

Return true if the horizontal grid lines stop at the last column boundary or false if they continue to the end of the window.

The default is to clip grid lines.



2139
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 2139

def are_horz_grid_lines_clipped; end

#are_vert_grid_lines_clippedBoolean

Return true if the vertical grid lines stop at the last row boundary or false if they continue to the end of the window.

The default is to clip grid lines.



2147
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 2147

def are_vert_grid_lines_clipped; end

#assign_table(table, selmode = Wx::GRID::Grid::GridSelectionModes::GridSelectCells) ⇒ void

This method returns an undefined value.

Assigns a pointer to a custom grid table to be used by the grid.

This function is identical to #set_table with takeOwnership parameter set to true, i.e. it simply always takes the ownership of the passed in pointer. This makes it simpler to use than #set_table in the common case when the table should be owned by the grid object. Note that this function should be called at most once and can’t be used to change the table used by the grid later on or reset it: if such extra flexibility is needed, use #set_table directly.

Parameters:

  • table (Wx::GRID::GridTableBase)

    The heap-allocated pointer to the table.

  • selmode (Wx::Grid::GridSelectionModes) (defaults to: Wx::GRID::Grid::GridSelectionModes::GridSelectCells)

    Selection mode to use.



351
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 351

def assign_table(table, selmode=Wx::GRID::Grid::GridSelectionModes::GridSelectCells) end

#auto_sizevoid

This method returns an undefined value.

Automatically sets the height and width of all rows and columns to fit their contents.



1009
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1009

def auto_size; end

#auto_size_col_label_size(col) ⇒ void

This method returns an undefined value.

Automatically adjusts width of the column to fit its label.

Parameters:

  • col (Integer)


1014
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1014

def auto_size_col_label_size(col) end

#auto_size_column(col, setAsMin = true) ⇒ void

This method returns an undefined value.

Automatically sizes the column to fit its contents.

If setAsMin is true the calculated width will also be set as the minimal width for the column.

Parameters:

  • col (Integer)
  • setAsMin (Boolean) (defaults to: true)


1022
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1022

def auto_size_column(col, setAsMin=true) end

#auto_size_columns(setAsMin = true) ⇒ void

This method returns an undefined value.

Automatically sizes all columns to fit their contents.

If setAsMin is true the calculated widths will also be set as the minimal widths for the columns.

Parameters:

  • setAsMin (Boolean) (defaults to: true)


1029
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1029

def auto_size_columns(setAsMin=true) end

#auto_size_row(row, setAsMin = true) ⇒ void

This method returns an undefined value.

Automatically sizes the row to fit its contents.

If setAsMin is true the calculated height will also be set as the minimal height for the row.

Parameters:

  • row (Integer)
  • setAsMin (Boolean) (defaults to: true)


1037
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1037

def auto_size_row(row, setAsMin=true) end

#auto_size_row_label_size(col) ⇒ void

This method returns an undefined value.

Automatically adjusts height of the row to fit its label.

Parameters:

  • col (Integer)


1042
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1042

def auto_size_row_label_size(col) end

#auto_size_rows(setAsMin = true) ⇒ void

This method returns an undefined value.

Automatically sizes all rows to fit their contents.

If setAsMin is true the calculated heights will also be set as the minimal heights for the rows.

Parameters:

  • setAsMin (Boolean) (defaults to: true)


1049
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1049

def auto_size_rows(setAsMin=true) end

#begin_batchvoid

This method returns an undefined value.

Increments the grid’s batch count.

When the count is greater than zero repainting of the grid is suppressed. Each call to BeginBatch must be matched by a later call to #end_batch. Code that does a lot of grid modification can be enclosed between #begin_batch and #end_batch calls to avoid screen flicker. The final #end_batch call will cause the grid to be repainted. Notice that you should use Wx::GridUpdateLocker which ensures that there is always a matching #end_batch call for this #begin_batch if possible instead of calling this method directly.



2154
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 2154

def begin_batch; end

#block_to_device_rect(topLeft, bottomRight, gridWindow = nil) ⇒ Wx::Rect

Convert grid cell coordinates to grid window pixel coordinates.

This function returns the rectangle that encloses the block of cells limited by topLeft and bottomRight cell in device coords and clipped to the client size of the grid window.

Parameters:

  • topLeft (Array(Integer, Integer))
  • bottomRight (Array(Integer, Integer))
  • gridWindow (Wx::GRID::GridWindow) (defaults to: nil)

Returns:

See Also:



2010
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 2010

def block_to_device_rect(topLeft, bottomRight, gridWindow=nil) end

#calc_cells_exposed(reg, gridWindow = nil) ⇒ Array<Array(Integer, Integer)>

Returns an array of (visible) cells within the given region.

Parameters:

Returns:

  • (Array<Array(Integer, Integer)>)


2404
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 2404

def calc_cells_exposed(reg, gridWindow=nil) end

#calc_col_labels_exposed(reg, gridWindow = nil) ⇒ Array<Integer>

Returns an array of column labels within the given region.

Parameters:

Returns:

  • (Array<Integer>)


2398
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 2398

def calc_col_labels_exposed(reg, gridWindow=nil) end

#calc_grid_window_scrolled_position(pt, gridWindow) ⇒ Wx::Point

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters:

Returns:



2061
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 2061

def calc_grid_window_scrolled_position(pt, gridWindow) end

#calc_grid_window_unscrolled_position(pt, gridWindow) ⇒ Wx::Point

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters:

Returns:



2055
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 2055

def calc_grid_window_unscrolled_position(pt, gridWindow) end

#calc_row_labels_exposed(reg, gridWindow = nil) ⇒ Array<Integer>

Returns an array of row labels within the given region.

Parameters:

Returns:

  • (Array<Integer>)


2392
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 2392

def calc_row_labels_exposed(reg, gridWindow=nil) end

#can_drag_cellBoolean Also known as: can_drag_cell?

Return true if the dragging of cells is enabled or false otherwise.

Returns:

  • (Boolean)


1392
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1392

def can_drag_cell; end

#can_drag_col_moveBoolean Also known as: can_drag_col_move?

Returns true if columns can be moved by dragging with the mouse.

Columns can be moved by dragging on their labels.

Returns:

  • (Boolean)


1399
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1399

def can_drag_col_move; end

#can_drag_col_size(col) ⇒ Boolean Also known as: can_drag_col_size?

Returns true if the given column can be resized by dragging with the mouse.

This function returns true if resizing the columns interactively is globally enabled, i.e. if #disable_drag_col_size hadn’t been called, and if this column wasn’t explicitly marked as non-resizable with #disable_col_resize.

Parameters:

  • col (Integer)

Returns:

  • (Boolean)


1407
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1407

def can_drag_col_size(col) end

#can_drag_grid_col_edgesBoolean Also known as: can_drag_grid_col_edges?

Return true if column edges inside the grid can be dragged to resize the rows.

Returns:

  • (Boolean)

See Also:



1416
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1416

def can_drag_grid_col_edges; end

#can_drag_grid_row_edgesBoolean Also known as: can_drag_grid_row_edges?

Return true if row edges inside the grid can be dragged to resize the rows.

Returns:

  • (Boolean)

See Also:



1425
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1425

def can_drag_grid_row_edges; end

#can_drag_grid_sizeBoolean Also known as: can_drag_grid_size?

Return true if the dragging of grid lines to resize rows and columns is enabled or false otherwise.

Returns:

  • (Boolean)


1430
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1430

def can_drag_grid_size; end

#can_drag_row_moveBoolean Also known as: can_drag_row_move?

Returns true if rows can be moved by dragging with the mouse.

Rows can be moved by dragging on their labels.

Returns:

  • (Boolean)


1437
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1437

def can_drag_row_move; end

#can_drag_row_size(row) ⇒ Boolean Also known as: can_drag_row_size?

Returns true if the given row can be resized by dragging with the mouse.

This is the same as #can_drag_col_size but for rows.

Parameters:

  • row (Integer)

Returns:

  • (Boolean)


1445
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1445

def can_drag_row_size(row) end

#can_enable_cell_controlBoolean Also known as: can_enable_cell_control?

Returns true if the in-place edit control for the current grid cell can be used and false otherwise.

This function always returns false for the read-only cells.

Returns:

  • (Boolean)


724
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 724

def can_enable_cell_control; end

#can_hide_columnsBoolean Also known as: can_hide_columns?

Returns true if columns can be hidden from the popup menu of the native header.

Returns:

  • (Boolean)


1450
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1450

def can_hide_columns; end

#cell_to_grid_window(row, col) ⇒ Wx::GRID::GridWindow #cell_to_grid_window(coords) ⇒ Wx::GRID::GridWindow

Overloads:

  • #cell_to_grid_window(row, col) ⇒ Wx::GRID::GridWindow

    Returns the grid window that contains the cell.

    In a grid without frozen rows or columns (see #freeze_to), this will always return the same window as #get_grid_window, however if some parts of the grid are frozen, this function returns the window containing the given cell.

    Parameters:

    • row (Integer)
    • col (Integer)

    Returns:

  • #cell_to_grid_window(coords) ⇒ Wx::GRID::GridWindow

    This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

    Parameters:

    • coords (Array(Integer, Integer))

    Returns:



2032
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 2032

def cell_to_grid_window(*args) end

#cell_to_rect(row, col) ⇒ Wx::Rect

Return the rectangle corresponding to the grid cell’s size and position in logical coordinates.

Parameters:

  • row (Integer)
  • col (Integer)

Returns:

See Also:



2019
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 2019

def cell_to_rect(row, col) end

#clear_gridvoid

This method returns an undefined value.

Clears all data in the underlying grid table and repaints the grid.

The table is not deleted by this function. If you are using a derived table class then you need to override Wx::GRID::GridTableBase#clear for this function to have any effect.



2160
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 2160

def clear_grid; end

#clear_selectionvoid

This method returns an undefined value.

Deselects all cells that are currently selected.



1751
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1751

def clear_selection; end

#clip_horz_grid_lines(clip) ⇒ void

This method returns an undefined value.

Change whether the horizontal grid lines are clipped by the end of the last column.

By default the grid lines are not drawn beyond the end of the last column but after calling this function with clip set to false they will be drawn across the entire grid window.

Parameters:

  • clip (Boolean)

See Also:



2169
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 2169

def clip_horz_grid_lines(clip) end

#clip_vert_grid_lines(clip) ⇒ void

This method returns an undefined value.

Change whether the vertical grid lines are clipped by the end of the last row.

By default the grid lines are not drawn beyond the end of the last row but after calling this function with clip set to false they will be drawn across the entire grid window.

Parameters:

  • clip (Boolean)

See Also:



2178
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 2178

def clip_vert_grid_lines(clip) end

#create(parent, id, pos = Wx::DEFAULT_POSITION, size = Wx::DEFAULT_SIZE, style = Wx::WANTS_CHARS, name = Wx::GRID_NAME_STR) ⇒ Boolean

Creates the grid window for an object initialized using the default constructor.

You must call either #create_grid or #set_table or #assign_table to initialize the grid contents before using it.

Parameters:

  • parent (Wx::Window)
  • id (Integer)
  • pos (Array(Integer, Integer), Wx::Point) (defaults to: Wx::DEFAULT_POSITION)
  • size (Array(Integer, Integer), Wx::Size) (defaults to: Wx::DEFAULT_SIZE)
  • style (Integer) (defaults to: Wx::WANTS_CHARS)
  • name (String) (defaults to: Wx::GRID_NAME_STR)

Returns:

  • (Boolean)


332
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 332

def create(parent, id, pos=Wx::DEFAULT_POSITION, size=Wx::DEFAULT_SIZE, style=Wx::WANTS_CHARS, name=Wx::GRID_NAME_STR) end

#create_grid(numRows, numCols, selmode = Wx::GRID::Grid::GridSelectionModes::GridSelectCells) ⇒ Boolean

Creates a grid with the specified initial number of rows and columns.

Call this directly after the grid constructor. When you use this function Wx::GRID::Grid will create and manage a simple table of string values for you. All of the grid data will be stored in memory. For applications with more complex data types or relationships, or for dealing with very large datasets, you should derive your own grid table class and pass a table object to the grid with #set_table or #assign_table.

Parameters:

  • numRows (Integer)
  • numCols (Integer)
  • selmode (Wx::Grid::GridSelectionModes) (defaults to: Wx::GRID::Grid::GridSelectionModes::GridSelectCells)

Returns:

  • (Boolean)


342
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 342

def create_grid(numRows, numCols, selmode=Wx::GRID::Grid::GridSelectionModes::GridSelectCells) end

#delete_cols(pos = 0, numCols = 1, updateLabels = true) ⇒ Boolean

Deletes one or more columns from a grid starting at the specified position.

The updateLabels argument is not used at present. If you are using a derived grid table class you will need to override Wx::GRID::GridTableBase#delete_cols. See #insert_cols for further information. true on success or false if deleting columns failed.

Parameters:

  • pos (Integer) (defaults to: 0)
  • numCols (Integer) (defaults to: 1)
  • updateLabels (Boolean) (defaults to: true)

Returns:

  • (Boolean)


2188
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 2188

def delete_cols(pos=0, numCols=1, updateLabels=true) end

#delete_rows(pos = 0, numRows = 1, updateLabels = true) ⇒ Boolean

Deletes one or more rows from a grid starting at the specified position.

The updateLabels argument is not used at present. If you are using a derived grid table class you will need to override Wx::GRID::GridTableBase#delete_rows. See #insert_rows for further information. true on success or false if deleting rows failed.

Parameters:

  • pos (Integer) (defaults to: 0)
  • numRows (Integer) (defaults to: 1)
  • updateLabels (Boolean) (defaults to: true)

Returns:

  • (Boolean)


2198
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 2198

def delete_rows(pos=0, numRows=1, updateLabels=true) end

#deselect_cell(row, col) ⇒ void

This method returns an undefined value.

Deselects a cell.

Parameters:

  • row (Integer)
  • col (Integer)


1767
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1767

def deselect_cell(row, col) end

#deselect_col(col) ⇒ void

This method returns an undefined value.

Deselects a column of cells.

Parameters:

  • col (Integer)


1761
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1761

def deselect_col(col) end

#deselect_row(row) ⇒ void

This method returns an undefined value.

Deselects a row of cells.

Parameters:

  • row (Integer)


1756
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1756

def deselect_row(row) end

#device_pos_to_grid_window(pos) ⇒ Wx::GRID::GridWindow #device_pos_to_grid_window(x, y) ⇒ Wx::GRID::GridWindow

Overloads:



2043
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 2043

def device_pos_to_grid_window(*args) end

#disable_cell_edit_controlvoid

This method returns an undefined value.

Disables in-place editing of grid cells.

Equivalent to calling EnableCellEditControl(false).



731
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 731

def disable_cell_edit_control; end

#disable_col_resize(col) ⇒ void

This method returns an undefined value.

Disable interactive resizing of the specified column.

This method allows one to disable resizing of an individual column in a grid where the columns are otherwise resizable (which is the case by default). Notice that currently there is no way to make some columns resizable in a grid where columns can’t be resized by default as there doesn’t seem to be any need for this in practice. There is also no way to make the column marked as fixed using this method resizable again because it is supposed that fixed columns are used for static parts of the grid and so should remain fixed during the entire grid lifetime. Also notice that disabling interactive column resizing will not prevent the program from changing the column size.

Parameters:

  • col (Integer)

See Also:



1461
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1461

def disable_col_resize(col) end

#disable_drag_col_movevoid

This method returns an undefined value.

Disables column moving by dragging with the mouse.

Equivalent to passing false to #enable_drag_col_move.



1475
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1475

def disable_drag_col_move; end

#disable_drag_col_sizevoid

This method returns an undefined value.

Disables column sizing by dragging with the mouse.

Equivalent to passing false to #enable_drag_col_size.



1487
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1487

def disable_drag_col_size; end

#disable_drag_grid_sizevoid

This method returns an undefined value.

Disable mouse dragging of grid lines to resize rows and columns.

Equivalent to passing false to #enable_drag_grid_size



1493
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1493

def disable_drag_grid_size; end

#disable_drag_row_movevoid

This method returns an undefined value.

Disables row moving by dragging with the mouse.

Equivalent to passing false to #enable_drag_row_move.



1481
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1481

def disable_drag_row_move; end

#disable_drag_row_sizevoid

This method returns an undefined value.

Disables row sizing by dragging with the mouse.

Equivalent to passing false to #enable_drag_row_size.



1499
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1499

def disable_drag_row_size; end

#disable_hiding_columnsvoid

This method returns an undefined value.

Disables column hiding from the header popup menu.

Equivalent to passing false to #enable_hiding_columns.



1505
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1505

def disable_hiding_columns; end

#disable_row_resize(row) ⇒ void

This method returns an undefined value.

Disable interactive resizing of the specified row.

This is the same as #disable_col_resize but for rows.

Parameters:

  • row (Integer)

See Also:



1469
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1469

def disable_row_resize(row) end

#draw_cell_highlight(dc, attr) ⇒ void

This method returns an undefined value.

Parameters:



2514
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 2514

def draw_cell_highlight(dc, attr) end

#draw_col_label(dc, col) ⇒ void

This method returns an undefined value.

Parameters:



2534
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 2534

def draw_col_label(dc, col) end

#draw_col_labels(dc, cols) ⇒ void

This method returns an undefined value.

Parameters:

  • dc (Wx::DC)
  • cols (Array<Integer>)


2529
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 2529

def draw_col_labels(dc, cols) end

#draw_corner_label(dc) ⇒ void

This method returns an undefined value.

Parameters:



2538
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 2538

def draw_corner_label(dc) end

#draw_row_label(dc, row) ⇒ void

This method returns an undefined value.

Parameters:



2524
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 2524

def draw_row_label(dc, row) end

#draw_row_labels(dc, rows) ⇒ void

This method returns an undefined value.

Parameters:

  • dc (Wx::DC)
  • rows (Array<Integer>)


2519
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 2519

def draw_row_labels(dc, rows) end

#draw_text_rectangle(dc, text, rect, horizontalAlignment = Wx::Alignment::ALIGN_LEFT, verticalAlignment = Wx::Alignment::ALIGN_TOP, textOrientation = Wx::Orientation::HORIZONTAL) ⇒ void #draw_text_rectangle(dc, lines, rect, horizontalAlignment = Wx::Alignment::ALIGN_LEFT, verticalAlignment = Wx::Alignment::ALIGN_TOP, textOrientation = Wx::Orientation::HORIZONTAL) ⇒ void

Overloads:

  • #draw_text_rectangle(dc, text, rect, horizontalAlignment = Wx::Alignment::ALIGN_LEFT, verticalAlignment = Wx::Alignment::ALIGN_TOP, textOrientation = Wx::Orientation::HORIZONTAL) ⇒ void

    This method returns an undefined value.

    Parameters:

    • dc (Wx::DC)
    • text (String)
    • rect (Wx::Rect)
    • horizontalAlignment (Integer) (defaults to: Wx::Alignment::ALIGN_LEFT)
    • verticalAlignment (Integer) (defaults to: Wx::Alignment::ALIGN_TOP)
    • textOrientation (Integer) (defaults to: Wx::Orientation::HORIZONTAL)
  • #draw_text_rectangle(dc, lines, rect, horizontalAlignment = Wx::Alignment::ALIGN_LEFT, verticalAlignment = Wx::Alignment::ALIGN_TOP, textOrientation = Wx::Orientation::HORIZONTAL) ⇒ void

    This method returns an undefined value.

    Parameters:

    • dc (Wx::DC)
    • lines (Array<String>)
    • rect (Wx::Rect)
    • horizontalAlignment (Integer) (defaults to: Wx::Alignment::ALIGN_LEFT)
    • verticalAlignment (Integer) (defaults to: Wx::Alignment::ALIGN_TOP)
    • textOrientation (Integer) (defaults to: Wx::Orientation::HORIZONTAL)


2556
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 2556

def draw_text_rectangle(*args) end

#each_selected_block {|selected_block| ... } ⇒ Object, Enumerator

Iterates all selected blocks passing each corresponding Wx::GRID::GridBlockCoords to the given block or returns an enumerator if no block given. Notice that the blocks returned by this method are not ordered in any particular way and may overlap. For grids using rows or columns-only selection modes, #each_selected_row_block or #each_selected_col_block can be more convenient, as they return ordered and non-overlapping blocks.

Yield Parameters:

Returns:

  • (Object, Enumerator)

    result of last block execution or an Enumerator if no block given



31
# File 'lib/wx/doc/grid/grid.rb', line 31

def each_selected_block; end

#each_selected_col_block {|selected_block| ... } ⇒ Object, Enumerator

Iterates an ordered range of non-overlapping selected columns passing each corresponding Wx::GRID::GridBlockCoords to the given block or returns an enumerator if no block given.

For the grids using GridSelectColumn selection mode, iterates (possibly none) the coordinates of non-overlapping selected column blocks in the natural order, i.e. from smallest to the biggest column indices.

Yield Parameters:

Returns:

  • (Object, Enumerator)

    result of last block execution or an Enumerator if no block given



49
# File 'lib/wx/doc/grid/grid.rb', line 49

def each_selected_col_block; end

#each_selected_row_block {|selected_block| ... } ⇒ Object, Enumerator

Iterates an ordered range of non-overlapping selected rows passing each corresponding Wx::GRID::GridBlockCoords to the given block or returns an enumerator if no block given.

For the grids using GridSelectRows selection mode, iterates (possibly none) the coordinates of non-overlapping selected row blocks in the natural order, i.e. from smallest to the biggest row indices.

Yield Parameters:

Returns:

  • (Object, Enumerator)

    result of last block execution or an Enumerator if no block given



40
# File 'lib/wx/doc/grid/grid.rb', line 40

def each_selected_row_block; end

#enable_cell_edit_control(enable = true) ⇒ void

This method returns an undefined value.

Enables or disables in-place editing of grid cell data.

Enabling in-place editing generates EVT_GRID_EDITOR_SHOWN and, if it isn’t vetoed by the application, shows the in-place editor which allows the user to change the cell value. Disabling in-place editing does nothing if the in-place editor isn’t currently shown, otherwise the EVT_GRID_EDITOR_HIDDEN event is generated but, unlike the “shown” event, it can’t be vetoed and the in-place editor is dismissed unconditionally. Note that it is an error to call this function if the current cell is read-only, use #can_enable_cell_control to check for this precondition.

Parameters:

  • enable (Boolean) (defaults to: true)


740
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 740

def enable_cell_edit_control(enable=true) end

#enable_drag_cell(enable = true) ⇒ void

This method returns an undefined value.

Enables or disables cell dragging with the mouse.

Parameters:

  • enable (Boolean) (defaults to: true)


1510
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1510

def enable_drag_cell(enable=true) end

#enable_drag_col_move(enable = true) ⇒ Boolean

Enables or disables column moving by dragging with the mouse.

Note that reordering columns by dragging them is currently not supported when the grid has any frozen columns (see #freeze_to) and if this method is called with enable equal to true in this situation, it returns false without doing anything. Otherwise it returns true to indicate that it was successful.

Parameters:

  • enable (Boolean) (defaults to: true)

Returns:

  • (Boolean)


1517
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1517

def enable_drag_col_move(enable=true) end

#enable_drag_col_size(enable = true) ⇒ void

This method returns an undefined value.

Enables or disables column sizing by dragging with the mouse.

Parameters:

  • enable (Boolean) (defaults to: true)

See Also:



1532
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1532

def enable_drag_col_size(enable=true) end

#enable_drag_grid_size(enable = true) ⇒ void

This method returns an undefined value.

Enables or disables row and column resizing by dragging gridlines with the mouse.

Parameters:

  • enable (Boolean) (defaults to: true)


1537
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1537

def enable_drag_grid_size(enable=true) end

#enable_drag_row_move(enable = true) ⇒ Boolean

Enables or disables row moving by dragging with the mouse.

Note that reordering rows by dragging them is currently not supported when the grid has any frozen columns (see #freeze_to) and if this method is called with enable equal to true in this situation, it returns false without doing anything. Otherwise it returns true to indicate that it was successful.

Parameters:

  • enable (Boolean) (defaults to: true)

Returns:

  • (Boolean)


1524
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1524

def enable_drag_row_move(enable=true) end

#enable_drag_row_size(enable = true) ⇒ void

This method returns an undefined value.

Enables or disables row sizing by dragging with the mouse.

Parameters:

  • enable (Boolean) (defaults to: true)

See Also:



1545
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1545

def enable_drag_row_size(enable=true) end

#enable_editing(edit) ⇒ void

This method returns an undefined value.

Makes the grid globally editable or read-only.

If the edit argument is false this function sets the whole grid as read-only. If the argument is true the grid is set to the default state where cells may be editable. In the default state you can set single grid cells and whole rows and columns to be editable or read-only via Wx::GRID::GridCellAttr#set_read_only. For single cells you can also use the shortcut function #set_read_only. For more information about controlling grid cell attributes see the Wx::GRID::GridCellAttr class and the wxGrid Overview.

Parameters:

  • edit (Boolean)


748
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 748

def enable_editing(edit) end

#enable_grid_lines(enable = true) ⇒ void

This method returns an undefined value.

Turns the drawing of grid lines on or off.

Parameters:

  • enable (Boolean) (defaults to: true)


361
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 361

def enable_grid_lines(enable=true) end

#enable_hiding_columns(enable = true) ⇒ Boolean

Enables or disables column hiding from the header popup menu.

Note that currently the popup menu can only be shown when using HeaderCtrl, i.e. if #use_native_col_header had been called. If the native header is not used, this method always simply returns false without doing anything, as hiding columns is not supported anyhow. If enable value is the same as #can_hide_columns, it also returns false to indicate that nothing was done. Otherwise, it returns true to indicate that the value of this option was successfully changed. The main use case for this method is to disallow hiding the columns interactively when using the native header.

Parameters:

  • enable (Boolean) (defaults to: true)

Returns:

  • (Boolean)

See Also:



1555
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1555

def enable_hiding_columns(enable=true) end

#end_batchvoid

This method returns an undefined value.

Decrements the grid’s batch count.

When the count is greater than zero repainting of the grid is suppressed. Each previous call to #begin_batch must be matched by a later call to #end_batch. Code that does a lot of grid modification can be enclosed between #begin_batch and #end_batch calls to avoid screen flicker. The final #end_batch will cause the grid to be repainted.

See Also:

  • Wx::GridUpdateLocker


2227
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 2227

def end_batch; end

#fitvoid

This method returns an undefined value.

Overridden Window method.



2231
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 2231

def fit; end

#force_refreshvoid

This method returns an undefined value.

Causes immediate repainting of the grid.

Use this instead of the usual Window#refresh.



2237
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 2237

def force_refresh; end

#freeze_to(row, col) ⇒ Boolean #freeze_to(coords) ⇒ Boolean

Overloads:

  • #freeze_to(row, col) ⇒ Boolean

    Sets or resets the frozen columns and rows.

    true on success or false if it failed.

    Note that this method doesn’t do anything, and returns false, if any of the following conditions are true:

    • Either row or col are out of range

    • Size of the frozen area would be bigger than the current viewing area

    • There are any merged cells in the area to be frozen

    • Grid uses a native header control (see #use_native_col_header)

    (some of these limitations could be lifted in the future).

    Parameters:

    • row (unsigned)

      The number of rows to freeze, 0 means to unfreeze all rows.

    • col (unsigned)

      The number of columns to freeze, 0 means to unfreeze all columns.

    Returns:

    • (Boolean)
  • #freeze_to(coords) ⇒ Boolean

    This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

    Parameters:

    • coords (Array(Integer, Integer))

    Returns:

    • (Boolean)


2220
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 2220

def freeze_to(*args) end

#get_batch_countInteger Also known as: batch_count

Returns the number of times that #begin_batch has been called without (yet) matching calls to #end_batch.

While the grid’s batch count is greater than zero the display will not be updated.

Returns:

  • (Integer)


2243
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 2243

def get_batch_count; end

#get_cell_alignment(row, col) ⇒ Array(Integer,Integer) Also known as: cell_alignment

Sets the arguments to the horizontal and vertical text alignment values for the grid cell at the specified location.

Horizontal alignment will be one of Alignment::ALIGN_LEFT, Alignment::ALIGN_CENTRE or Alignment::ALIGN_RIGHT. Vertical alignment will be one of Alignment::ALIGN_TOP, Alignment::ALIGN_CENTRE or Alignment::ALIGN_BOTTOM.

Parameters:

  • row (Integer)
  • col (Integer)

Returns:

  • (Array(Integer,Integer))


614
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 614

def get_cell_alignment(row, col) end

#get_cell_background_colour(row, col) ⇒ Wx::Colour Also known as: cell_background_colour

Returns the background colour of the cell at the specified location.

Parameters:

  • row (Integer)
  • col (Integer)

Returns:



621
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 621

def get_cell_background_colour(row, col) end

#get_cell_editor(row, col) ⇒ Wx::GRID::GridCellEditor Also known as: cell_editor

Returns a pointer to the editor for the cell at the specified location.

See Wx::GRID::GridCellEditor and the wxGrid Overview for more information about cell editors and renderers. The caller must call DecRef() on the returned pointer.

Parameters:

  • row (Integer)
  • col (Integer)

Returns:



757
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 757

def get_cell_editor(row, col) end

#get_cell_fit_mode(row, col) ⇒ Wx::GRID::GridFitMode Also known as: cell_fit_mode

Returns the cell fitting mode.

Parameters:

  • row (Integer)
  • col (Integer)

Returns:

See Also:



1058
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1058

def get_cell_fit_mode(row, col) end

#get_cell_font(row, col) ⇒ Wx::Font Also known as: cell_font

Returns the font for text in the grid cell at the specified location.

Parameters:

  • row (Integer)
  • col (Integer)

Returns:



628
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 628

def get_cell_font(row, col) end

#get_cell_highlight_colourWx::Colour Also known as: cell_highlight_colour

Returns:



2559
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 2559

def get_cell_highlight_colour; end

#get_cell_highlight_pen_widthInteger Also known as: cell_highlight_pen_width

Returns:

  • (Integer)


2563
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 2563

def get_cell_highlight_pen_width; end

#get_cell_highlight_ro_pen_widthInteger Also known as: cell_highlight_ro_pen_width

Returns:

  • (Integer)


2567
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 2567

def get_cell_highlight_ro_pen_width; end

#get_cell_overflow(row, col) ⇒ Boolean Also known as: cell_overflow

Returns true if the cell value can overflow.

This is identical to calling #get_cell_fit_mode and using Wx::GRID::GridFitMode#is_overflow on the returned value. Prefer using #get_cell_fit_mode directly in the new code.

Parameters:

  • row (Integer)
  • col (Integer)

Returns:

  • (Boolean)


1068
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1068

def get_cell_overflow(row, col) end

#get_cell_renderer(row, col) ⇒ Wx::GRID::GridCellRenderer Also known as: cell_renderer

Returns a pointer to the renderer for the grid cell at the specified location.

See Wx::GRID::GridCellRenderer and the wxGrid Overview for more information about cell editors and renderers. The caller must call DecRef() on the returned pointer.

Parameters:

  • row (Integer)
  • col (Integer)

Returns:



767
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 767

def get_cell_renderer(row, col) end

#get_cell_size(row, col) ⇒ Array(Wx::Grid::CellSpan,Integer,Integer) #get_cell_size(coords) ⇒ Wx::Size Also known as: cell_size

Overloads:

  • #get_cell_size(row, col) ⇒ Array(Wx::Grid::CellSpan,Integer,Integer)

    Get the size of the cell in number of cells covered by it.

    For normal cells, the function fills both num_rows and num_cols with 1 and returns CellSpan_None. For cells which span multiple cells, i.e. for which #set_cell_size had been called, the returned values are the same ones as were passed to #set_cell_size call and the function return value is CellSpan_Main. More unexpectedly, perhaps, the returned values may be negative for the cells which are inside a span covered by a cell occupying multiple rows or columns. They correspond to the offset of the main cell of the span from the cell passed to this functions and the function returns CellSpan_Inside value to indicate this. As an example, consider a 3*3 grid with the cell (1, 1) (the one in the middle) having a span of 2 rows and 2 columns, i.e. the grid looks like

    +----+----+----+
      |    |    |    |
      +----+----+----+
      |    |         |
      +----+         |
      |    |         |
      +----+----+----+
    

    Then the function returns 2 and 2 in num_rows and num_cols for the cell (1, 1) itself and -1 and -1 for the cell (2, 2) as well as -1 and 0 for the cell (2, 1).

    The kind of this cell span (the return value is new in wxWidgets 2.9.1, this function was void in previous wxWidgets versions).

    Parameters:

    • row (Integer)

      The row of the cell.

    • col (Integer)

      The column of the cell.

    Returns:

    • (Array(Wx::Grid::CellSpan,Integer,Integer))
  • #get_cell_size(coords) ⇒ Wx::Size

    Get the number of rows and columns allocated for this cell.

    This overload doesn’t return a CellSpan value but the values returned may still be negative, see GetCellSize(int, int, int , int ) for details.

    Parameters:

    • coords (Array(Integer, Integer))

    Returns:



1387
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1387

def get_cell_size(*args) end

#get_cell_text_colour(row, col) ⇒ Wx::Colour Also known as: cell_text_colour

Returns the text colour for the grid cell at the specified location.

Parameters:

  • row (Integer)
  • col (Integer)

Returns:



635
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 635

def get_cell_text_colour(row, col) end

#get_cell_value(row, col) ⇒ String Also known as: cell_value

Returns the string contained in the cell at the specified location.

For simple applications where a grid object automatically uses a default grid table of string values you use this function together with #set_cell_value to access cell values. For more complex applications where you have derived your own grid table class that contains various data types (e.g. numeric, boolean or user-defined custom types) then you only use this function for those cells that contain string values. See Wx::GRID::GridTableBase#can_get_value_as and the wxGrid Overview for more information.

Parameters:

  • row (Integer)
  • col (Integer)

Returns:

  • (String)


777
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 777

def get_cell_value(row, col) end

#get_col_at(colPos) ⇒ Integer Also known as: col_at

Returns the column ID of the specified column position.

Parameters:

  • colPos (Integer)

Returns:

  • (Integer)


1560
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1560

def get_col_at(colPos) end

#get_col_grid_line_pen(col) ⇒ Wx::Pen Also known as: col_grid_line_pen

Returns the pen used for vertical grid lines.

This virtual function may be overridden in derived classes in order to change the appearance of individual grid lines for the given column col. See #get_row_grid_line_pen for an example.

Parameters:

  • col (Integer)

Returns:



369
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 369

def get_col_grid_line_pen(col) end

#get_col_label_alignmentArray(Integer,Integer) Also known as: col_label_alignment

Sets the arguments to the current column label alignment values.

Horizontal alignment will be one of Alignment::ALIGN_LEFT, Alignment::ALIGN_CENTRE or Alignment::ALIGN_RIGHT. Vertical alignment will be one of Alignment::ALIGN_TOP, Alignment::ALIGN_CENTRE or Alignment::ALIGN_BOTTOM.

Returns:

  • (Array(Integer,Integer))


430
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 430

def get_col_label_alignment; end

#get_col_label_sizeInteger Also known as: col_label_size

Returns the current height of the column labels.

Returns:

  • (Integer)


1073
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1073

def get_col_label_size; end

#get_col_label_text_orientationInteger Also known as: col_label_text_orientation

Returns the orientation of the column labels (either Orientation::HORIZONTAL or Orientation::VERTICAL).

Returns:

  • (Integer)


435
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 435

def get_col_label_text_orientation; end

#get_col_label_value(col) ⇒ String Also known as: col_label_value

Returns the specified column label.

The default grid table class provides column labels of the form A,B…Z,AA,AB…ZZ,AAA… If you are using a custom grid table you can override Wx::GRID::GridTableBase#get_col_label_value to provide your own labels.

Parameters:

  • col (Integer)

Returns:

  • (String)


443
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 443

def get_col_label_value(col) end

#get_col_minimal_acceptable_widthInteger Also known as: col_minimal_acceptable_width

Returns the minimal width to which a column may be resized.

Use #set_col_minimal_acceptable_width to change this value globally or #set_col_minimal_width to do it for individual columns.

Returns:

  • (Integer)

See Also:



1081
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1081

def get_col_minimal_acceptable_width; end

#get_col_pos(colID) ⇒ Integer Also known as: col_pos

Returns the position of the specified column.

Parameters:

  • colID (Integer)

Returns:

  • (Integer)


1566
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1566

def get_col_pos(colID) end

#get_col_size(col) ⇒ Integer Also known as: col_size

Returns the width of the specified column.

Parameters:

  • col (Integer)

Returns:

  • (Integer)


1087
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1087

def get_col_size(col) end

#get_col_sizesWx::GRID::GridSizesInfo Also known as: col_sizes

Get size information for all columns at once.

This method is useful when the information about all column widths needs to be saved. The widths can be later restored using #set_col_sizes.



1319
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1319

def get_col_sizes; end

#get_corner_label_alignmentArray(Integer,Integer) Also known as: corner_label_alignment

Sets the arguments to the current corner label alignment values.

Horizontal alignment will be one of Alignment::ALIGN_LEFT, Alignment::ALIGN_CENTRE or Alignment::ALIGN_RIGHT. Vertical alignment will be one of Alignment::ALIGN_TOP, Alignment::ALIGN_CENTRE or Alignment::ALIGN_BOTTOM.

Returns:

  • (Array(Integer,Integer))


451
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 451

def get_corner_label_alignment; end

#get_corner_label_text_orientationInteger Also known as: corner_label_text_orientation

Returns the orientation of the corner label (either Orientation::HORIZONTAL or Orientation::VERTICAL).

Returns:

  • (Integer)


456
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 456

def get_corner_label_text_orientation; end

#get_corner_label_valueString Also known as: corner_label_value

Returns the (top-left) corner label.

Returns:

  • (String)


461
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 461

def get_corner_label_value; end

#get_default_cell_alignmentArray(Integer,Integer) Also known as: default_cell_alignment

Returns the default cell alignment.

Horizontal alignment will be one of Alignment::ALIGN_LEFT, Alignment::ALIGN_CENTRE or Alignment::ALIGN_RIGHT. Vertical alignment will be one of Alignment::ALIGN_TOP, Alignment::ALIGN_CENTRE or Alignment::ALIGN_BOTTOM.

Returns:

  • (Array(Integer,Integer))

See Also:



644
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 644

def get_default_cell_alignment; end

#get_default_cell_background_colourWx::Colour Also known as: default_cell_background_colour

Returns the current default background colour for grid cells.

Returns:



649
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 649

def get_default_cell_background_colour; end

#get_default_cell_fit_modeWx::GRID::GridFitMode Also known as: default_cell_fit_mode

Returns the default cell fitting mode.

The default mode is “overflow”, but can be modified using #set_default_cell_fit_mode.



1101
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1101

def get_default_cell_fit_mode; end

#get_default_cell_fontWx::Font Also known as: default_cell_font

Returns the current default font for grid cell text.

Returns:



654
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 654

def get_default_cell_font; end

#get_default_cell_overflowBoolean Also known as: default_cell_overflow

Returns true if the cells can overflow by default.

This is identical to calling #get_default_cell_fit_mode and using Wx::GRID::GridFitMode#is_overflow on the returned value. Prefer using #get_default_cell_fit_mode directly in the new code.

Returns:

  • (Boolean)


1109
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1109

def get_default_cell_overflow; end

#get_default_cell_text_colourWx::Colour Also known as: default_cell_text_colour

Returns the current default colour for grid cell text.

Returns:



659
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 659

def get_default_cell_text_colour; end

#get_default_col_label_sizeInteger Also known as: default_col_label_size

Returns the default height for column labels.

Returns:

  • (Integer)


1114
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1114

def get_default_col_label_size; end

#get_default_col_sizeInteger Also known as: default_col_size

Returns the current default width for grid columns.

Returns:

  • (Integer)


1119
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1119

def get_default_col_size; end

#get_default_editorWx::GRID::GridCellEditor Also known as: default_editor

Returns a pointer to the current default grid cell editor.

See Wx::GRID::GridCellEditor and the wxGrid Overview for more information about cell editors and renderers.



784
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 784

def get_default_editor; end

#get_default_editor_for_cell(row, col) ⇒ Wx::GRID::GridCellEditor Also known as: default_editor_for_cell

Returns the default editor for the specified cell.

The base class version returns the editor appropriate for the current cell type but this method may be overridden in the derived classes to use custom editors for some cells by default. Notice that the same may be achieved in a usually simpler way by associating a custom editor with the given cell or cells. The caller must call DecRef() on the returned pointer.

Parameters:

  • row (Integer)
  • col (Integer)

Returns:



795
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 795

def get_default_editor_for_cell(row, col) end

#get_default_editor_for_type(typeName) ⇒ Wx::GRID::GridCellEditor Also known as: default_editor_for_type

Returns the default editor for the cells containing values of the given type.

The base class version returns the editor which was associated with the specified typeName when it was registered #register_data_type but this function may be overridden to return something different. This allows overriding an editor used for one of the standard types. The caller must call DecRef() on the returned pointer.

Parameters:

  • typeName (String)

Returns:



804
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 804

def get_default_editor_for_type(typeName) end

#get_default_grid_line_penWx::Pen Also known as: default_grid_line_pen

Returns the pen used for grid lines.

This virtual function may be overridden in derived classes in order to change the appearance of grid lines. Note that currently the pen width must be 1.



378
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 378

def get_default_grid_line_pen; end

#get_default_rendererWx::GRID::GridCellRenderer Also known as: default_renderer

Returns a pointer to the current default grid cell renderer.

See Wx::GRID::GridCellRenderer and the wxGrid Overview for more information about cell editors and renderers. The caller must call DecRef() on the returned pointer.



812
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 812

def get_default_renderer; end

#get_default_renderer_for_cell(row, col) ⇒ Wx::GRID::GridCellRenderer Also known as: default_renderer_for_cell

Returns the default renderer for the given cell.

The base class version returns the renderer appropriate for the current cell type but this method may be overridden in the derived classes to use custom renderers for some cells by default. The caller must call DecRef() on the returned pointer.

Parameters:

  • row (Integer)
  • col (Integer)

Returns:



822
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 822

def get_default_renderer_for_cell(row, col) end

#get_default_renderer_for_type(typeName) ⇒ Wx::GRID::GridCellRenderer Also known as: default_renderer_for_type

Returns the default renderer for the cell containing values of the given type.

Parameters:

  • typeName (String)

Returns:

See Also:



831
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 831

def get_default_renderer_for_type(typeName) end

#get_default_row_label_sizeInteger Also known as: default_row_label_size

Returns the default width for the row labels.

Returns:

  • (Integer)


1124
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1124

def get_default_row_label_size; end

#get_default_row_sizeInteger Also known as: default_row_size

Returns the current default height for grid rows.

Returns:

  • (Integer)


1129
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1129

def get_default_row_size; end

#get_first_fully_visible_columnInteger Also known as: first_fully_visible_column

Returns the leftmost column of the current visible area.

Returns -1 if the grid doesn’t have any columns.

Returns:

  • (Integer)


1977
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1977

def get_first_fully_visible_column; end

#get_first_fully_visible_rowInteger Also known as: first_fully_visible_row

Returns the topmost row of the current visible area.

Returns -1 if the grid doesn’t have any rows.

Returns:

  • (Integer)


1970
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1970

def get_first_fully_visible_row; end

#get_frozen_col_grid_windowWx::Window Also known as: frozen_col_grid_window

Return the columns grid window containing column frozen cells.

This window is shown only when there are frozen columns.

Returns:



2473
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 2473

def get_frozen_col_grid_window; end

#get_frozen_corner_grid_windowWx::Window Also known as: frozen_corner_grid_window

Return the corner grid window containing frozen cells.

This window is shown only when there are frozen rows and columns.

Returns:



2459
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 2459

def get_frozen_corner_grid_window; end

#get_frozen_row_grid_windowWx::Window Also known as: frozen_row_grid_window

Return the rows grid window containing row frozen cells.

This window is shown only when there are frozen rows.

Returns:



2466
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 2466

def get_frozen_row_grid_window; end

#get_grid_col_headerWx::HeaderCtrl Also known as: grid_col_header

Return the header control used for column labels display.

This function can only be called if #use_native_col_header had been called.



2503
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 2503

def get_grid_col_header; end

#get_grid_col_label_windowWx::Window Also known as: grid_col_label_window

Return the column labels window.

This window is not shown if the columns labels were hidden using #hide_col_labels. Depending on whether #use_native_col_header was called or not this can be either a HeaderCtrl or a plain Window. This function returns a valid window pointer in either case but in the former case you can also use #get_grid_col_header to access it if you need HeaderCtrl-specific functionality.

Returns:



2488
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 2488

def get_grid_col_label_window; end

#get_grid_corner_label_windowWx::Window Also known as: grid_corner_label_window

Return the window in the top left grid corner.

This window is shown only of both columns and row labels are shown and normally doesn’t contain anything. Clicking on it is handled by Wx::GRID::Grid however and can be used to select the entire grid.

Returns:



2495
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 2495

def get_grid_corner_label_window; end

#get_grid_cursor_colInteger Also known as: grid_cursor_col

Returns the current grid cell column position.

Returns:

  • (Integer)

See Also:



1629
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1629

def get_grid_cursor_col; end

#get_grid_cursor_coordsArray(Integer, Integer) Also known as: grid_cursor_coords

Returns the current grid cursor position.

If grid cursor doesn’t have any valid position (e.g. if the grid is completely empty and doesn’t have any rows or columns), returns Wx::GridNoCellCoords which has both row and columns set to -1.

Returns:

  • (Array(Integer, Integer))


1621
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1621

def get_grid_cursor_coords; end

#get_grid_cursor_rowInteger Also known as: grid_cursor_row

Returns the current grid cell row position.

Returns:

  • (Integer)

See Also:



1637
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1637

def get_grid_cursor_row; end

#get_grid_line_colourWx::Colour Also known as: grid_line_colour

Returns the colour used for grid lines.

Returns:

See Also:



386
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 386

def get_grid_line_colour; end

#get_grid_row_label_windowWx::Window Also known as: grid_row_label_window

Return the row labels window.

This window is not shown if the row labels were hidden using #hide_row_labels.

Returns:



2480
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 2480

def get_grid_row_label_window; end

#get_grid_windowWx::Window Also known as: grid_window

Return the main grid window containing the grid cells.

This window is always shown.

Returns:



2452
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 2452

def get_grid_window; end

#get_grid_window_offset(gridWindow) ⇒ Wx::Point Also known as: grid_window_offset

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters:

Returns:



2048
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 2048

def get_grid_window_offset(gridWindow) end

#get_label_background_colourWx::Colour Also known as: label_background_colour

Returns the colour used for the background of row and column labels.

Returns:



466
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 466

def get_label_background_colour; end

#get_label_fontWx::Font Also known as: label_font

Returns the font used for row and column labels.

Returns:



471
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 471

def get_label_font; end

#get_label_text_colourWx::Colour Also known as: label_text_colour

Returns the colour used for row and column label text.

Returns:



476
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 476

def get_label_text_colour; end

#get_number_colsInteger Also known as: number_cols

Returns the total number of grid columns.

This is the same as the number of columns in the underlying grid table.

Returns:

  • (Integer)


2250
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 2250

def get_number_cols; end

#get_number_frozen_colsInteger Also known as: number_frozen_cols

Returns the number of frozen grid columns.

If there are no frozen columns, returns 0.

Returns:

  • (Integer)

See Also:



2265
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 2265

def get_number_frozen_cols; end

#get_number_frozen_rowsInteger Also known as: number_frozen_rows

Returns the number of frozen grid rows.

If there are no frozen rows, returns 0.

Returns:

  • (Integer)

See Also:



2273
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 2273

def get_number_frozen_rows; end

#get_number_rowsInteger Also known as: number_rows

Returns the total number of grid rows.

This is the same as the number of rows in the underlying grid table.

Returns:

  • (Integer)


2257
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 2257

def get_number_rows; end

#get_or_create_cell_attr(row, col) ⇒ Wx::GRID::GridCellAttr Also known as: or_create_cell_attr

Returns the attribute for the given cell creating one if necessary.

If the cell already has an attribute, it is returned. Otherwise a new attribute is created, associated with the cell and returned. In any case the caller must call DecRef() on the returned pointer. Prefer to use get_or_create_cell_attr_ptr to avoid the need to call DecRef() on the returned pointer. This function may only be called if can_have_attributes returns true.

Parameters:

  • row (Integer)
  • col (Integer)

Returns:



2284
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 2284

def get_or_create_cell_attr(row, col) end

#get_row_at(rowPos) ⇒ Integer Also known as: row_at

Returns the row ID of the specified row position.

Parameters:

  • rowPos (Integer)

Returns:

  • (Integer)


1590
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1590

def get_row_at(rowPos) end

#get_row_grid_line_pen(row) ⇒ Wx::Pen Also known as: row_grid_line_pen

Returns the pen used for horizontal grid lines.

This virtual function may be overridden in derived classes in order to change the appearance of individual grid line for the given row. Example:

class MidiGrid < Wx::GRID::Grid

    # ...

    # in a grid displaying music notation, use a solid black pen between
    # octaves (C0=row 127, C1=row 115 etc.)
    def get_row_grid_line_pen(row)
      if row % 12 == 7 
        Wx::Pen.new(Wx::BLACK, 1, Wx::PENSTYLE_SOLID)
      else
        get_default_grid_line_pen
      end
    end

  end

Parameters:

  • row (Integer)

Returns:



412
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 412

def get_row_grid_line_pen(row) end

#get_row_label_alignmentArray(Integer,Integer) Also known as: row_label_alignment

Returns the alignment used for row labels.

Horizontal alignment will be one of Alignment::ALIGN_LEFT, Alignment::ALIGN_CENTRE or Alignment::ALIGN_RIGHT. Vertical alignment will be one of Alignment::ALIGN_TOP, Alignment::ALIGN_CENTRE or Alignment::ALIGN_BOTTOM.

Returns:

  • (Array(Integer,Integer))


484
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 484

def get_row_label_alignment; end

#get_row_label_sizeInteger Also known as: row_label_size

Returns the current width of the row labels.

Returns:

  • (Integer)


1142
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1142

def get_row_label_size; end

#get_row_label_value(row) ⇒ String Also known as: row_label_value

Returns the specified row label.

The default grid table class provides numeric row labels. If you are using a custom grid table you can override Wx::GRID::GridTableBase#get_row_label_value to provide your own labels.

Parameters:

  • row (Integer)

Returns:

  • (String)


492
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 492

def get_row_label_value(row) end

#get_row_minimal_acceptable_heightInteger Also known as: row_minimal_acceptable_height

Returns the minimal size to which rows can be resized.

Use #set_row_minimal_acceptable_height to change this value globally or #set_row_minimal_height to do it for individual cells.

Returns:

  • (Integer)

See Also:



1137
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1137

def get_row_minimal_acceptable_height; end

#get_row_pos(rowID) ⇒ Integer Also known as: row_pos

Returns the position of the specified row.

Parameters:

  • rowID (Integer)

Returns:

  • (Integer)


1596
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1596

def get_row_pos(rowID) end

#get_row_size(row) ⇒ Integer Also known as: row_size

Returns the height of the specified row.

Parameters:

  • row (Integer)

Returns:

  • (Integer)


1148
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1148

def get_row_size(row) end

#get_row_sizesWx::GRID::GridSizesInfo Also known as: row_sizes

Get size information for all row at once.



1328
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1328

def get_row_sizes; end

#get_scroll_line_xInteger Also known as: scroll_line_x

Returns the number of pixels per horizontal scroll increment.

The default is 15.



1935
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1935

def get_scroll_line_x; end

#get_scroll_line_yInteger Also known as: scroll_line_y

Returns the number of pixels per vertical scroll increment.

The default is 15.



1945
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1945

def get_scroll_line_y; end

#get_selected_blocksArray<Wx::GRID::GridBlockCoords> Also known as: selected_blocks

Returns a range of grid selection blocks.

The returned range can be iterated over, e.g. with C++11 range-for loop:

grid.get_selected_blocks.each do |gbc|
    break if gbc.intersects(my_block)
  end

Notice that the blocks returned by this method are not ordered in any particular way and may overlap. For grids using rows or columns-only selection modes, #get_selected_row_blocks or #get_selected_col_blocks can be more convenient, as they return ordered and non-overlapping blocks.

Returns:



1780
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1780

def get_selected_blocks; end

#get_selected_cellsArray<Array(Integer, Integer)> Also known as: selected_cells

Returns an array of individually selected cells.

Notice that this array does not contain all the selected cells in general as it doesn’t include the cells selected as part of column, row or block selection. You must use this method, #get_selected_cols, #get_selected_rows and #get_selection_block_top_left and #get_selection_block_bottom_right methods to obtain the entire selection in general. Please notice this behaviour is by design and is needed in order to support grids of arbitrary size (when an entire column is selected in a grid with a million of columns, we don’t want to create an array with a million of entries in this function, instead it returns an empty array and #get_selected_cols returns an array containing one element). The function can be slow for the big grids, use #get_selected_blocks in the new code.

Returns:

  • (Array<Array(Integer, Integer)>)


1808
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1808

def get_selected_cells; end

#get_selected_col_blocksArray<Wx::GRID::GridBlockCoords> Also known as: selected_col_blocks

Returns an ordered range of non-overlapping selected columns.

This method is symmetric to #get_selected_row_blocks, but is useful only in Wx::GRID::Grid::GridSelectionModes::GridSelectColumns selection mode.

Returns:

See Also:



1799
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1799

def get_selected_col_blocks; end

#get_selected_colsArray<Integer> Also known as: selected_cols

Returns an array of selected columns.

Please notice that this method alone is not sufficient to find all the selected columns as it contains only the columns which were individually selected but not those being part of the block selection or being selected in virtue of all of their cells being selected individually, please see #get_selected_cells for more details. The function can be slow for the big grids, use #get_selected_blocks in the new code.

Returns:

  • (Array<Integer>)


1816
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1816

def get_selected_cols; end

#get_selected_row_blocksArray<Wx::GRID::GridBlockCoords> Also known as: selected_row_blocks

Returns an ordered range of non-overlapping selected rows.

For the grids using Wx::GRID::Grid::GridSelectionModes::GridSelectRows selection mode, returns the possibly empty vector containing the coordinates of non-overlapping selected row blocks in the natural order, i.e. from smallest to the biggest row indices. To see the difference between this method and #get_selected_blocks, consider the case when the user selects rows 2..4 in the grid and then also selects (using Ctrl/Shift keys) the rows 1..3. Iterating over the result of #get_selected_blocks would yield two blocks directly corresponding to the users selection, while this method returns a vector with a single element corresponding to the rows 1..4. This method returns empty vector for the other selection modes.



1791
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1791

def get_selected_row_blocks; end

#get_selected_rowsArray<Integer> Also known as: selected_rows

Returns an array of selected rows.

Please notice that this method alone is not sufficient to find all the selected rows as it contains only the rows which were individually selected but not those being part of the block selection or being selected in virtue of all of their cells being selected individually, please see #get_selected_cells for more details. The function can be slow for the big grids, use #get_selected_blocks in the new code.

Returns:

  • (Array<Integer>)


1824
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1824

def get_selected_rows; end

#get_selection_backgroundWx::Colour Also known as: selection_background

Returns the colour used for drawing the selection background.

Returns:



1829
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1829

def get_selection_background; end

#get_selection_block_bottom_rightArray<Array(Integer, Integer)> Also known as: selection_block_bottom_right

Returns an array of the bottom right corners of blocks of selected cells.

Please see #get_selected_cells for more information about the selection representation in Wx::GRID::Grid. The function can be slow for the big grids, use #get_selected_blocks in the new code.

Returns:

  • (Array<Array(Integer, Integer)>)

See Also:



1838
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1838

def get_selection_block_bottom_right; end

#get_selection_block_top_leftArray<Array(Integer, Integer)> Also known as: selection_block_top_left

Returns an array of the top left corners of blocks of selected cells.

Please see #get_selected_cells for more information about the selection representation in Wx::GRID::Grid. The function can be slow for the big grids, use #get_selected_blocks in the new code.

Returns:

  • (Array<Array(Integer, Integer)>)

See Also:



1847
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1847

def get_selection_block_top_left; end

#get_selection_foregroundWx::Colour Also known as: selection_foreground

Returns the colour used for drawing the selection foreground.

Returns:



1852
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1852

def get_selection_foreground; end

#get_selection_modeWx::Grid::GridSelectionModes Also known as: selection_mode

Returns the current selection mode.

Returns:

  • (Wx::Grid::GridSelectionModes)

See Also:



1860
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1860

def get_selection_mode; end

#get_sorting_columnInteger Also known as: sorting_column

Return the column in which the sorting indicator is currently displayed.

Returns NOT_FOUND if sorting indicator is not currently displayed at all.

Returns:

  • (Integer)

See Also:



2411
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 2411

def get_sorting_column; end

#get_tableWx::GRID::GridTableBase Also known as: table

Returns a base pointer to the current table object.

The returned pointer is still owned by the grid.



2291
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 2291

def get_table; end

#go_to_cell(row, col) ⇒ void #go_to_cell(coords) ⇒ void

Overloads:

  • #go_to_cell(row, col) ⇒ void

    This method returns an undefined value.

    Make the given cell current and ensure it is visible.

    This method is equivalent to calling #make_cell_visible and #set_grid_cursor and so, as with the latter, a EVT_GRID_SELECT_CELL event is generated by it and the selected cell doesn’t change if the event is vetoed.

    Parameters:

    • row (Integer)
    • col (Integer)
  • #go_to_cell(coords) ⇒ void

    This method returns an undefined value.

    Make the given cell current and ensure it is visible.

    This method is equivalent to calling #make_cell_visible and #set_grid_cursor and so, as with the latter, a EVT_GRID_SELECT_CELL event is generated by it and the selected cell doesn’t change if the event is vetoed.

    Parameters:

    • coords (Array(Integer, Integer))


1653
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1653

def go_to_cell(*args) end

#grid_lines_enabledBoolean

Returns true if drawing of grid lines is turned on, false otherwise.

Returns:

  • (Boolean)


417
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 417

def grid_lines_enabled; end

#hide_cell_edit_controlvoid

This method returns an undefined value.

Hides the in-place cell edit control.



836
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 836

def hide_cell_edit_control; end

#hide_col(col) ⇒ void

This method returns an undefined value.

Hides the specified column.

To show the column later you need to call #set_col_size with non-0 width or #show_col to restore the previous column width. If the column is already hidden, this method doesn’t do anything.

Parameters:

  • col (Integer)

    The column index.



1214
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1214

def hide_col(col) end

#hide_col_labelsvoid

This method returns an undefined value.

Hides the column labels by calling #set_col_label_size with a size of 0.

The labels can be shown again by calling #set_col_label_size with a height greater than 0. Note that when the column labels are hidden, the grid won’t have any visible border on the top side, which may result in a less than ideal appearance. Because of this, you may want to create the grid window with a border style, such as Border::BORDER_SIMPLE, when you don’t plan to show the column labels for it.

See Also:



501
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 501

def hide_col_labels; end

#hide_row(col) ⇒ void

This method returns an undefined value.

Hides the specified row.

To show the row later you need to call #set_row_size with non-0 width or #show_row to restore its original height. If the row is already hidden, this method doesn’t do anything.

Parameters:

  • col (Integer)

    The row index.



1301
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1301

def hide_row(col) end

#hide_row_labelsvoid

This method returns an undefined value.

Hides the row labels by calling #set_row_label_size with a size of 0.

The labels can be shown again by calling #set_row_label_size with a width greater than 0. See #hide_col_labels for a note explaining why you may want to use a border with a grid without the row labels.



508
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 508

def hide_row_labels; end

#insert_cols(pos = 0, numCols = 1, updateLabels = true) ⇒ Boolean

Inserts one or more new columns into a grid with the first new column at the specified position.

Notice that inserting the columns in the grid requires grid table cooperation: when this method is called, grid object begins by requesting the underlying grid table to insert new columns. If this is successful the table notifies the grid and the grid updates the display. For a default grid (one where you have called #create_grid) this process is automatic. If you are using a custom grid table (specified with #set_table or #assign_table) then you must override Wx::GRID::GridTableBase#insert_cols in your derived table class.

true if the columns were successfully inserted, false if an error occurred (most likely the table couldn’t be updated).

Parameters:

  • pos (Integer) (defaults to: 0)

    The position which the first newly inserted column will have.

  • numCols (Integer) (defaults to: 1)

    The number of columns to insert.

  • updateLabels (Boolean) (defaults to: true)

    Currently not used.

Returns:

  • (Boolean)


2303
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 2303

def insert_cols(pos=0, numCols=1, updateLabels=true) end

#insert_rows(pos = 0, numRows = 1, updateLabels = true) ⇒ Boolean

Inserts one or more new rows into a grid with the first new row at the specified position.

Notice that you must implement Wx::GRID::GridTableBase#insert_rows if you use a grid with a custom table, please see #insert_cols for more information.

true if the rows were successfully inserted, false if an error occurred (most likely the table couldn’t be updated).

Parameters:

  • pos (Integer) (defaults to: 0)

    The position which the first newly inserted row will have.

  • numRows (Integer) (defaults to: 1)

    The number of rows to insert.

  • updateLabels (Boolean) (defaults to: true)

    Currently not used.

Returns:

  • (Boolean)


2314
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 2314

def insert_rows(pos=0, numRows=1, updateLabels=true) end

#is_cell_edit_control_enabledBoolean Also known as: cell_edit_control_enabled?

Returns true if the in-place edit control is currently enabled.

Returns:

  • (Boolean)


840
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 840

def is_cell_edit_control_enabled; end

#is_cell_edit_control_shownBoolean Also known as: cell_edit_control_shown?

Returns true if the in-place edit control is currently shown.

Returns:

  • (Boolean)

See Also:



848
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 848

def is_cell_edit_control_shown; end

#is_col_shown(col) ⇒ Boolean Also known as: col_shown?

Returns true if the specified column is not currently hidden.

Parameters:

  • col (Integer)

Returns:

  • (Boolean)


1093
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1093

def is_col_shown(col) end

#is_current_cell_read_onlyBoolean Also known as: current_cell_read_only?

Returns true if the current cell is read-only.

Returns:

  • (Boolean)

See Also:



857
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 857

def is_current_cell_read_only; end

#is_editableBoolean Also known as: editable?

Returns false if the whole grid has been set as read-only or true otherwise.

See #enable_editing for more information about controlling the editing status of grid cells.

Returns:

  • (Boolean)


864
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 864

def is_editable; end

#is_in_selection(row, col) ⇒ Boolean Also known as: in_selection?

Returns true if the given cell is selected.

Parameters:

  • row (Integer)
  • col (Integer)

Returns:

  • (Boolean)


1867
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1867

def is_in_selection(row, col) end

#is_read_only(row, col) ⇒ Boolean Also known as: read_only?

Returns true if the cell at the specified location can’t be edited.

Parameters:

  • row (Integer)
  • col (Integer)

Returns:

  • (Boolean)

See Also:



875
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 875

def is_read_only(row, col) end

#is_row_shown(row) ⇒ Boolean Also known as: row_shown?

Returns true if the specified row is not currently hidden.

Parameters:

  • row (Integer)

Returns:

  • (Boolean)


1154
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1154

def is_row_shown(row) end

#is_selectionBoolean Also known as: selection?

Returns true if there are currently any selected cells, rows, columns or blocks.

Returns:

  • (Boolean)


1872
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1872

def is_selection; end

#is_sort_order_ascendingBoolean Also known as: sort_order_ascending?

Return true if the current sorting order is ascending or false if it is descending.

It only makes sense to call this function if #get_sorting_column returns a valid column index and not NOT_FOUND.

Returns:

  • (Boolean)

See Also:



2428
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 2428

def is_sort_order_ascending; end

#is_sorting_by(col) ⇒ Boolean Also known as: sorting_by?

Return true if this column is currently used for sorting.

Parameters:

  • col (Integer)

Returns:

  • (Boolean)

See Also:



2420
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 2420

def is_sorting_by(col) end

#is_using_native_headerBoolean Also known as: using_native_header?

Return true if native header control is currently being used.

Returns:

  • (Boolean)


2508
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 2508

def is_using_native_header; end

#is_visible(row, col, wholeCellVisible = true) ⇒ Boolean Also known as: visible?

Returns true if a cell is either entirely or at least partially visible in the grid window.

By default, the cell must be entirely visible for this function to return true but if wholeCellVisible is false, the function returns true even if the cell is only partially visible.

Parameters:

  • row (Integer)
  • col (Integer)
  • wholeCellVisible (Boolean) (defaults to: true)

Returns:

  • (Boolean)


1955
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1955

def is_visible(row, col, wholeCellVisible=true) end

#make_cell_visible(row, col) ⇒ void

This method returns an undefined value.

Brings the specified cell into the visible grid cell area with minimal scrolling.

Does nothing if the cell is already visible.

Parameters:

  • row (Integer)
  • col (Integer)


1964
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1964

def make_cell_visible(row, col) end

#move_cursor_down(expandSelection) ⇒ Boolean

Moves the grid cursor down by one row.

If a block of cells was previously selected it will expand if the argument is true or be cleared if the argument is false.

Parameters:

  • expandSelection (Boolean)

Returns:

  • (Boolean)


1660
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1660

def move_cursor_down(expandSelection) end

#move_cursor_down_block(expandSelection) ⇒ Boolean

Moves the grid cursor down in the current column such that it skips to the beginning or end of a block of non-empty cells.

If a block of cells was previously selected it will expand if the argument is true or be cleared if the argument is false.

Parameters:

  • expandSelection (Boolean)

Returns:

  • (Boolean)


1667
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1667

def move_cursor_down_block(expandSelection) end

#move_cursor_left(expandSelection) ⇒ Boolean

Moves the grid cursor left by one column.

If a block of cells was previously selected it will expand if the argument is true or be cleared if the argument is false.

Parameters:

  • expandSelection (Boolean)

Returns:

  • (Boolean)


1674
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1674

def move_cursor_left(expandSelection) end

#move_cursor_left_block(expandSelection) ⇒ Boolean

Moves the grid cursor left in the current row such that it skips to the beginning or end of a block of non-empty cells.

If a block of cells was previously selected it will expand if the argument is true or be cleared if the argument is false.

Parameters:

  • expandSelection (Boolean)

Returns:

  • (Boolean)


1681
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1681

def move_cursor_left_block(expandSelection) end

#move_cursor_right(expandSelection) ⇒ Boolean

Moves the grid cursor right by one column.

If a block of cells was previously selected it will expand if the argument is true or be cleared if the argument is false.

Parameters:

  • expandSelection (Boolean)

Returns:

  • (Boolean)


1688
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1688

def move_cursor_right(expandSelection) end

#move_cursor_right_block(expandSelection) ⇒ Boolean

Moves the grid cursor right in the current row such that it skips to the beginning or end of a block of non-empty cells.

If a block of cells was previously selected it will expand if the argument is true or be cleared if the argument is false.

Parameters:

  • expandSelection (Boolean)

Returns:

  • (Boolean)


1695
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1695

def move_cursor_right_block(expandSelection) end

#move_cursor_up(expandSelection) ⇒ Boolean

Moves the grid cursor up by one row.

If a block of cells was previously selected it will expand if the argument is true or be cleared if the argument is false.

Parameters:

  • expandSelection (Boolean)

Returns:

  • (Boolean)


1702
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1702

def move_cursor_up(expandSelection) end

#move_cursor_up_block(expandSelection) ⇒ Boolean

Moves the grid cursor up in the current column such that it skips to the beginning or end of a block of non-empty cells.

If a block of cells was previously selected it will expand if the argument is true or be cleared if the argument is false.

Parameters:

  • expandSelection (Boolean)

Returns:

  • (Boolean)


1709
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1709

def move_cursor_up_block(expandSelection) end

#move_page_downBoolean

Moves the grid cursor down by some number of rows so that the previous bottom visible row becomes the top visible row.

Returns:

  • (Boolean)


1713
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1713

def move_page_down; end

#move_page_upBoolean

Moves the grid cursor up by some number of rows so that the previous top visible row becomes the bottom visible row.

Returns:

  • (Boolean)


1717
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1717

def move_page_up; end

#process_table_message(msg) ⇒ Boolean

Receive and handle a message from the table.

Parameters:

Returns:

  • (Boolean)


356
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 356

def process_table_message(msg) end

#refresh_attr(row, col) ⇒ void

This method returns an undefined value.

Invalidates the cached attribute for the given cell.

For efficiency reasons, Wx::GRID::Grid may cache the recently used attributes (currently it caches only the single most recently used one, in fact) which can result in the cell appearance not being refreshed even when the attribute returned by your custom Wx::GridCellAttrProvider-derived class has changed. To force the grid to refresh the cell attribute, this function may be used. Notice that calling it will not result in actually redrawing the cell, you still need to call Window#refresh_rect to invalidate the area occupied by the cell in the window to do this. Also note that you don’t need to call this function if you store the attributes in Wx::GRID::Grid itself, i.e. use its #set_attr and similar methods, it is only useful when using a separate custom attributes provider.

Parameters:

  • row (Integer)

    The row of the cell whose attribute needs to be queried again.

  • col (Integer)

    The column of the cell whose attribute needs to be queried again.



2322
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 2322

def refresh_attr(row, col) end

#refresh_block(topLeft, bottomRight) ⇒ void #refresh_block(topRow, leftCol, bottomRow, rightCol) ⇒ void

Overloads:

  • #refresh_block(topLeft, bottomRight) ⇒ void

    This method returns an undefined value.

    Redraw all the cells in the given block.

    Refresh the block of cells with the given corners. If the bottom right corner coordinates are invalid, i.e. set to -1, the top left corner coordinates are used for it, i.e. just a single cell is refreshed. If the top left corner coordinates are invalid as well, the function simply returns without doing anything. Note, however, that both coordinates need to be valid or invalid simultaneously, i.e. setting the top row to -1 but using a valid value for the left column is unsupported and would result in an assertion failure.

    Parameters:

    • topLeft (Array(Integer, Integer))
    • bottomRight (Array(Integer, Integer))
  • #refresh_block(topRow, leftCol, bottomRow, rightCol) ⇒ void

    This method returns an undefined value.

    This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

    Parameters:

    • topRow (Integer)
    • leftCol (Integer)
    • bottomRow (Integer)
    • rightCol (Integer)


2339
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 2339

def refresh_block(*args) end

#register_data_type(typeName, renderer, editor) ⇒ void

This method returns an undefined value.

Register a new data type.

The data types allow to naturally associate specific renderers and editors to the cells containing values of the given type. For example, the grid automatically registers a data type with the name Wx::GRID::GRID_VALUE_STRING which uses Wx::GRID::GridCellStringRenderer and Wx::GRID::GridCellTextEditor as its renderer and editor respectively this is the data type used by all the cells of the default Wx::GRID::GridStringTable, so this renderer and editor are used by default for all grid cells. However if a custom table returns Wx::GRID::GRID_VALUE_BOOL from its Wx::GRID::GridTableBase#get_type_name method, then Wx::GRID::GridCellBoolRenderer and Wx::GRID::GridCellBoolEditor are used for it because the grid also registers a boolean data type with this name. And as this mechanism is completely generic, you may register your own data types using your own custom renderers and editors. Just remember that the table must identify a cell as being of the given type for them to be used for this cell.

Parameters:



887
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 887

def register_data_type(typeName, renderer, editor) end

#render(dc, pos = Wx::DEFAULT_POSITION, size = Wx::DEFAULT_SIZE, topLeft = (Wx::GridCellCoords.new(-1, -1)), bottomRight = (Wx::GridCellCoords.new(-1, -1)), style = Wx::GRID::GridRenderStyle::GRID_DRAW_DEFAULT) ⇒ void

This method returns an undefined value.

Draws part or all of a Wx::GRID::Grid on a DC for printing or display.

Pagination can be accomplished by using sequential #render calls with appropriate values in Wx::GridCellCoords topLeft and bottomRight.

Parameters:

  • dc (Wx::DC)

    The DC to be drawn on.

  • pos (Array(Integer, Integer), Wx::Point) (defaults to: Wx::DEFAULT_POSITION)

    The position on the DC where rendering should begin. If not specified drawing will begin at the DC MaxX() and MaxY().

  • size (Array(Integer, Integer), Wx::Size) (defaults to: Wx::DEFAULT_SIZE)

    The size of the area on the DC that the rendered Wx::GRID::Grid should occupy. If not specified the drawing will be scaled to fit the available dc width or height. The Wx::GRID::Grid‘s aspect ratio is maintained whether or not size is specified.

  • topLeft (Array(Integer, Integer)) (defaults to: (Wx::GridCellCoords.new(-1, -1)))

    The top left cell of the block to be drawn. Defaults to ( 0, 0 ).

  • bottomRight (Array(Integer, Integer)) (defaults to: (Wx::GridCellCoords.new(-1, -1)))

    The bottom right cell of the block to be drawn. Defaults to row and column counts.

  • style (Integer) (defaults to: Wx::GRID::GridRenderStyle::GRID_DRAW_DEFAULT)

    A combination of values from Wx::GRID::GridRenderStyle.



2351
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 2351

def render(dc, pos=Wx::DEFAULT_POSITION, size=Wx::DEFAULT_SIZE, topLeft=(Wx::GridCellCoords.new(-1, -1)), bottomRight=(Wx::GridCellCoords.new(-1, -1)), style=Wx::GRID::GridRenderStyle::GRID_DRAW_DEFAULT) end

#reset_col_posvoid

This method returns an undefined value.

Resets the position of the columns to the default.



1585
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1585

def reset_col_pos; end

#reset_row_posvoid

This method returns an undefined value.

Resets the position of the rows to the default.



1615
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1615

def reset_row_pos; end

#save_edit_control_valuevoid

This method returns an undefined value.

Sets the value of the current grid cell to the current in-place edit control value.

This is called automatically when the grid cursor moves from the current cell to a new cell. It is also a good idea to call this function when closing a grid since any edits to the final cell location will not be saved otherwise.



893
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 893

def save_edit_control_value; end

#select_allvoid

This method returns an undefined value.

Selects all cells in the grid.



1877
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1877

def select_all; end

#select_block(topRow, leftCol, bottomRow, rightCol, addToSelected = false) ⇒ void

This method returns an undefined value.

Selects a rectangular block of cells.

If addToSelected is false then any existing selection will be deselected; if true the column will be added to the existing selection.

Parameters:

  • topRow (Integer)
  • leftCol (Integer)
  • bottomRow (Integer)
  • rightCol (Integer)
  • addToSelected (Boolean) (defaults to: false)


1888
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1888

def select_block(topRow, leftCol, bottomRow, rightCol, addToSelected=false) end

#select_col(col, addToSelected = false) ⇒ void

This method returns an undefined value.

Selects the specified column.

If addToSelected is false then any existing selection will be deselected; if true the column will be added to the existing selection. This method won’t select anything if the current selection mode is Wx::GRID::Grid::GridSelectionModes::GridSelectRows.

Parameters:

  • col (Integer)
  • addToSelected (Boolean) (defaults to: false)


1897
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1897

def select_col(col, addToSelected=false) end

#select_row(row, addToSelected = false) ⇒ void

This method returns an undefined value.

Selects the specified row.

If addToSelected is false then any existing selection will be deselected; if true the row will be added to the existing selection. This method won’t select anything if the current selection mode is Wx::GRID::Grid::GridSelectionModes::GridSelectColumns.

Parameters:

  • row (Integer)
  • addToSelected (Boolean) (defaults to: false)


1906
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1906

def select_row(row, addToSelected=false) end

#set_attr(row, col, attr) ⇒ void

This method returns an undefined value.

Sets the cell attributes for the specified cell.

The grid takes ownership of the attribute pointer. See the Wx::GRID::GridCellAttr class for more information about controlling cell attributes.

Parameters:



2361
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 2361

def set_attr(row, col, attr) end

#set_cell_alignment(row, col, horiz, vert) ⇒ void

This method returns an undefined value.

Sets the horizontal and vertical alignment for grid cell text at the specified location.

Horizontal alignment should be one of Alignment::ALIGN_LEFT, Alignment::ALIGN_CENTRE or Alignment::ALIGN_RIGHT. Vertical alignment should be one of Alignment::ALIGN_TOP, Alignment::ALIGN_CENTRE or Alignment::ALIGN_BOTTOM.

Parameters:

  • row (Integer)
  • col (Integer)
  • horiz (Integer)
  • vert (Integer)


671
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 671

def set_cell_alignment(row, col, horiz, vert) end

#set_cell_background_colour(row, col, colour) ⇒ void

This method returns an undefined value.

Set the background colour for the given cell or all cells by default.

Parameters:

  • row (Integer)
  • col (Integer)
  • colour (Wx::Colour, String, Symbol)


678
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 678

def set_cell_background_colour(row, col, colour) end

#set_cell_editor(row, col, editor) ⇒ void

This method returns an undefined value.

Sets the editor for the grid cell at the specified location.

The grid will take ownership of the pointer. See Wx::GRID::GridCellEditor and the wxGrid Overview for more information about cell editors and renderers.

Parameters:



903
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 903

def set_cell_editor(row, col, editor) end

#set_cell_fit_mode(row, col, fitMode) ⇒ void

This method returns an undefined value.

Specifies the behaviour of the cell contents if it doesn’t fit into the available space.

Parameters:

See Also:



1165
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1165

def set_cell_fit_mode(row, col, fitMode) end

#set_cell_font(row, col, font) ⇒ void

This method returns an undefined value.

Sets the font for text in the grid cell at the specified location.

Parameters:



685
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 685

def set_cell_font(row, col, font) end

#set_cell_highlight_colour(arg) ⇒ void Also known as: cell_highlight_colour=

This method returns an undefined value.

Parameters:



2572
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 2572

def set_cell_highlight_colour(arg) end

#set_cell_highlight_pen_width(width) ⇒ void Also known as: cell_highlight_pen_width=

This method returns an undefined value.

Parameters:

  • width (Integer)


2577
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 2577

def set_cell_highlight_pen_width(width) end

#set_cell_highlight_ro_pen_width(width) ⇒ void Also known as: cell_highlight_ro_pen_width=

This method returns an undefined value.

Parameters:

  • width (Integer)


2582
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 2582

def set_cell_highlight_ro_pen_width(width) end

#set_cell_overflow(row, col, allow) ⇒ void

This method returns an undefined value.

Sets the overflow permission of the cell.

Prefer using #set_cell_fit_mode in the new code.

Parameters:

  • row (Integer)
  • col (Integer)
  • allow (Boolean)


1174
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1174

def set_cell_overflow(row, col, allow) end

#set_cell_renderer(row, col, renderer) ⇒ void

This method returns an undefined value.

Sets the renderer for the grid cell at the specified location.

The grid will take ownership of the pointer. See Wx::GRID::GridCellRenderer and the wxGrid Overview for more information about cell editors and renderers.

Parameters:



913
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 913

def set_cell_renderer(row, col, renderer) end

#set_cell_size(row, col, num_rows, num_cols) ⇒ void

This method returns an undefined value.

Set the size of the cell.

Specifying a value of more than 1 in num_rows or num_cols will make the cell at (row, col) span the block of the specified size, covering the other cells which would be normally shown in it. Passing 1 for both arguments resets the cell to normal appearance.

Parameters:

  • row (Integer)

    The row of the cell.

  • col (Integer)

    The column of the cell.

  • num_rows (Integer)

    Number of rows to be occupied by this cell, must be >= 1.

  • num_cols (Integer)

    Number of columns to be occupied by this cell, must be >= 1.

See Also:



1358
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1358

def set_cell_size(row, col, num_rows, num_cols) end

#set_cell_text_colour(row, col, colour) ⇒ void

This method returns an undefined value.

Sets the text colour for the given cell.

Parameters:

  • row (Integer)
  • col (Integer)
  • colour (Wx::Colour, String, Symbol)


692
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 692

def set_cell_text_colour(row, col, colour) end

#set_cell_value(row, col, s) ⇒ void

This method returns an undefined value.

Sets the string value for the cell at the specified location.

For simple applications where a grid object automatically uses a default grid table of string values you use this function together with #get_cell_value to access cell values. For more complex applications where you have derived your own grid table class that contains various data types (e.g. numeric, boolean or user-defined custom types) then you only use this function for those cells that contain string values. See Wx::GRID::GridTableBase#can_set_value_as and the wxGrid Overview for more information.

Parameters:

  • row (Integer)
  • col (Integer)
  • s (String)


923
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 923

def set_cell_value(row, col, s) end

#set_col_attr(col, attr) ⇒ void

This method returns an undefined value.

Sets the cell attributes for all cells in the specified column.

For more information about controlling grid cell attributes see the Wx::GRID::GridCellAttr cell attribute class and the wxGrid Overview.

Parameters:



2369
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 2369

def set_col_attr(col, attr) end

#set_col_format_bool(col) ⇒ void Also known as: col_format_bool=

This method returns an undefined value.

Sets the specified column to display boolean values.

Parameters:

  • col (Integer)

See Also:



931
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 931

def set_col_format_bool(col) end

#set_col_format_custom(col, typeName) ⇒ void

This method returns an undefined value.

Sets the specified column to display data in a custom format.

This method provides an alternative to defining a custom grid table which would return typeName from its GetTypeName() method for the cells in this column: while it doesn’t really change the type of the cells in this column, it does associate the renderer and editor used for the cells of the specified type with them. See the wxGrid Overview for more information on working with custom data types.

Parameters:

  • col (Integer)
  • typeName (String)


941
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 941

def set_col_format_custom(col, typeName) end

#set_col_format_date(col, format = ('')) ⇒ void Also known as: col_format_date=

This method returns an undefined value.

Sets the specified column to display date values.

The format argument is used with Wx::GRID::GridCellDateRenderer and allows to specify the strftime-like format string to use for displaying the dates in this column.

Parameters:

  • col (Integer)
  • format (String) (defaults to: (''))

See Also:



970
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 970

def set_col_format_date(col, format=('')) end

#set_col_format_float(col, width = -1,, precision = -1)) ⇒ void Also known as: col_format_float=

This method returns an undefined value.

Sets the specified column to display floating point values with the given width and precision.

Parameters:

  • col (Integer)
  • width (Integer) (defaults to: -1,)
  • precision (Integer) (defaults to: -1))

See Also:



951
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 951

def set_col_format_float(col, width=-1, precision=-1) end

#set_col_format_number(col) ⇒ void Also known as: col_format_number=

This method returns an undefined value.

Sets the specified column to display integer values.

Parameters:

  • col (Integer)

See Also:



960
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 960

def set_col_format_number(col) end

#set_col_label_alignment(horiz, vert) ⇒ void

This method returns an undefined value.

Sets the horizontal and vertical alignment of column label text.

Horizontal alignment should be one of Alignment::ALIGN_LEFT, Alignment::ALIGN_CENTRE or Alignment::ALIGN_RIGHT. Vertical alignment should be one of Alignment::ALIGN_TOP, Alignment::ALIGN_CENTRE or Alignment::ALIGN_BOTTOM.

Parameters:

  • horiz (Integer)
  • vert (Integer)


516
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 516

def set_col_label_alignment(horiz, vert) end

#set_col_label_size(height) ⇒ void Also known as: col_label_size=

This method returns an undefined value.

Sets the height of the column labels.

If height equals to Wx::GRID::GRID_AUTOSIZE then height is calculated automatically so that no label is truncated. Note that this could be slow for a large table.

Parameters:

  • height (Integer)


1181
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1181

def set_col_label_size(height) end

#set_col_label_text_orientation(textOrientation) ⇒ void Also known as: col_label_text_orientation=

This method returns an undefined value.

Sets the orientation of the column labels (either Orientation::HORIZONTAL or Orientation::VERTICAL).

Parameters:

  • textOrientation (Integer)


521
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 521

def set_col_label_text_orientation(textOrientation) end

#set_col_label_value(col, value) ⇒ void

This method returns an undefined value.

Set the value for the given column label.

If you are using a custom grid table you must override Wx::GRID::GridTableBase#set_col_label_value for this to have any effect.

Parameters:

  • col (Integer)
  • value (String)


530
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 530

def set_col_label_value(col, value) end

#set_col_minimal_acceptable_width(width) ⇒ void Also known as: col_minimal_acceptable_width=

This method returns an undefined value.

Sets the minimal width to which the user can resize columns.

Parameters:

  • width (Integer)

See Also:



1190
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1190

def set_col_minimal_acceptable_width(width) end

#set_col_minimal_width(col, width) ⇒ void

This method returns an undefined value.

Sets the minimal width for the specified column col.

It is usually best to call this method during grid creation as calling it later will not resize the column to the given minimal width even if it is currently narrower than it. width must be greater than the minimal acceptable column width as returned by #get_col_minimal_acceptable_width.

Parameters:

  • col (Integer)
  • width (Integer)


1200
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1200

def set_col_minimal_width(col, width) end

#set_col_pos(colID, newPos) ⇒ void

This method returns an undefined value.

Sets the position of the specified column.

Parameters:

  • colID (Integer)
  • newPos (Integer)


1573
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1573

def set_col_pos(colID, newPos) end

#set_col_size(col, width) ⇒ void

This method returns an undefined value.

Sets the width of the specified column.

Parameters:

  • col (Integer)

    The column index.

  • width (Integer)

    The new column width in pixels, 0 to hide the column or -1 to fit the column width to its label width.



1206
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1206

def set_col_size(col, width) end

#set_col_sizes(sizeInfo) ⇒ void Also known as: col_sizes=

This method returns an undefined value.

Restore all columns sizes.

This is usually called with Wx::GRID::GridSizesInfo object previously returned by #get_col_sizes.

Parameters:

See Also:



1337
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1337

def set_col_sizes(sizeInfo) end

#set_columns_order(order) ⇒ void Also known as: columns_order=

This method returns an undefined value.

Sets the positions of all columns at once.

This method takes an array containing the indices of the columns in their display order, i.e. uses the same convention as HeaderCtrl#set_columns_order.

Parameters:

  • order (Array<Integer>)


1580
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1580

def set_columns_order(order) end

#set_corner_label_alignment(horiz, vert) ⇒ void

This method returns an undefined value.

Sets the horizontal and vertical alignment of the (top-left) corner label text.

Horizontal alignment should be one of Alignment::ALIGN_LEFT, Alignment::ALIGN_CENTRE or Alignment::ALIGN_RIGHT. Vertical alignment should be one of Alignment::ALIGN_TOP, Alignment::ALIGN_CENTRE or Alignment::ALIGN_BOTTOM.

Parameters:

  • horiz (Integer)
  • vert (Integer)


538
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 538

def set_corner_label_alignment(horiz, vert) end

#set_corner_label_text_orientation(textOrientation) ⇒ void Also known as: corner_label_text_orientation=

This method returns an undefined value.

Sets the orientation of the (top-left) corner label (either Orientation::HORIZONTAL or Orientation::VERTICAL).

Parameters:

  • textOrientation (Integer)


543
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 543

def set_corner_label_text_orientation(textOrientation) end

#set_corner_label_value(arg) ⇒ void Also known as: corner_label_value=

This method returns an undefined value.

Set the value for the (top-left) corner label.

If you are using a custom grid table you must override Wx::GRID::GridTableBase#set_corner_label_value for this to have any effect.

Parameters:

  • arg (String)


551
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 551

def set_corner_label_value(arg) end

#set_default_cell_alignment(horiz, vert) ⇒ void

This method returns an undefined value.

Sets the default horizontal and vertical alignment for grid cell text.

Horizontal alignment should be one of Alignment::ALIGN_LEFT, Alignment::ALIGN_CENTRE or Alignment::ALIGN_RIGHT. Vertical alignment should be one of Alignment::ALIGN_TOP, Alignment::ALIGN_CENTRE or Alignment::ALIGN_BOTTOM.

Parameters:

  • horiz (Integer)
  • vert (Integer)


700
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 700

def set_default_cell_alignment(horiz, vert) end

#set_default_cell_background_colour(colour) ⇒ void Also known as: default_cell_background_colour=

This method returns an undefined value.

Sets the default background colour for grid cells.

Parameters:



705
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 705

def set_default_cell_background_colour(colour) end

#set_default_cell_fit_mode(fitMode) ⇒ void Also known as: default_cell_fit_mode=

This method returns an undefined value.

Specifies the default behaviour of the cell contents if it doesn’t fit into the available space.

Parameters:

See Also:



1232
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1232

def set_default_cell_fit_mode(fitMode) end

#set_default_cell_font(font) ⇒ void Also known as: default_cell_font=

This method returns an undefined value.

Sets the default font to be used for grid cell text.

Parameters:



711
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 711

def set_default_cell_font(font) end

#set_default_cell_overflow(allow) ⇒ void Also known as: default_cell_overflow=

This method returns an undefined value.

Sets the default overflow permission of the cells.

Prefer using #set_default_cell_fit_mode in the new code.

Parameters:

  • allow (Boolean)


1240
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1240

def set_default_cell_overflow(allow) end

#set_default_cell_text_colour(colour) ⇒ void Also known as: default_cell_text_colour=

This method returns an undefined value.

Sets the current default colour for grid cell text.

Parameters:



717
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 717

def set_default_cell_text_colour(colour) end

#set_default_col_size(width, resizeExistingCols = false) ⇒ void Also known as: default_col_size=

This method returns an undefined value.

Sets the default width for columns in the grid.

This will only affect columns subsequently added to the grid unless resizeExistingCols is true. If width is less than #get_col_minimal_acceptable_width, then the minimal acceptable width is used instead of it.

Parameters:

  • width (Integer)
  • resizeExistingCols (Boolean) (defaults to: false)


1250
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1250

def set_default_col_size(width, resizeExistingCols=false) end

#set_default_editor(editor) ⇒ void Also known as: default_editor=

This method returns an undefined value.

Sets the default editor for grid cells.

The grid will take ownership of the pointer. See Wx::GRID::GridCellEditor and the wxGrid Overview for more information about cell editors and renderers.

Parameters:



979
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 979

def set_default_editor(editor) end

#set_default_renderer(renderer) ⇒ void Also known as: default_renderer=

This method returns an undefined value.

Sets the default renderer for grid cells.

The grid will take ownership of the pointer. See Wx::GRID::GridCellRenderer and the wxGrid Overview for more information about cell editors and renderers.

Parameters:



988
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 988

def set_default_renderer(renderer) end

#set_default_row_size(height, resizeExistingRows = false) ⇒ void Also known as: default_row_size=

This method returns an undefined value.

Sets the default height for rows in the grid.

This will only affect rows subsequently added to the grid unless resizeExistingRows is true. If height is less than #get_row_minimal_acceptable_height, then the minimal acceptable height is used instead of it.

Parameters:

  • height (Integer)
  • resizeExistingRows (Boolean) (defaults to: false)


1260
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1260

def set_default_row_size(height, resizeExistingRows=false) end

#set_grid_cursor(row, col) ⇒ void #set_grid_cursor(coords) ⇒ void Also known as: grid_cursor=

Overloads:

  • #set_grid_cursor(row, col) ⇒ void

    This method returns an undefined value.

    Set the grid cursor to the specified cell.

    The grid cursor indicates the current cell and can be moved by the user using the arrow keys or the mouse. Calling this function generates a EVT_GRID_SELECT_CELL event and if the event handler vetoes this event, the cursor is not moved. This function doesn’t make the target call visible, use #go_to_cell to do this.

    Parameters:

    • row (Integer)
    • col (Integer)
  • #set_grid_cursor(coords) ⇒ void

    This method returns an undefined value.

    Set the grid cursor to the specified cell.

    The grid cursor indicates the current cell and can be moved by the user using the arrow keys or the mouse. Calling this function generates a EVT_GRID_SELECT_CELL event and if the event handler vetoes this event, the cursor is not moved. This function doesn’t make the target call visible, use #go_to_cell to do this.

    Parameters:

    • coords (Array(Integer, Integer))


1736
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1736

def set_grid_cursor(*args) end

#set_grid_frozen_border_colour(arg) ⇒ void Also known as: grid_frozen_border_colour=

This method returns an undefined value.

Parameters:



2587
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 2587

def set_grid_frozen_border_colour(arg) end

#set_grid_frozen_border_pen_width(width) ⇒ void Also known as: grid_frozen_border_pen_width=

This method returns an undefined value.

Parameters:

  • width (Integer)


2592
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 2592

def set_grid_frozen_border_pen_width(width) end

#set_grid_line_colour(colour) ⇒ void Also known as: grid_line_colour=

This method returns an undefined value.

Sets the colour used to draw grid lines.

Parameters:



422
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 422

def set_grid_line_colour(colour) end

#set_label_background_colour(colour) ⇒ void Also known as: label_background_colour=

This method returns an undefined value.

Sets the background colour for row and column labels.

Parameters:



557
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 557

def set_label_background_colour(colour) end

#set_label_font(font) ⇒ void Also known as: label_font=

This method returns an undefined value.

Sets the font for row and column labels.

Parameters:



563
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 563

def set_label_font(font) end

#set_label_text_colour(colour) ⇒ void Also known as: label_text_colour=

This method returns an undefined value.

Sets the colour for row and column label text.

Parameters:



569
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 569

def set_label_text_colour(colour) end

#set_margins(extraWidth, extraHeight) ⇒ void

This method returns an undefined value.

Sets the extra margins used around the grid area.

A grid may occupy more space than needed for its data display and this function allows setting how big this extra space is

Parameters:

  • extraWidth (Integer)
  • extraHeight (Integer)


2377
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 2377

def set_margins(extraWidth, extraHeight) end

#set_read_only(row, col, isReadOnly = true) ⇒ void

This method returns an undefined value.

Makes the cell at the specified location read-only or editable.

Parameters:

  • row (Integer)
  • col (Integer)
  • isReadOnly (Boolean) (defaults to: true)

See Also:



999
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 999

def set_read_only(row, col, isReadOnly=true) end

#set_row_attr(row, attr) ⇒ void

This method returns an undefined value.

Sets the cell attributes for all cells in the specified row.

The grid takes ownership of the attribute pointer. See the Wx::GRID::GridCellAttr class for more information about controlling cell attributes.

Parameters:



2386
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 2386

def set_row_attr(row, attr) end

#set_row_label_alignment(horiz, vert) ⇒ void

This method returns an undefined value.

Sets the horizontal and vertical alignment of row label text.

Horizontal alignment should be one of Alignment::ALIGN_LEFT, Alignment::ALIGN_CENTRE or Alignment::ALIGN_RIGHT. Vertical alignment should be one of Alignment::ALIGN_TOP, Alignment::ALIGN_CENTRE or Alignment::ALIGN_BOTTOM.

Parameters:

  • horiz (Integer)
  • vert (Integer)


578
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 578

def set_row_label_alignment(horiz, vert) end

#set_row_label_size(width) ⇒ void Also known as: row_label_size=

This method returns an undefined value.

Sets the width of the row labels.

If width equals Wx::GRID::GRID_AUTOSIZE then width is calculated automatically so that no label is truncated. Note that this could be slow for a large table.

Parameters:

  • width (Integer)


1268
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1268

def set_row_label_size(width) end

#set_row_label_value(row, value) ⇒ void

This method returns an undefined value.

Sets the value for the given row label.

If you are using a derived grid table you must override Wx::GRID::GridTableBase#set_row_label_value for this to have any effect.

Parameters:

  • row (Integer)
  • value (String)


586
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 586

def set_row_label_value(row, value) end

#set_row_minimal_acceptable_height(height) ⇒ void Also known as: row_minimal_acceptable_height=

This method returns an undefined value.

Sets the minimal row height used by default.

See #set_col_minimal_acceptable_width for more information.

Parameters:

  • height (Integer)


1276
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1276

def set_row_minimal_acceptable_height(height) end

#set_row_minimal_height(row, height) ⇒ void

This method returns an undefined value.

Sets the minimal height for the specified row.

See #set_col_minimal_width for more information.

Parameters:

  • row (Integer)
  • height (Integer)


1285
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1285

def set_row_minimal_height(row, height) end

#set_row_pos(rowID, newPos) ⇒ void

This method returns an undefined value.

Sets the position of the specified row.

Parameters:

  • rowID (Integer)
  • newPos (Integer)


1603
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1603

def set_row_pos(rowID, newPos) end

#set_row_size(row, height) ⇒ void

This method returns an undefined value.

Sets the height of the specified row.

See #set_col_size for more information.

Parameters:

  • row (Integer)
  • height (Integer)


1293
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1293

def set_row_size(row, height) end

#set_row_sizes(sizeInfo) ⇒ void Also known as: row_sizes=

This method returns an undefined value.

Restore all rows sizes.

Parameters:

See Also:



1346
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1346

def set_row_sizes(sizeInfo) end

#set_rows_order(order) ⇒ void Also known as: rows_order=

This method returns an undefined value.

Sets the positions of all rows at once.

This method takes an array containing the indices of the rows in their display order.

Parameters:

  • order (Array<Integer>)


1610
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1610

def set_rows_order(order) end

#set_scroll_line_x(x) ⇒ void Also known as: scroll_line_x=

This method returns an undefined value.

Sets the number of pixels per horizontal scroll increment.

The default is 15.

Parameters:

  • x (Integer)

See Also:



1988
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1988

def set_scroll_line_x(x) end

#set_scroll_line_y(y) ⇒ void Also known as: scroll_line_y=

This method returns an undefined value.

Sets the number of pixels per vertical scroll increment.

The default is 15.

Parameters:

  • y (Integer)

See Also:



1999
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1999

def set_scroll_line_y(y) end

#set_selection_background(c) ⇒ void Also known as: selection_background=

This method returns an undefined value.

Set the colour to be used for drawing the selection background.

Parameters:



1911
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1911

def set_selection_background(c) end

#set_selection_foreground(c) ⇒ void Also known as: selection_foreground=

This method returns an undefined value.

Set the colour to be used for drawing the selection foreground.

Parameters:



1917
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1917

def set_selection_foreground(c) end

#set_selection_mode(selmode) ⇒ void Also known as: selection_mode=

This method returns an undefined value.

Set the selection behaviour of the grid.

The existing selection is converted to conform to the new mode if possible and discarded otherwise (e.g. any individual selected cells are deselected if the new mode allows only the selection of the entire rows or columns).

Parameters:

  • selmode (Wx::Grid::GridSelectionModes)


1925
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1925

def set_selection_mode(selmode) end

#set_sorting_column(col, ascending = true) ⇒ void Also known as: sorting_column=

This method returns an undefined value.

Set the column to display the sorting indicator in and its direction.

Parameters:

  • col (Integer)

    The column to display the sorting indicator in or NOT_FOUND to remove any currently displayed sorting indicator.

  • ascending (Boolean) (defaults to: true)

    If true, display the ascending sort indicator, otherwise display the descending sort indicator.

See Also:



2439
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 2439

def set_sorting_column(col, ascending=true) end

#set_tab_behaviour(behaviour) ⇒ void Also known as: tab_behaviour=

This method returns an undefined value.

Set the grid’s behaviour when the user presses the TAB key.

Pressing the TAB key moves the grid cursor right in the current row, if there is a cell at the right and, similarly, Shift-TAB moves the cursor to the left in the current row if it’s not in the first column. What happens if the cursor can’t be moved because it it’s already at the beginning or end of the row can be configured using this function, see TabBehaviour documentation for the detailed description. IF none of the standard behaviours is appropriate, you can always handle EVT_GRID_TABBING event directly to implement a custom TAB-handling logic.

Parameters:

  • behaviour (Wx::Grid::TabBehaviour)


1746
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1746

def set_tab_behaviour(behaviour) end

#set_tableObject



21
# File 'lib/wx/doc/grid/grid.rb', line 21

alias :set_table :assign_table

#set_use_native_col_labels(native = true) ⇒ void Also known as: use_native_col_labels=

This method returns an undefined value.

Call this in order to make the column labels use a native look by using Wx::RendererNative#draw_header_button internally.

There is no equivalent method for drawing row columns as there is not native look for that. This option is useful when using Wx::GRID::Grid for displaying tables and not as a spread-sheet.

Parameters:

  • native (Boolean) (defaults to: true)

See Also:



594
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 594

def set_use_native_col_labels(native=true) end

#show_cell_edit_controlvoid

This method returns an undefined value.

Displays the active in-place cell edit control for the current cell after it was hidden.

This method should only be called after calling #hide_cell_edit_control, to start editing the current grid cell use #enable_cell_edit_control instead.



1005
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1005

def show_cell_edit_control; end

#show_col(col) ⇒ void

This method returns an undefined value.

Shows the previously hidden column by resizing it to non-0 size.

The column is shown again with the same width that it had before #hide_col call. If the column is currently shown, this method doesn’t do anything.

Parameters:

  • col (Integer)

See Also:



1224
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1224

def show_col(col) end

#show_row(col) ⇒ void

This method returns an undefined value.

Shows the previously hidden row.

The row is shown again with the same height that it had before #hide_row call. If the row is currently shown, this method doesn’t do anything.

Parameters:

  • col (Integer)

See Also:



1311
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 1311

def show_row(col) end

#table=Object



22
# File 'lib/wx/doc/grid/grid.rb', line 22

alias :table= :assign_table

#unset_sorting_columnvoid

This method returns an undefined value.

Remove any currently shown sorting indicator.

This is equivalent to calling #set_sorting_column with NOT_FOUND first argument.



2446
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 2446

def unset_sorting_column; end

#use_native_col_header(native = true) ⇒ Boolean

Enable the use of native header window for column labels.

If this function is called with true argument, a HeaderCtrl is used instead to display the column labels instead of drawing them in Wx::GRID::Grid code itself. This has the advantage of making the grid look and feel perfectly the same as native applications (using #set_use_native_col_labels the grid can be made to look more natively but it still doesn’t feel natively, notably the column resizing and dragging still works slightly differently as it is implemented in wxWidgets itself) but results in different behaviour for column and row headers, for which there is no equivalent function, and, most importantly, is unsuitable for grids with huge numbers of columns as HeaderCtrl doesn’t support virtual mode. Because of this, by default the grid does not use the native header control but you should call this function to enable it if you are using the grid to display tabular data and don’t have thousands of columns in it. Another difference between the default behaviour and the native header behaviour is that the latter provides the user with a context menu (which appears on right clicking the header) allowing to rearrange the grid columns if #can_drag_col_move returns true. If you want to prevent this from happening for some reason, you need to define a handler for EVT_GRID_LABEL_RIGHT_CLICK event which simply does nothing (in particular doesn’t skip the event) as this will prevent the default right click handling from working. Also note that currently EVT_GRID_LABEL_RIGHT_DCLICK event is not generated for the column labels if the native columns header is used (but this limitation could possibly be lifted in the future). Finally, please note that using the native control is currently incompatible with freezing columns in the grid (see #freeze_to) and this function will return false, without doing anything, if it’s called on a grid in which any columns are frozen.

Parameters:

  • native (Boolean) (defaults to: true)

Returns:

  • (Boolean)


605
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 605

def use_native_col_header(native=true) end

#x_to_col(x, clipToMinMax = false, gridWindow = nil) ⇒ Integer

Returns the column at the given pixel position depending on the window.

The column index or NOT_FOUND.

Parameters:

  • x (Integer)

    The x position to evaluate.

  • clipToMinMax (Boolean) (defaults to: false)

    If true, rather than returning NOT_FOUND, it returns either the first or last column depending on whether x is too far to the left or right respectively.

  • gridWindow (Wx::GRID::GridWindow) (defaults to: nil)

    The associated grid window that limits the search (note that this parameter is only available since wxWidgets 3.1.3). If gridWindow is NULL, it will consider all the cells, no matter which grid they belong to.

Returns:

  • (Integer)


2070
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 2070

def x_to_col(x, clipToMinMax=false, gridWindow=nil) end

#x_to_edge_of_col(x) ⇒ Integer

Returns the column whose right hand edge is close to the given logical x position.

If no column edge is near to this position NOT_FOUND is returned.

Parameters:

  • x (Integer)

Returns:

  • (Integer)


2077
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 2077

def x_to_edge_of_col(x) end

#xy_to_cell(x, y, gridWindow = nil) ⇒ Array(Integer, Integer) #xy_to_cell(pos, gridWindow = nil) ⇒ Array(Integer, Integer)

Overloads:

  • #xy_to_cell(x, y, gridWindow = nil) ⇒ Array(Integer, Integer)

    Translates logical pixel coordinates to the grid cell coordinates.

    Notice that this function expects logical coordinates on input so if you use this function in a mouse event handler you need to translate the mouse position, which is expressed in device coordinates, to logical ones. The parameter gridWindow is new since wxWidgets 3.1.3. If it is specified, i.e. non-NULL, the coordinates must be in this window coordinate system and only the cells of this window are considered, i.e. the function returns NOT_FOUND if the coordinates are out of bounds. If gridWindow is NULL, coordinates are relative to the main grid window and all cells are considered.

    Parameters:

    Returns:

    • (Array(Integer, Integer))

    See Also:

  • #xy_to_cell(pos, gridWindow = nil) ⇒ Array(Integer, Integer)

    This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

    Parameters:

    Returns:

    • (Array(Integer, Integer))


2096
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 2096

def xy_to_cell(*args) end

#y_to_edge_of_row(y) ⇒ Integer

Returns the row whose bottom edge is close to the given logical y position.

If no row edge is near to this position NOT_FOUND is returned.

Parameters:

  • y (Integer)

Returns:

  • (Integer)


2103
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 2103

def y_to_edge_of_row(y) end

#y_to_row(y, clipToMinMax = false, gridWindow = nil) ⇒ Integer

Returns the grid row that corresponds to the logical y coordinate.

The parameter gridWindow is new since wxWidgets 3.1.3. If it is specified, i.e. non-NULL, only the cells of this window are considered, i.e. the function returns NOT_FOUND if y is out of bounds. If gridWindow is NULL, the function returns NOT_FOUND only if there is no row at all at the y position.

Parameters:

  • y (Integer)
  • clipToMinMax (Boolean) (defaults to: false)
  • gridWindow (Wx::GRID::GridWindow) (defaults to: nil)

Returns:

  • (Integer)


2113
# File 'lib/wx/doc/gen/grid/grid_ctrl.rb', line 2113

def y_to_row(y, clipToMinMax=false, gridWindow=nil) end