IStringGrid


This interface describes minimum requirements of string grid controls.

You can find more information in comments below. Overrided methods can be found in corresponding base interface.

// IStringGrid cells can be edited directly using built-in text editor 
class IStringGrid :public virtual IDrawGrid
{
public:
    void(*OnChangeCell)( // Called when cell text is about to be changed manually 
        IStringGrid *sender, // Control where the event was triggered 
        const int column, const int row, // Cell coordinates 
        const String &value, // New cell value 
        bool &allowed); // Whether the change is allowed. Default true. Set it to false, to prevent change 
    void(*OnSetFocusCell)( // Called when cell becomes focused(enters editing mode) 
        IStringGrid *sender, // Control where the event was triggered 
        const int column, const int row); // Cell coordinates 
    void(*OnKillFocusCell)( // Called when cell becomes unfocused(exits editing mode) 
        IStringGrid *sender, // Control where the event was triggered 
        const int column, const int row); // Cell coordinates 

    virtual bool isCellEditable(const int column, const int row) = 0; // Return whether the cell is editable 
    virtual bool isCellFocused(const int column, const int row) = 0; // Return whether the cell is focused(is being edited) 
    virtual String getCell(const int column, const int row) = 0; // Return cell text 

    virtual bool setCellEditable(const int column, const int row, const bool value) = 0; // Set whether the cell is editable 
    virtual bool setCellFocused(const int column, const int row, const bool value) = 0; // Set whether the cell is focused(is being edited) 
    virtual bool setCell(const int column, const int row, const String &value) = 0; // Set cell text 
};
Namespace: nitisa::standard
Include: Standard/Controls/IStringGrid.h