Profile Picture

Prevent text wrapping or image resizing

Posted By Rotha Aing 12 Years Ago
Author
Message
Rotha Aing
Posted 12 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)

Group: Forum Members
Last Active: 12 Years Ago
Posts: 2, Visits: 1
Hello,

I need to generate shapes with a bitmap and text label underneath. The issue is that I want to have the image retain a certain size and for the text underneath to not become wrapped.

Currently I am using a ImageFillStyle and I have tried replacing the default label on the shapes with a NLogicalLineLabel but this causes the drawing view to show some weird graphics trail when moving the shape around (and a bit of performance hit).

Thanks

Nevron Support
Posted 12 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)

Group: Forum Members
Last Active: Last Week
Posts: 3,054, Visits: 4,009

Hi,

For your scenario you can take advantage of the table shape. For example, to create a table shape with an image and a text underneath you can use the following piece of code:

NTableShape table = new NTableShape();

document.ActiveLayer.AddChild(table);

table.ShowGrid = false;

table.InitTable(1, 2);

table.BeginUpdate();

 

table[0, 0].Bitmap = new Bitmap(@"D:\Image.png");

table[0, 1].Text = "Sample Text";

 

table.EndUpdate();

table.Location = new NPointF(100, 100);

Note that table shapes are not resizable. They are automatically sized to fit their content.



Best Regards,
Nevron Support Team





Similar Topics


Reading This Topic