how can i change block type to FREngine.BlockTypeEnum.BT_Text
e.i if i have a table block i want to change it during runtime to a text block.
thanks
how can i change block type to FREngine.BlockTypeEnum.BT_Text
e.i if i have a table block i want to change it during runtime to a text block.
thanks
0 out of 0 found this helpful
Comments
4 comments
Please use IBlock::Type property for this. For more information see Help → API Reference → Layout-Related Objects → Block. Please note that this property is a read-only, for information about how to work with such properties, please see Help → Guided Tour → Advanced Techniques → Working with Properties.
block type is defined at the creation and cannot be changed. You can only change it by deleting the block and replacing it with the correct type.
Yes, just copy the region of the block you need to replace to another Region object with the help of the IRegion::CopyFrom method, then delete the old block from the layout by calling the ILayoutBlocks::DeleteAt method and finally create a new block of the desired type and add it into the desired layout by calling the AddNew method of the Layout object.
Sorry ... but If I create a new button in the Toolbar: - I can insert ourselves the code to invoke the Command that turns a block of type picture of a block of type text; - Make a loop on all the blocks in the document and save the file in a text contained in the blocks through education GetAsTextBlock.
I think it is the principle on which is based the previous comment!
Please sign in to leave a comment.