高级会员
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
|
【转帖】help,how can i erase a text properly
help,how can i erase a text properly ?
help,how can i erase a text properly ?
help!
i cannot add and erase the oddbtext properly .
i add a oddbtext with the following code :
{
oddbtextptr postil = oddbtext::createobject();
textid = pspace->appendoddbentity(postil);
}
textid is a class member .
and i erase with the following code:
{
oddbobjectptr objtext = p->textid.openobject (oddb::kforwrite );
objtext->erase();
redrawwindow() ;
}
after i call the erase() ,the postil is disappeared, the viewer is redrawed half , but after i pan the window , the postil return .
help ! i cann't solve the problem !
last edited by shenyq; 13th march 2006 at 12:31 amfff">.
try
code:
{
{
oddbobjectptr objtext = p->textid.openobject (oddb::kforwrite );
objtext->erase();
}
redrawwindow() ;
}
this should close the text entity before redrawing the window. may be leaving it open is the cause of the problem.
best regards
chudomir
thank you , but the problem is also occured .
thank you , but the problem is not solved .
thank you , but the problem is not solved .
sorry - i think your text should be properly deleted now - may be some error in the rendering machine. what happens if you close and reopen the file?
best regards
chudomir
|