is it possible to replace the visible number on block with a name? or possible annotate the block with name.

asked 05 Mar '14, 14:26

vbknight's gravatar image

vbknight
3115

if you can provide sample code the better . TIA

(05 Mar '14, 14:27) vbknight

To be able to change the block name, please try to use property IBlock::Description (Help → API Reference → Layout-Related Objects → Block). This property enables to set any text instead of block number, also you can set an empty string. You may set this property to “null” in case you need to return displaying of block number. Please see the sample code in C#:

private void testButton_Click(object sender, EventArgs e) {

FREngine.IBlock block = Document.Pages[0].Layout.VisualBlocks[0];

block.set_UserProperty("VisualComponents.BlockDescription", "My Text");`    
block.set_UserProperty("VisualComponents.BlockDescription", "");`

block.set_UserProperty("VisualComponents.BlockDescription", null);

}

link

answered 11 Mar '14, 19:44

SDK_support's gravatar image

SDK_support ♦♦
2763

Yes it is possible, please use IBlock::Name property for this purpose. Please see more details in Help → API Reference → Layout-Related Objects → Block.

link

answered 06 Mar '14, 15:47

SDK_support's gravatar image

SDK_support ♦♦
2763

I'ved tried this but still my block did not change it is still has number instead of name.

           FREngine.IBlock activeblock = imgvwr.FRPage.Layout.Blocks[e.blockIndex];

             //change color
            if (activeblock.Type == FREngine.BlockTypeEnum.BT_Text)
            {
                activeblock.Name = "SampleBlockName";
                imageViewer.Invalidate(true);

            }

// or this

FREngine.IBlock activeblock = imgvwr.FRPage.Layout.Blocks[e.blockIndex];

             //change color
            if (activeblock.Type == FREngine.BlockTypeEnum.BT_Text)
            {
                a  activeblock.set_UserProperty(Name, "RealEstate");
                imageViewer.Invalidate(true);
            }
(07 Mar '14, 07:56) vbknight
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×41
×35
×15

Asked: 05 Mar '14, 14:26

Seen: 1,430 times

Last updated: 11 Mar '14, 19:44

© 2016 ABBYY. All rights Reserved. www.ABBYY.com | Privacy Policy | Legal