Add tlistbox::set_row_active()...
...so we can activate and deactive a row in a listbox.
This commit is contained in:
parent
2b8b19b63a
commit
97f98b5390
2 changed files with 17 additions and 0 deletions
|
@ -505,6 +505,13 @@ bool tlistbox::select_row(const unsigned row, const bool select)
|
|||
return true;
|
||||
}
|
||||
|
||||
void tlistbox::set_row_active(const unsigned row, const bool active)
|
||||
{
|
||||
assert(row < get_item_count());
|
||||
assert(rows_[row].grid());
|
||||
rows_[row].grid()->set_active(active);
|
||||
}
|
||||
|
||||
tlistbox::trow::trow(const tbuilder_grid& list_builder_,const t_string& label) :
|
||||
grid_(dynamic_cast<tgrid*>(list_builder_.build())),
|
||||
height_(0),
|
||||
|
|
|
@ -122,6 +122,16 @@ public:
|
|||
|
||||
unsigned get_selected_row() const { return selected_row_; }
|
||||
|
||||
/**
|
||||
* Makes a row active or inactive.
|
||||
*
|
||||
* NOTE this doesn't change the select status of the row.
|
||||
*
|
||||
* @param row The row to (de)activate.
|
||||
* @param select true activate, false deactivate.
|
||||
*/
|
||||
void set_row_active(const unsigned row, const bool active);
|
||||
|
||||
private:
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue