Wx::DBI::Form::Grid::CellComboEditor - database aware combo box for the grid


NAME

Wx::DBI::Form::Grid::CellComboEditor - database aware combo box for the grid

Back to Top


SYNOPSIS

use Wx::DBI::Form::Grid::CellComboEditor

Back to Top


DESCRIPTION

Wx::DBI::Form::Grid::CellComboEditor allows for database aware combo boxes in the grid.

The object is to be able to use a database aware combo box in a grid cell rather than the regular "choice" widget that is even worse than the regular combobox.

Back to Top


FUNCTIONS

new($class, $combodataref, @_)
Parameters:

$combodataref is a reference to the data in the ComboBox. @_ is an array of the remaining arguments, which are passed to the constructor of Wx::PlGridCellEditor.

Functionality:

Constructor for Wx::DBI::Form::Grid::CellComboEditor.

Return value:

New Wx::DBI::Form::Grid::CellComboEditor object.

Create($self, $parent, $id, $evthandler)
Parameters:

$parent, $id, and $evthandler are passed directly to the Wx::DBI::Form::ComboBox constructor.

Functionality:

Create the cell editor and set the focus to it.

Note: this function has a camel case name because it overrides a super-class function.

Return value:

None.

add_combo_data($self, $combodata)
Parameters:

$combodata is a reference to an array of data that should be added to the control.

Functionality:

Append the items referred to by $combodata to the control associated with the particular editor widget.

Return value:
replace_combo_data($self, $combodata)
Parameters:

$combodata is a reference to an array of data that belongs in the control.

Functionality:

Replace the current items in the control with those referred to by $combodata.

Return value:
append_items($self, @combodata)
Parameters:

@combodata is an array of items to append.

Functionality:

Append the items to the ComboBox.

Return value:
BeginEdit($self, $row, $col, $grid)
Parameters:

$row, $col and $grid reference the particular grid in the application and the cell (of type Wx::DBI::Form::Grid::CellComboEditor) in the grid were the user is editing.

Functionality:

Allow the user to edit a grid cell.

Note: this function has a camel case name because it overrides a super-class function.

Return value:

None.

Destroy($self)
Functionality:

Destroy the Wx::DBI::Form::Grid::CellComboEditor object.

Note: this function has a camel case name because it overrides a super-class function.

Return value:

None.

SetSize($self, $size)
Functionality:

Explicitly sets the size of the Wx::DBI::Form::Grid::CellComboEditor object.

Note: this function has a camel case name because it overrides a super-class function.

Return value:

None.

Show($self, $show, $attr)
Parameters:

$show is treated like a boolean (0 to hide; 1 to show). $attr is a reference to an array of attributes for the widget.

Functionality:

Explicitly show or hide the Wx::DBI::Form::Grid::CellComboEditor object.

Note: this function has a camel case name because it overrides a super-class function.

Return value:

None.

on_combo_box_key_up($self, $event)
Parameters:

$event is the Wx::Event object.

Functionality:

Handle the event when a key is pressed in the combo box.

Return value:

None.

on_combo_box_lost_focus($self, $combo, $event)
Parameters:

$combo is the ComboBox being edited and $event is the Wx::Event being handled.

Functionality:

Properly manage getting the edited text back into the combo box and returning focus to the parent grid.

Return value:

None.

EndEdit($self, $row, $col, $grid)
Parameters:

$row, $col and $grid reference the particular grid in the application and the cell (of type Wx::DBI::Form::Grid::CellComboEditor) in the grid were the user is editing.

Functionality:

This function is being called when the user clicks on the dropdown box to show the combo list. This is as it should be. If we are in edit mode and click the drop down, the edit mode will go away.

Note: this function has a camel case name because it overrides a super-class function.

Return value:

Whether or not anything was changed in the ComboBox.

GetCount($self)
Functionality:

Return the number of items in the ComboBox.

Note: this function has a camel case name because it overrides a super-class function.

Return value:

The number of items in the ComboBox.

Back to Top


AUTHORS

Doug Breshears <doug@jshfarms.com>
Roberto C. Sanchez <roberto@connexer.com>

Back to Top


BUGS

No known bugs.

Back to Top


SEE ALSO

README

Back to Top


COPYRIGHT

Copyright 2008-2009 JSH Farms, Inc.

Wx::DBI is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version, or under the terms of the Artistic License as published by the Perl Foundation, either version 2.0 of the license, or (at your option) any later version.

Wx::DBI is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License or the Artistic License for more details.

You should have received a copy of the GNU General Public License and a copy of the Artistic License along with Wx::DBI. If not, see <http://www.gnu.org/licenses/> and <http://www.perlfoundation.org/artistic_license_2_0>, respectively.

Back to Top

 Wx::DBI::Form::Grid::CellComboEditor - database aware combo box for the grid