git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@18226
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
// return the value in the text control
wxString wxGridCellTextEditor::GetValue() const
{
// return the value in the text control
wxString wxGridCellTextEditor::GetValue() const
{
// return the value in the spin control if it is there (the text control otherwise)
wxString wxGridCellNumberEditor::GetValue() const
{
// return the value in the spin control if it is there (the text control otherwise)
wxString wxGridCellNumberEditor::GetValue() const
{
// return the value as "1" for true and the empty string for false
wxString wxGridCellBoolEditor::GetValue() const
{
bool bSet = CBox()->GetValue();
// return the value as "1" for true and the empty string for false
wxString wxGridCellBoolEditor::GetValue() const
{
bool bSet = CBox()->GetValue();
- return bSet ? "1" : wxEmptyString;
+ return bSet ? _T("1") : wxEmptyString;
}
#endif // wxUSE_CHECKBOX
}
#endif // wxUSE_CHECKBOX
// return the value in the text control
wxString wxGridCellChoiceEditor::GetValue() const
{
return Combo()->GetValue();
}
// return the value in the text control
wxString wxGridCellChoiceEditor::GetValue() const
{
return Combo()->GetValue();
}
#endif // wxUSE_COMBOBOX
// ----------------------------------------------------------------------------
#endif // wxUSE_COMBOBOX
// ----------------------------------------------------------------------------
{
dc.SetBackgroundMode( wxSOLID );
{
dc.SetBackgroundMode( wxSOLID );
-// DJC (MAPTEK) grey out fields if the grid is disabled
+ // grey out fields if the grid is disabled
if( grid.IsEnabled() )
{
if ( isSelected )
if( grid.IsEnabled() )
{
if ( isSelected )
// TODO some special colours for attr.IsReadOnly() case?
// TODO some special colours for attr.IsReadOnly() case?
- // DJC (MAPTEK) different coloured text when the grid is disabled
+ // different coloured text when the grid is disabled
if( grid.IsEnabled() )
{
if ( isSelected )
if( grid.IsEnabled() )
{
if ( isSelected )
EVT_ERASE_BACKGROUND( wxGridWindow::OnEraseBackground )
END_EVENT_TABLE()
EVT_ERASE_BACKGROUND( wxGridWindow::OnEraseBackground )
END_EVENT_TABLE()
-// DJC (MAPTEK) 19-Jun-2001 use wxCLIP_CHILDREN as well
wxGridWindow::wxGridWindow( wxGrid *parent,
wxGridRowLabelWindow *rowLblWin,
wxGridColLabelWindow *colLblWin,
wxGridWindow::wxGridWindow( wxGrid *parent,
wxGridRowLabelWindow *rowLblWin,
wxGridColLabelWindow *colLblWin,
- wxWindowID id, const wxPoint &pos, const wxSize &size )
- : wxWindow( parent, id, pos, size, wxWANTS_CHARS|wxCLIP_CHILDREN, wxT("grid window") )
+ wxWindowID id,
+ const wxPoint &pos,
+ const wxSize &size )
+ : wxWindow( parent, id, pos, size, wxWANTS_CHARS | wxCLIP_CHILDREN,
+ wxT("grid window") )
int w = m_numCols > 0 ? GetColRight(m_numCols - 1) + m_extraWidth + 1 : 0;
int h = m_numRows > 0 ? GetRowBottom(m_numRows - 1) + m_extraHeight + 1 : 0;
int w = m_numCols > 0 ? GetColRight(m_numCols - 1) + m_extraWidth + 1 : 0;
int h = m_numRows > 0 ? GetRowBottom(m_numRows - 1) + m_extraHeight + 1 : 0;
-// DJC (MAPTEK) 19-Jun-2001 account for editor since it could possibly
-// be larger than the cell
// take into account editor if shown
if( IsCellEditControlShown() )
{
// take into account editor if shown
if( IsCellEditControlShown() )
{
if ( (event.KeyCode() == WXK_F2 && !event.HasModifiers())
|| editor->IsAcceptedKey(event) )
{
if ( (event.KeyCode() == WXK_F2 && !event.HasModifiers())
|| editor->IsAcceptedKey(event) )
{
- // DJC MAPTEK - ensure cell is visble
+ // ensure cell is visble
MakeCellVisible(row, col);
EnableCellEditControl();
MakeCellVisible(row, col);
EnableCellEditControl();
- // DJC MAPTEK - a problem can arise if the cell is not
- // completely visible (even after calling MakeCellVisible
- // the control is not created and calling StartingKey will
+
+ // a problem can arise if the cell is not completely
+ // visible (even after calling MakeCellVisible the
+ // control is not created and calling StartingKey will
// crash the app
if( editor->IsCreated() && m_cellEditCtrlEnabled ) editor->StartingKey(event);
}
// crash the app
if( editor->IsCreated() && m_cellEditCtrlEnabled ) editor->StartingKey(event);
}
rect.SetRight(client_right-1);
}
rect.SetRight(client_right-1);
}
-// DJC (MAPTEK) 19-Feb-2001 do set size prior to showing the control
editor->SetSize( rect );
editor->Show( TRUE, attr );
editor->SetSize( rect );
editor->Show( TRUE, attr );
-// DJC (MAPTEK) 19-Jun-2001 recalc dimensions in case we need to
-// expand the scrolled window to account for editor
+
+ // recalc dimensions in case we need to
+ // expand the scrolled window to account for editor
CalcDimensions();
editor->BeginEdit(row, col, this);
CalcDimensions();
editor->BeginEdit(row, col, this);
}
else if ( right > cw )
{
}
else if ( right > cw )
{
// position the view so that the cell is on the right
int x0, y0;
CalcUnscrolledPosition(0, 0, &x0, &y0);
// position the view so that the cell is on the right
int x0, y0;
CalcUnscrolledPosition(0, 0, &x0, &y0);
- // DJC MAPTEK if < 0 calc new width from label
+ // if < 0 calc new width from label
if( width < 0 )
{
long w, h;
if( width < 0 )
{
long w, h;