Class: Wx::HeaderColumn

Inherits:
Object
  • Object
show all
Defined in:
lib/wx/doc/gen/header_ctrl.rb

Overview

Represents a column header in controls displaying tabular data such as DataViewCtrl or GRID::Grid.

Notice that this is an abstract base class which is implemented (usually using the information stored in the associated control) by the different controls using HeaderCtrl. As the control only needs to retrieve the information about the column, this class defines only the methods for accessing the various column properties but not for changing them as the setters might not be needed at all, e.g. if the column attributes can only be changed via the methods of the main associated control (this is the case for GRID::Grid for example). If you do want to allow changing them directly using the column itself, you should inherit from SettableHeaderColumn instead of this class. Finally, if you don’t already store the column information at all anywhere, you should use the concrete HeaderColumnSimple class and HeaderCtrlSimple.

Category: Controls

Direct Known Subclasses

SettableHeaderColumn

Instance Method Summary collapse

Instance Method Details

#get_alignmentWx::Alignment Also known as: alignment

Returns the current column alignment.

One of Alignment::ALIGN_CENTRE, Alignment::ALIGN_LEFT or Alignment::ALIGN_RIGHT.

Returns:



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

def get_alignment; end

#get_bitmapWx::Bitmap Also known as: bitmap

This function exists only for backwards compatibility, it’s recommended to override #get_bitmap_bundle in the new code and override this one to do nothing, as it will never be called if #get_bitmap_bundle is overridden.

Returns:



383
# File 'lib/wx/doc/gen/header_ctrl.rb', line 383

def get_bitmap; end

#get_bitmap_bundleWx::BitmapBundle Also known as: bitmap_bundle

Returns the bitmap in the header of the column, if any.

If the column has no associated bitmap, empty BitmapBundle should be returned. Override this function to return the bundle containing the bitmap to show in the column header. By default delegates to #get_bitmap but should be overridden if the bitmaps are used.

Returns:



391
# File 'lib/wx/doc/gen/header_ctrl.rb', line 391

def get_bitmap_bundle; end

#get_flagsInteger Also known as: flags

Get the column flags.

This method retrieves all the flags at once, you can also use #has_flag to test for any individual flag or #is_resizeable, #is_sortable, #is_reorderable and #is_hidden to test for particular flags.

Returns:

  • (Integer)


419
# File 'lib/wx/doc/gen/header_ctrl.rb', line 419

def get_flags; end

#get_min_widthInteger Also known as: min_width

Return the minimal column width.

The minimal width such that the user can’t resize the column to lesser size (notice that it is still possible to set the column width to smaller value from the program code). Return 0 from here to allow resizing the column to arbitrarily small size.

Returns:

  • (Integer)


405
# File 'lib/wx/doc/gen/header_ctrl.rb', line 405

def get_min_width; end

#get_titleString Also known as: title

Get the text shown in the column header.

Returns:

  • (String)


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

def get_title; end

#get_widthInteger Also known as: width

Returns the current width of the column.

Width of the column in pixels, never COL_WIDTH_DEFAULT or COL_WIDTH_AUTOSIZE.

Returns:

  • (Integer)


398
# File 'lib/wx/doc/gen/header_ctrl.rb', line 398

def get_width; end

#has_flag(flag) ⇒ Boolean Also known as: has_flag?

Return true if the specified flag is currently set for this column.

Parameters:

  • flag (Integer)

Returns:

  • (Boolean)


425
# File 'lib/wx/doc/gen/header_ctrl.rb', line 425

def has_flag(flag) end

#is_hiddenBoolean Also known as: hidden?

Returns true if the column is currently hidden.

This corresponds to COL_HIDDEN flag which is off by default.

Returns:

  • (Boolean)


453
# File 'lib/wx/doc/gen/header_ctrl.rb', line 453

def is_hidden; end

#is_reorderableBoolean Also known as: reorderable?

Returns true if the column can be dragged by user to change its order.

This corresponds to COL_REORDERABLE flag which is on by default.

Returns:

  • (Boolean)


446
# File 'lib/wx/doc/gen/header_ctrl.rb', line 446

def is_reorderable; end

#is_resizeableBoolean Also known as: resizeable?

Return true if the column can be resized by the user.

Equivalent to HasFlag(COL_RESIZABLE).

Returns:

  • (Boolean)


432
# File 'lib/wx/doc/gen/header_ctrl.rb', line 432

def is_resizeable; end

#is_shownBoolean Also known as: shown?

Returns true if the column is currently shown.

This corresponds to the absence of COL_HIDDEN flag.

Returns:

  • (Boolean)


460
# File 'lib/wx/doc/gen/header_ctrl.rb', line 460

def is_shown; end

#is_sort_keyBoolean Also known as: sort_key?

Returns true if the column is currently used for sorting.

Returns:

  • (Boolean)


465
# File 'lib/wx/doc/gen/header_ctrl.rb', line 465

def is_sort_key; end

#is_sort_order_ascendingBoolean Also known as: sort_order_ascending?

Returns true, if the sort order is ascending.

Notice that it only makes sense to call this function if the column is used for sorting at all, i.e. if #is_sort_key returns true.

Returns:

  • (Boolean)


472
# File 'lib/wx/doc/gen/header_ctrl.rb', line 472

def is_sort_order_ascending; end

#is_sortableBoolean Also known as: sortable?

Returns true if the column can be clicked by user to sort the control contents by the field in this column.

This corresponds to COL_SORTABLE flag which is off by default.

Returns:

  • (Boolean)


439
# File 'lib/wx/doc/gen/header_ctrl.rb', line 439

def is_sortable; end