Class: Wx::GRID::GridStringTable

Inherits:
GridTableBase show all
Defined in:
lib/wx/doc/gen/grid/grid_string_table.rb

Overview

Simplest type of data table for a grid for small tables of strings that are stored in memory.

The number of rows and columns in the table can be specified initially but may also be changed later dynamically.

Requires:

  • USE_GRID

Instance Method Summary collapse

Methods inherited from GridTableBase

#can_get_value_as, #can_measure_col_using_same_attr, #can_set_value_as, #get_attr, #get_cols_count, #get_rows_count, #get_type_name, #get_value_as_bool, #get_value_as_double, #get_value_as_long, #get_view, #is_empty, #is_empty_cell, #set_attr, #set_col_attr, #set_row_attr, #set_value_as_bool, #set_value_as_double, #set_value_as_long, #set_view

Methods inherited from Object

#clone, #dup, #is_same_as, #un_share

Constructor Details

#initializeWx::GRID::GridStringTable #initialize(numRows, numCols) ⇒ Wx::GRID::GridStringTable

Returns a new instance of GridStringTable.

Overloads:



26
# File 'lib/wx/doc/gen/grid/grid_string_table.rb', line 26

def initialize(*args) end

Instance Method Details

#append_cols(numCols = 1) ⇒ Boolean

Exactly the same as #append_rows but for columns.

Parameters:

  • numCols (Integer) (defaults to: 1)

Returns:

  • (Boolean)


90
# File 'lib/wx/doc/gen/grid/grid_string_table.rb', line 90

def append_cols(numCols=1) end

#append_rows(numRows = 1) ⇒ Boolean

Append additional rows at the end of the table.

This method is provided in addition to #insert_rows as some data models may only support appending rows to them but not inserting them at arbitrary locations. In such case you may implement this method only and leave #insert_rows unimplemented.

Parameters:

  • numRows (Integer) (defaults to: 1)

    The number of rows to add.

Returns:

  • (Boolean)


73
# File 'lib/wx/doc/gen/grid/grid_string_table.rb', line 73

def append_rows(numRows=1) end

#clearvoid

This method returns an undefined value.

Clear the table contents.

This method is used by Wx::GRID::Grid#clear_grid.



60
# File 'lib/wx/doc/gen/grid/grid_string_table.rb', line 60

def clear; end

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

Exactly the same as #delete_rows but for columns.

Parameters:

  • pos (Integer) (defaults to: 0)
  • numCols (Integer) (defaults to: 1)

Returns:

  • (Boolean)


96
# File 'lib/wx/doc/gen/grid/grid_string_table.rb', line 96

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

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

Delete rows from the table.

Parameters:

  • pos (Integer) (defaults to: 0)

    The first row to delete.

  • numRows (Integer) (defaults to: 1)

    The number of rows to delete.

Returns:

  • (Boolean)


79
# File 'lib/wx/doc/gen/grid/grid_string_table.rb', line 79

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

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

Return the label of the specified column.

Parameters:

  • col (Integer)

Returns:

  • (String)


129
# File 'lib/wx/doc/gen/grid/grid_string_table.rb', line 129

def get_col_label_value(col) end

#get_corner_label_valueString Also known as: corner_label_value

Return the label of the grid’s corner.

Returns:

  • (String)


134
# File 'lib/wx/doc/gen/grid/grid_string_table.rb', line 134

def get_corner_label_value; end

#get_number_colsInteger Also known as: number_cols

Must be overridden to return the number of columns in the table.

For backwards compatibility reasons, this method is not const. Use Wx::GRID::GridTableBase#get_cols_count instead of it in const methods of derived table classes,

Returns:

  • (Integer)


39
# File 'lib/wx/doc/gen/grid/grid_string_table.rb', line 39

def get_number_cols; end

#get_number_rowsInteger Also known as: number_rows

Must be overridden to return the number of rows in the table.

For backwards compatibility reasons, this method is not const. Use Wx::GRID::GridTableBase#get_rows_count instead of it in const methods of derived table classes.

Returns:

  • (Integer)


32
# File 'lib/wx/doc/gen/grid/grid_string_table.rb', line 32

def get_number_rows; end

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

Return the label of the specified row.

Parameters:

  • row (Integer)

Returns:

  • (String)


123
# File 'lib/wx/doc/gen/grid/grid_string_table.rb', line 123

def get_row_label_value(row) end

#get_value(row, col) ⇒ String Also known as: value

Must be overridden to implement accessing the table values as text.

Parameters:

  • row (Integer)
  • col (Integer)

Returns:

  • (String)


46
# File 'lib/wx/doc/gen/grid/grid_string_table.rb', line 46

def get_value(row, col) end

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

Exactly the same as #insert_rows but for columns.

Parameters:

  • pos (Integer) (defaults to: 0)
  • numCols (Integer) (defaults to: 1)

Returns:

  • (Boolean)


85
# File 'lib/wx/doc/gen/grid/grid_string_table.rb', line 85

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

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

Insert additional rows into the table.

Parameters:

  • pos (Integer) (defaults to: 0)

    The position of the first new row.

  • numRows (Integer) (defaults to: 1)

    The number of rows to insert.

Returns:

  • (Boolean)


66
# File 'lib/wx/doc/gen/grid/grid_string_table.rb', line 66

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

#set_col_label_value(col, label) ⇒ void

This method returns an undefined value.

Exactly the same as #set_row_label_value but for columns.

Parameters:

  • col (Integer)
  • label (String)


110
# File 'lib/wx/doc/gen/grid/grid_string_table.rb', line 110

def set_col_label_value(col, label) end

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

This method returns an undefined value.

Set the given label for the grid’s corner.

The default version does nothing, i.e. the label is not stored. You must override this method in your derived class if you wish Wx::GRID::Grid#get_corner_label_value to work.

Parameters:

  • arg (String)


117
# File 'lib/wx/doc/gen/grid/grid_string_table.rb', line 117

def set_corner_label_value(arg) end

#set_row_label_value(row, label) ⇒ void

This method returns an undefined value.

Set the given label for the specified row.

The default version does nothing, i.e. the label is not stored. You must override this method in your derived class if you wish Wx::GRID::Grid#set_row_label_value to work.

Parameters:

  • row (Integer)
  • label (String)


104
# File 'lib/wx/doc/gen/grid/grid_string_table.rb', line 104

def set_row_label_value(row, label) end

#set_value(row, col, value) ⇒ void

This method returns an undefined value.

Must be overridden to implement setting the table values as text.

Parameters:

  • row (Integer)
  • col (Integer)
  • value (String)


54
# File 'lib/wx/doc/gen/grid/grid_string_table.rb', line 54

def set_value(row, col, value) end