本文整理汇总了C++中MultiColumnList::removeRow方法的典型用法代码示例。如果您正苦于以下问题:C++ MultiColumnList::removeRow方法的具体用法?C++ MultiColumnList::removeRow怎么用?C++ MultiColumnList::removeRow使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MultiColumnList
的用法示例。
在下文中一共展示了MultiColumnList::removeRow方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: atoi
bool Demo6Sample::handleDeleteRow(const CEGUI::EventArgs& e)
{
using namespace CEGUI;
// get access to the widgets that contain details about the row to delete.
MultiColumnList* mcl = static_cast<MultiColumnList*>(WindowManager::getSingleton().getWindow("Demo6/MainList"));
Editbox* idxbox = static_cast<Editbox*>(WindowManager::getSingleton().getWindow("Demo6/ControlPanel/ColumnPanel/DelRowIdxBox"));
// get index of row to delete.
CEGUI::uint idx = atoi(idxbox->getText().c_str());
// attempt to delete the row, ignoring any errors.
try
{
mcl->removeRow(idx);
}
catch (InvalidRequestException)
{}
// clear the row index box
idxbox->setText("");
// event was handled.
return true;
}
示例2: atoi
bool Demo6Sample::handleDeleteRow(const CEGUI::EventArgs& args)
{
using namespace CEGUI;
// get access to the widgets that contain details about the row to delete.
MultiColumnList* mcl = static_cast<MultiColumnList*>(static_cast<const WindowEventArgs&>(args).window->getRootWindow()->getChild("MainList"));
Editbox* idxbox = static_cast<Editbox*>(static_cast<const WindowEventArgs&>(args).window->getRootWindow()->getChild("ControlPanel/RowControl/DelRowIdxBox"));
// get index of row to delete.
CEGUI::uint idx = atoi(idxbox->getText().c_str());
// attempt to delete the row, ignoring any errors.
CEGUI_TRY
{
mcl->removeRow(idx);
}
CEGUI_CATCH (InvalidRequestException)
{}
// clear the row index box
idxbox->setText("");
// event was handled.
return true;
}