本文整理汇总了C++中TextEdit::SetText方法的典型用法代码示例。如果您正苦于以下问题:C++ TextEdit::SetText方法的具体用法?C++ TextEdit::SetText怎么用?C++ TextEdit::SetText使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TextEdit
的用法示例。
在下文中一共展示了TextEdit::SetText方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: handleEvent
void TableView::handleEvent(System::Event* evt)
{
ASSERT(0);
#if 0
sysstring type = evt->get_type();
if (evt->get_eventPhase() != System::CAPTURING_PHASE)
{
if (type == OLESTR("command"))
{
CommandInvokeEvent* cmdEvt = dynamic_cast<CommandInvokeEvent*>(evt);
int ncolumn = cmdEvt->get_Command() - 100;
Visual* column = m_list->m_treeHeader->m_columns[ncolumn];
column->put_Visibility(column->get_Visibility()==Collapsed? Visible: Collapsed);
}
else if (type == OLESTR("contextmenu"))
{
evt->stopPropagation();
MouseEvent* mouseEvt = dynamic_cast<MouseEvent*>(evt);
OnContextMenu(mouseEvt);
}
else if (type == OLESTR("ItemStateChanging"))
{
evt->stopPropagation();
int index = *dynamic_cast<IntObject*>(dynamic_cast<TreeItem*>(evt->get_target())->m_itemData);
Record pRecord = m_table[index];
CViewGroup* pMessage = new MailMessage;
Field Subject = pRecord.get_Fields()[1];
Field Headers = pRecord.get_Fields()[3];
Field Content = pRecord.get_Fields()[4];
ScrollViewer* pScroller = new ScrollViewer;
{
TextEdit* textView = new TextEdit;
textView->put_textDocument(new TextDocument());
textView->SetText(
ConvertA2S((char*)Headers.GetData(), Headers.GetSize()) +
OLESTR("\n") +
ConvertA2S((char*)Content.GetData(), Content.GetSize()));
pScroller->put_Content(textView);
}
pScroller->SetOwnerWindow(get_OwnerWindow()); // TODO remove
pMessage->m_views.Add(pScroller);
m_xmlDocumentWorkspace.Create(m_Canvas, pMessage);
for (int i = 0; i < pMessage->m_sheets.GetSize(); i++)
{
CViewSheet* pViewSheet = pMessage->m_sheets[i];
sysstring str;
try
{
str = ConvertA2S((char*)Subject.GetData(), Subject.GetSize());
}
catch(int)
{
str = OLESTR("(Error)");
}
pViewSheet->m_tabElement->set_TextContent(str);
}
}
}
#endif
}